Jump to content

SOAP trouble - Parse error: syntax error, unexpected T_VARIABLE


strago

Recommended Posts

<?php
require_once('nusoap.php');
$soap_server = 'http://www.domain.com/api/api.cfc?wsdl';

$client = new soapclient($soap_server);
$client->call()

$params = array('user' => 'username@domain.com',  
                'password' => 'PASSWORD');

$return_string = $client->call('getKey', $params);
print_r($return_string);

$subId = 'XXXXXX';
$params = array('keyStr' => $keyStr,
               'subId' => $subId);
$return_string = $client->call('getTodaySubIDStats', $params);
print_r($return_string);

unset($client);

?>

 

spits out

 

Parse error: syntax error, unexpected T_VARIABLE in /home/site82/public_html/stats.php on line 12

 

Line 12 is...

 

$params = array('user' => 'username@domain.com', 

Link to comment
Share on other sites

Gah, then it spits out

 

Fatal error: Uncaught SoapFault exception: [Client] Function ("call") is not a valid method for this service in /home/site82/public_html/stats.php:17 Stack trace: #0 /home/site82/public_html/stats.php(17): SoapClient->__call('call', Array) #1 /home/site82/public_html/stats.php(17): SoapClient->call('getKey', 'getTodaySubIDSt...', Array) #2 {main} thrown in /home/site82/public_html/stats.php on line 17

 

which is the error that I was trying to fix.

 

$return_string = $client->call('getKey','getTodaySubIDStats', $params);

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.