How to using SoapClient in php5 with google api


i want to using google search api
i have license key but when i using this

$client = new SoapClient("");
$faxResult = $client->SendCharFax(array(
        "key"        => 'keyhere',
        "q"           => 'test',                 
        "start"       => '0',
        "maxResults"  => '10',
        "filter"      => true,
        "restrict"    => "",
        "safeSearch"  => true,
        "lr"          => "lang_en",
        "ie"          => "",
        "oe"          => ""


i get this error

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from '' : Extra content at the end of the document in /home/arabsb5/public_html/soft/test.php:13 Stack trace: #0 /home/**/public_html/**/test.php(13): SoapClient->SoapClient('') #1 {main} thrown in /home/**/public_html/**/test.php on line 13

what should i do :rolleyes:

Is not a valid WSDL, which is what your require for the SoapClient to function correctly. Unfortunately, Google appears to have ceased to provide this service.

You could always look to consume Google’s AJAX API which provides a json encoded response.{QUERY}

More information here.