
Originally Posted by
Matt
Here's how I get the SessionId using the Toolkit:
define("SOAP_CLIENT_BASEDIR", "../soapclient");
require_once (SOAP_CLIENT_BASEDIR.'/SforcePartnerClient.php');
$mySforceConnection = new SforcePartnerClient();
$mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.'/partner.wsdl.xml');
$mylogin = $mySforceConnection->login('salesforce-userid', 'password');
$sessionID = $mySforceConnection->getSessionId();
>>Is it just a form that you have? Does this form insert to contacts, >>Cases, or both? IS it a lead that you are creating?
It's a form that takes the user input and creates contacts and cases.
>>Try and email Nick Tran at Salesforce, he is the one that wrote the >>PHPToolKit
>>I will PM his email addy to you
That would be great if you could get me his E-mail! I'd love to see what his thoughts are on this.
If I find a solution I'll post it.
Thanks again!
-Matt
Matt maybe I am totally off base here but can't you capture the Salesforce session Id and copy it locally to a $_SESSION variable:
PHP Code:
<?php
session_start();
require_once ('./includes/sandbox_login.inc');
$_SESSION['my_session'] = $client->getSessionId();
echo $_SESSION['my_session'];
?>
output:
Code:
4e1300DR00000000XcD!ASAAQPQmK5pTjd8Sm4lDjerLqfIV61WNJ1BD.iQXTKSqdm13jZmuap0s_yeac_BKWXrI5kh.r4F0CPlqEfrIq_b2_kYYlIlo
then use it instead of copying and pasting it!
Bookmarks