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');
  $mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);

  echo "***** Login Info*****\n";
  print_r($mylogin);
} catch (Exception $e) {
  echo $mySforceConnection->getLastRequest();
  echo $e->faultstring;
}
?>

Sample Output

***** Login Info*****
stdClass Object
(
    [metadataServerUrl] => https://na5-api.salesforce.com/services/Soap/m/13.0/462300D70000000J4qj
    [passwordExpired] => 
    [sandbox] => 
    [serverUrl] => https://na5-api.salesforce.com/services/Soap/u/13.0/462300D70000000J4qj
    [sessionId] => 462300D70000000J4qj!AR0AQO40VW6Za74stEeEbVvWzdIHDcGRVaD4Mmowtd3rgEysVQxcchPZiY_F30iCG6M7XBGyI2kP0VLm8i3S.zrY2zf5bxdn
    [userId] => 005700000014rfAAAQ
    [userInfo] => stdClass Object
        (
            [accessibilityMode] => 
            [currencySymbol] => $
            [orgDefaultCurrencyIsoCode] => USD
            [orgHasPersonAccounts] => 
            [organizationId] => 00D70000000J4qjEAC
            [organizationMultiCurrency] => 
            [organizationName] => salesforce
            [profileId] => 00e70000000vr2wAAA
            [roleId] => 
            [userDefaultCurrencyIsoCode] => 
            [userEmail] => anemail@email.com
            [userFullName] => Nick Tran
            [userId] => 005700000014rfAAAQ
            [userLanguage] => en_US
            [userLocale] => en_US
            [userName] => anemail@email.com
            [userTimeZone] => America/Los_Angeles
            [userType] => Standard
            [userUiSkin] => Theme2
        )

)