strago Posted January 21, 2011 Share Posted January 21, 2011 <?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' => '[email protected]', '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' => '[email protected]', Link to comment https://forums.phpfreaks.com/topic/225134-soap-trouble-parse-error-syntax-error-unexpected-t_variable/ Share on other sites More sharing options...
Jocka Posted January 21, 2011 Share Posted January 21, 2011 $client->call() should be $client->call(); Link to comment https://forums.phpfreaks.com/topic/225134-soap-trouble-parse-error-syntax-error-unexpected-t_variable/#findComment-1162789 Share on other sites More sharing options...
strago Posted January 21, 2011 Author Share Posted January 21, 2011 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 https://forums.phpfreaks.com/topic/225134-soap-trouble-parse-error-syntax-error-unexpected-t_variable/#findComment-1162873 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.