nomad3212 Posted May 27, 2011 Share Posted May 27, 2011 I am trying to execute this code. can anyone tell me what are the things/values to get this code up and running ?? This code is to implement TripAdvisor API. The code is : $client = new nusoap_client('http://demo02.tripadvisor.com/ContentService', true); $err = $client->getError(); if ($err) { echo '<h2>Constructor error</h2><pre>' . $err . '</pre>'; echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>'; exit(); } $param = '<con:in0><api:clientLoginID>3CFC3B05146B40048B0C105A6CB9748F</api:clientLoginID><api:listId>16794</api:listId></con:in0>'; $result = $client->call('getTop10List', $param, 'con:getTop10List'); $client->call('getTop10List', $param, 'con:getTop10List'); if ($client->fault) { $output .= '<h2>Fault</h2><pre>'; print_r($result); echo '</pre>'; } else { $err = $client->getError(); if ($err) { $output .= '<h2>Error</h2><pre>' . $err . '</pre>'; } else { $output .= '<h2>Result</h2><pre>'; print_r($result); echo '</pre>'; } } $output .= '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>'; $output .= '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>'; $output .= '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>'; Link to comment https://forums.phpfreaks.com/topic/237676-script-not-working/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.