Sample Call

<?php
// SOAP_CLIENT_BASEDIR - folder that contains the PHP Toolkit and your WSDL
// $USERNAME - variable that contains your Salesforce.com username (must be in the form of an email)
// $PASSWORD - variable that contains your Salesforce.com password

define("SOAP_CLIENT_BASEDIR", "../../soapclient");
require_once (SOAP_CLIENT_BASEDIR.'/SforcePartnerClient.php');

require_once ('../userAuth.php');

try {
  $mySforceConnection = new SforcePartnerClient();
  $mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.'/partner.wsdl.xml');
  $header = new LoginScopeHeader($LOGINSCOPEHEADER);
  $mySforceConnection->setLoginScopeHeader($header);
  $mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);
  print_r($mylogin);
  print_r($mySforceConnection->getServerTimestamp());
} catch (Exception $e) {
  echo $mySforceConnection->getLastRequest();
  echo $e->faultstring;
}
?> 

Sample Output

stdClass Object
(
    [metadataServerUrl] => https://na6-api.salesforce.com/services/Soap/m/13.0/511800D80000000KUts
    [passwordExpired] => 
    [sandbox] => 
    [serverUrl] => https://na6-api.salesforce.com/services/Soap/u/13.0/511800D80000000KUts
    [sessionId] => 511800D80000000KUts!ARUAQPEvRo1x5BAMKsoyXuB4zoQfn5gO.9rPtc5D0wGVeNVum_iWDBKTNCRGA0VOr1dPaLeXtbk79sMCJPjpdoYY.dNd8tKY
    [userId] => 03580000000kDWyAAM
)
stdClass Object
(
    [timestamp] => 2008-09-17T01:09:12.160Z
)