Parse Error: expecting parentheses... why doesn't this work?
Posted: Thu Aug 29, 2002 12:44 pm
Hey guys,
Trying to use this code from our good buddies at DevShed, but I keep getting a parse error saying a parentheses is required at line 28. I started coding PHP 2 days ago, so I have no idea why I'm getting this. Could you guys take a look-see at the code and figure it out? I'll denote line 28 by ***LINE 28*** (not exactly subtle is it??) Here it is:
Thanks,
AUaero
Trying to use this code from our good buddies at DevShed, but I keep getting a parse error saying a parentheses is required at line 28. I started coding PHP 2 days ago, so I have no idea why I'm getting this. Could you guys take a look-see at the code and figure it out? I'll denote line 28 by ***LINE 28*** (not exactly subtle is it??) Here it is:
Code: Select all
<?php
// include the class
include("nusoap.php");
// create a instance of the SOAP client object
// remember that this script is the client,
// accessing the web service provided by Google
$soapclient = new soapclient("http://api.google.com/search/beta2");
// uncomment the next line to see debug messages
// $soapclient->debug_flag = 1;
// set up an array containing input parameters to be
// passed to the remote procedure
$params = array(
'key' => "******************", // Google license
key
***LINE 28***
'q' => 'melonfire', // search term
************
'start' => 0, // start from result
n
'maxResults' => 10, // show a total of n
results
'filter' => false, // remove similar
results
'restrict' => '', // restrict by topic
'safeSearch' => false, // remove adult
links
'lr' => '', // restrict by
language
'ie' => '', // input encoding
'oe' => '' // output encoding
);
// invoke the method on the server
$result = $soapclient->call("doGoogleSearch", $params,
"urn:GoogleSearch", "urn:GoogleSearch");
// print the results of the search
print_r($result);
?>AUaero