I have created a simple login script, which each can start and test that his/your settings are working.
*I have a unix server, and using enterprise edition of SF
1. Copy the PHP kit anywhere on your server
2. in your working directory, make the first file: SalesforceUserSettings.php
PHP Code:
<?php
$USERNAME='your.email@here.com';
$PASSWORD='yourPassword+Tokenhere';
?>
3. now for the logincheck file
PHP Code:
<?php
// Start of code here
error_reporting(E_ALL & ~ E_NOTICE);
$SOAPCLIENT_DIR="/usr/lib/php/modules/soapclient/";
// Login to salesforce.com
//this clears out your local PHP WSDL cache incase you may have been performing
//tests against your development account or Sandbox account
ini_set("soap.wsdl_cache_enabled", "0");
require_once ("$SOAPCLIENT_DIR/SforcePartnerClient.php");
require_once ("$SOAPCLIENT_DIR/SforceHeaderOptions.php");
require_once ('SalesforceUserSettings.php');
$partner_wsdl = "$SOAPCLIENT_DIR/partner.wsdl.xml";
// Process of logging on and getting a salesforce.com session
$client = new SforcePartnerClient();
$client->createConnection($partner_wsdl);
$loginResult = $client->login($USERNAME, $PASSWORD);
if (!$loginResult->passwordExpired)
{
// Do something
echo "Super - you are good!";
}
else
{
echo "Unable to connect to salesforce.com.";
}
?>
I will post more samples as they are produced.
cheers
Bookmarks