function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Durai MuruganDurai Murugan 

Contacts not get using live account with php toolkit

Hi,
I have created a code for get "Contact" list from salesforce using php toolkit. It working fine with my developer account. But same code try with our live account. It is not working.  Need to setup in salesforce for get live conatcts. Please suggest. My code is 
<?php
define("USERNAME", "myusername");
define("PASSWORD", "mypassword");
define("SECURITY_TOKEN", "mytokenkey");


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

try {
$mySforceConnection = new SforceEnterpriseClient();
$mySforceConnection->createConnection("soapclient/enterprise.wsdl.xml");
$mySforceConnection->login(USERNAME, PASSWORD.SECURITY_TOKEN);

$query = "SELECT Id, FirstName, LastName, Phone, MobilePhone from Contact";
$response = $mySforceConnection->query($query);
foreach ($response->records as $record)
{
echo '<tr>
    <td>'.$record->Id.'</td>
    <td>'.$record->FirstName.'</td>
    <td>'.$record->LastName.'</td>
    <td>'.$record->Phone.'</td>
    <td>'.$record->MobilePhone.'</td>
     </tr>';
 }

} catch(Exception $e) {    
    //echo $mySforceConnection->getLastRequest();
    //echo $e->faultstring;
    
}
?>