1 ضمیمه
BehooYahooContactGrabber - کتابخانه ای برای بازیابی لیست Contact های یاهو
با استفاده از این کتابخانه می تونید لیست Contactهاتون رو در Address Book یاهو در برنامه ی خودتون ببینید. در این حالت میشه با انتخاب افراد مورد نظر، مثلاً برای اونها ایمیل ارسال کنید.
چند نکته در مورد این کتابخانه:
1) این کتابخانه در حال حاضر از Address Book یاهو پشتیبانی می کنه و در نسخه های بعدی، Address Book ایمیل های دیگه رو هم بهش اضافه می کنم.
2) این کتابخانه با #C نوشته شده.
3) این کتابخانه رو در حال حاضر به صورت یک dll منتشر کردم.
4) نمونه برنامه ی مشابهی نیز برای بازیابی Contact List یاهو وجود داره که البته متاسفانه فقط از دو فیلد پشتیبانی می کنه و نتونست لیست Contact های بنده رو بیاره!
5) نمونه کد استفاده از این کتابخانه با هر دو زبان VB.NET و #C در فایل ضمیمه موجود هست:
#C
using BehooControls.ContactListGrabber.YahooContactListG rabber;
try
{
lblError.Text = String.Empty;
string userName = txtUsername.Text;
string pass = txtPass.Text;
List<YahooUser> listOfContactList = Ycg.GetContactList(userName, pass);
gvContactList.DataSource = listOfContactList;
gvContactList.DataBind();
}
catch (ContactGrabberArgumentNullException ex)
{
lblError.Text = ex.Message;
}
catch (ContactGrabberFailToLogOnException ex)
{
lblError.Text = ex.Message;
}
catch (ContactGrabberFormatException ex)
{
lblError.Text = ex.Message;
}
catch (ContactGrabberWebException ex)
{
lblError.Text = ex.Message;
}
VB.NET
Imports BehooControls.ContactListGrabber.YahooContactListG rabber
Try
lblError.Text = String.Empty
Dim userName As String = txtUsername.Text
Dim pass As String = txtPass.Text
Dim listOfContactList As List(Of YahooUser) = Ycg.GetContactList(userName, pass)
gvContactList.DataSource = listOfContactList
gvContactList.DataBind()
Catch ex As ContactGrabberArgumentNullException
lblError.Text = ex.Message
Catch ex As ContactGrabberFailToLogOnException
lblError.Text = ex.Message
Catch ex As ContactGrabberFormatException
lblError.Text = ex.Message
Catch ex As ContactGrabberWebException
lblError.Text = ex.Message
End Try
End Sub
نحوه ی استفاده بسیار ساده است. کافیه متد GetContactList کلاس Ycg رو فراخوانی کنید. مقدار برگشتی این متد، لیستی Generic از کلاس YahooUser است. تعداد فیلدهای Address Book یاهو، 55 فیلد است. کلاس YahooUser از تمامی این 55 فیلد پشتیبانی می کنه.
وارد کردن نیم اسپیس BehooControls.ContactListGrabber.YahooContactListG rabber در برنامه رو فراموش نکنید.
6) این کتابخانه از چهار کلاس خطای سفارشی پشتیبانی می کنه.
کلاس ContactGrabberArgumentNullException: در صورتی که نام کاربری یا کلمه ی عبور رو وارد نکنید، خطایی از این نوع کلاس رخ میده.
کلاس ContactGrabberFailToLogOnException: در صورتی که نام کاربری یا کلمه ی عبور اشتباه وارد شده باشه، برنامه این مورد رو تشخیص میده و خطایی از این نوع کلاس رخ میده.
کلاس ContactGrabberFormatException: در صورتی که داده های Address Book نتونن توسط برنامه به درستی پردازش بشن، خطایی از این نوع کلاس رخ میده.
کلاس ContactGrabberWebException: در صورتی که برنامه نتونه با سرور یاهو ارتباط برقرار کنه، خطایی از این نوع کلاس رخ میده.
سعی کنید حتماً هر چهار کلاس رو Catch کنید.
7) دموی این کتابخانه در آدرس ذیل قابل دسترس است:
http://www.codepro.ir/YahooContactGrabber-CSharp.aspx
در صورتی که مشکلی در ارتباط با استفاده از این کتابخانه پیدا کردید یا نظر، انتقاد یا پیشنهادی داشتید، در همین تاپیک اعلام بفرمایید.
موفق باشید.
نقل قول: BehooYahooContactGrabber - کتابخانه ای برای بازیابی لیست Contact های یاهو
کار جالبی
بهروز جان از پروتکلهای یاهو استفاده کردید
یا بصورت غیر مستقیم اطلاعات یه صفحه هدف یاهو رو برای گرفتن اطلاعات پردازش کردید؟
نقل قول: BehooYahooContactGrabber - کتابخانه ای برای بازیابی لیست Contact های یاهو
اطلاعات در هر مرحله، ارسال و نتیجه پردازش میشه.
نقل قول: BehooYahooContactGrabber - کتابخانه ای برای بازیابی لیست Contact های یاهو
بهروز جان یه تست بزن ببین واسه آی دی هایی که در آخر یا اول پسوردشون اسپیس هستش چرا غلط بودن پسورد میزنه؟
نقل قول: BehooYahooContactGrabber - کتابخانه ای برای بازیابی لیست Contact های یاهو
o0o0o0opssss. چون طبق عادت همیشگی، ورودی رو Trim می کنم! در نتیجه فاصله حذف میشه.
الان به کدها دسترسی ندارم. انشاا... زمانی که به سر منزل مقصود رسیدم، نسخه ی آپدیت شده رو قرار میدم.
نقل قول: BehooYahooContactGrabber - کتابخانه ای برای بازیابی لیست Contact های یاهو
سلام
من چند ماهی بود که به دنبال چنین برنامه ای می گشتم و در اواسط مرداد ماه یک مقاله و یک برنامه برای انجام این کار پیدا کردم که در تاپیکی که آدرسش رو در زیر قرار دادم گذاشتمش.
در کل عملکرد این نوع برنامه ها رو می تونید در این مقاله بخونید.
https://barnamenevis.org/showth...ighlight=yahoo
شاد باشید
نقل قول: BehooYahooContactGrabber - کتابخانه ای برای بازیابی لیست Contact های یاهو
نقل قول:
سلام
من چند ماهی بود که به دنبال چنین برنامه ای می گشتم و در اواسط مرداد ماه یک مقاله و یک برنامه برای انجام این کار پیدا کردم که در تاپیکی که آدرسش رو در زیر قرار دادم گذاشتمش.
در کل عملکرد این نوع برنامه ها رو می تونید در این مقاله بخونید.
https://barnamenevis.org/showth...ighlight=yahoo
شاد باشید
همه ارتباطات رو بطور کامل بر نگردوند !
نقل قول: BehooYahooContactGrabber - کتابخانه ای برای بازیابی لیست Contact های یاهو
نقل قول:
نوشته شده توسط
shahab_ksh
همه ارتباطات رو بطور کامل بر نگردوند !
سلام
برای من درست عمل میکنه در ضمنی که من بیشتر منظورم مقاله بود که با ساختار آشنا بشید. خود برنامه رو که جناب راد زحمتش رو کشیدن.
شاد باشید.
نقل قول: BehooYahooContactGrabber - کتابخانه ای برای بازیابی لیست Contact های یاهو
نقل قول:
سلام
برای من درست عمل میکنه در ضمنی که من بیشتر منظورم مقاله بود که با ساختار آشنا بشید. خود برنامه رو که جناب راد زحمتش رو کشیدن.
شاد باشید.
مرسی کار شما خوبه منظورم انتقاد نبود !
منظورم این بود که dll جناب راد کامل تر بود
مقاله ای که شما گذاشتین خیلی بدردم خورد ممنون
نقل قول: BehooYahooContactGrabber - کتابخانه ای برای بازیابی لیست Contact های یاهو
نقل قول:
نوشته شده توسط
Behrouz_Rad
این لینک دیگه در دسترس نیست؟
نقل قول: BehooYahooContactGrabber - کتابخانه ای برای بازیابی لیست Contact های یاهو
سپاسگزارم دوست من ولی کاربرد dll برای مصارف تجاری است.
بهتره در این طور سایت های آموزشی سورس برنامه را هم قرار بدی تا بقیه هم بتوانند در توسعه کد به شما کمک کنند.
نقل قول: BehooYahooContactGrabber - کتابخانه ای برای بازیابی لیست Contact های یاهو
با عرض معذرت من می خوام توی سایتم وضعیت من که مدیر سایت هستم را نشون بده یعنی در صورتی که من انلاین باشم در یاهو ایتجا توی سایت وضعیت من رو نشون بده که آن هستم یا اف ؟از این dll میشه برای اینکار استفاده کرد؟؟؟