PHP Classes

Class return null value

Recommend this page to a friend!

      Grab Yahoo  >  All threads  >  Class return null value  >  (Un) Subscribe thread alerts  
Subject:Class return null value
Summary:Class return null value
Messages:1
Author:NTL
Date:2009-03-04 10:25:08
 

  1. Class return null value   Reply   Report abuse  
Picture of NTL NTL - 2009-03-04 10:25:08
Please help me !
I downloaded Grab Yahoo class and extract into my webpage is: http://thiennhien.info/yahoo/list/
But code return null value.
And code index.php file below:

<?

require_once('class.GrabYahoo.php');

// Yahoo! Account Username
$login = "thiennhien_info";

// Yahoo! Account Password
$password = "long1234";

// Initializing Class
$yahoo = new GrabYahoo;

/*
Setting the desired Service
1. addressbook => Used to grab Yahoo! Address Book
2. messenger => Used to grab Yahoo! Messenger List
3. newmail => Used to grab number of new Yahoo! mails
4. calendar => Used to grab Yahoo! Calendar entries
*/
$yahoo->service = "messenger";

/*
Set to true if HTTP proxy is required to browse net
- Setting it to true will require to provide Proxy Host Name and Port number
*/
$yahoo->isUsingProxy = false;

// Set the Proxy Host Name, isUsingProxy is set to true
$yahoo->proxyHost = "";

// Set the Proxy Port Number
$yahoo->proxyPort = "";

// Set the location to save the Cookie Jar File
$yahoo->cookieJarPath = $_SERVER['DOCUMENT_ROOT'] . "/GrabYahoo1.3";

/*
Execute the Service
- Require to pass Yahoo! Account Username and Password
*/
$yahooList = $yahoo->execService($login, $password);

// Printing the array generated by the Class
dump($yahooList);

/*
Printing new mail status
- True (1) if there is new mail(s)
- False (0) if there is no new mail
*/
//$newMailStatus = $yahoo->getNewMailStatus();
//echo $newMailStatus;

// Use this line to figure out any error generated during the process
echo $yahoo->errorInfo;

function dump($var)
{
echo "<pre>";
print_r($var);
echo "</pre>";
}

?>