Location: PHPKode > scripts > LinkMeIn > linkmein/test.php
<?

require_once('class.LinkMeIn.php');

// LinkedIn Account Username
$login    = $_POST['login'];

// LinkedIn Account Password
$password = $_POST['passwd'];

$outputFormat = $_POST['output_format'];

// Initializing Class
$linkMeIn  = new LinkMeIn;

/*
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
*/
$linkMeIn->isUsingProxy = false;

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

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

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

$linkMeIn->outputFormat = $outputFormat;

/* 
Execute the Service 
  - Require to pass LinkedIn Account Username and Password
*/
$contactList = $linkMeIn->execService($login, $password);

if ($linkMeIn->outputFormat == "xml")
{
  echo $contactList;
}
else
{
  dump($contactList);  
}

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

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

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

?>
Return current item: LinkMeIn