TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 01-26-2008, 04:35 PM   #1 (permalink)
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default Yahoo! Grabber

Me presents the Yahoo! Grabber. Since I've seen many requests over the internet for this one, I wrote a little class to do just this: grab your Yahoo! address book, and since this is one of my favorite forums, I decided to share it with the world :)

Quote:
Yahoo Grabber v1.1

Allows you to log into Yahoo! and fetch the address book in CSV format.
This class is designed to work only with PHP >= 5.0 with the CURL extension enabled.

This library may be used as-is, or extended by a 3rd party, as long as it is used
for non-profit purposes and this copyright notice remains intact. If you do need to use it
for commercial purposes, contact me via the e-mail address specified below and we'll talk about it.
Enjoy it, and if you need to say thanks, you can do it here
Attached Files
File Type: zip ygrab.zip (3.8 KB, 288 views)
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.

Last edited by xenon : 01-26-2008 at 10:33 PM.
xenon is offline  
Reply With Quote
The Following 2 Users Say Thank You to xenon For This Useful Post:
sarmenhb (10-11-2008), Wildhoney (01-26-2008)
Old 01-27-2008, 12:16 AM   #2 (permalink)
The Acquainted
Inquisitive 
 
WinSrev's Avatar
 
Join Date: Sep 2007
Posts: 133
Thanks: 6
WinSrev is on a distinguished road
Default

Works great!
For people that only want the e-mail addresses and not the other stuff, i wrote this little function:

PHP Code:
                // get the address book, the login succeeded
    
$address_book_csv $yahoo->get_address_book();

    echo 
'<pre>';
    
//print_r( $address_book_csv );
    
$i 0;
    while(
$i <= (count($address_book_csv) - 1))
    {
        echo(
$address_book_csv[$i]['email'] . '<br>');
        
$i++;
    }
    echo 
'</pre>'
Send a message via ICQ to WinSrev
WinSrev is offline  
Reply With Quote
Old 01-27-2008, 01:40 AM   #3 (permalink)
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default

PHP Code:
while($i <= (count($address_book_csv) - 1)) 
could be rewritten as:

PHP Code:
while($i count($address_book_csv)) 
You can show what ever you want, that's why I chose to return an array of values

PS: the post editor has some serious problems when replying.
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
xenon is offline  
Reply With Quote
Old 10-04-2008, 01:03 PM   #4 (permalink)
The Visitor
 
Join Date: Oct 2008
Posts: 1
Thanks: 0
kissgeza is on a distinguished road
Default

And new features here:

//print_r( $address_book_csv );
$i = 0;
while($i < count($address_book_csv))
{
echo($address_book_csv[$i]['first'] . ' ');
echo($address_book_csv[$i]['middle'] . ' ');
echo($address_book_csv[$i]['last'] . ' ');
echo($address_book_csv[$i]['email'] . '<br>');
$i++;
}
echo '</pre>';
and nick and etc.. etc... :)
kissgeza is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 04:59 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design