View previous topic :: View next topic |
Author |
Message |
nonmek -
Joined: 04 Sep 2003 Posts: 4
|
Posted: Tue Sep 16, 2003 5:03 pm Post subject: Help: php, soap & GoogleAPI |
|
|
Hi,
I am new to Abyss, php and soap. Tried to test GoogleAPI with PHP and soap. But got an error message when running the googlesearch.php file(http://127.0.0.1/googlesearch.php).
Fatal error: Call to undefined function: getproxy() in C:\Program Files\Abyss Web Server\htdocs\googlesearch.php on line 9
My OS is Windows XP with lastest Abyss and PHP 4.3.2. I have all soap classes in /htdocs folders with GoogleSearch.wsdl and googlesearch.php
Here is the googlesearch.php file:
<?php
require_once('SOAP/Client.php');
$key = 'wzMXCPhQFHIoNdE1l1x/hsudArv9AceZ';
$query = 'cat';
$wsdlurl = './GoogleSearch.wsdl';
$WSDL = new SOAP_WSDL($wsdlurl);
$client = $WSDL->getProxy();
$response = $client->doGoogleSearch( $key,$query,0,4, false,'',false,'','','');
foreach($response->resultElements as $result) {
echo '<a href="'.$result->URL.'">';
echo $result->title."</a><br><br>\n";
echo $result->snippet."<br><br><br>\n";
}
?>
Have checked through the forum and didn't see topic of this kind. Please help. By the way, other php file works. Thanks in advance.
Daniel |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed Sep 17, 2003 12:54 am Post subject: Re: Help: php, soap & GoogleAPI |
|
|
Your code has a problem (or an error). This errors happens usually when the variable you use has a bad value. In your case, check that
Code: | $WSDL = new SOAP_WSDL($wsdlurl); |
has correctly created $WSDL before proceeding with
Code: | $client = $WSDL->getProxy(); |
By the way, we think that the $wsdlurl value is bad: ./GoogleSearch.wsdl isn't a valid URL. Try using http://127.0.0.1/GoogleSearch.wsdl instead. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
nonmek -
Joined: 04 Sep 2003 Posts: 4
|
Posted: Wed Sep 17, 2003 6:40 am Post subject: Help: php, soap & GoogleAPI |
|
|
Thank you Aprelium! Appreciate it.
I echoed $WSDL and it displays: Object. Is it correct?
> By the way, we think that the $wsdlurl value is bad: ./GoogleSearch.wsdl isn't a valid URL. Try using http://127.0.0.1/GoogleSearch.wsdl instead.
I used http://127.0.0.1/GoogleSearch.wsdl for $wsdlurl but the same error occured. Do you have other suggestions?
Thanks,
Daniel |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Sep 19, 2003 3:46 pm Post subject: Re: Help: php, soap & GoogleAPI |
|
|
Can you please zip all the files required to reproduce the problem and send them to support@aprelium.com ? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
nonmek -
Joined: 04 Sep 2003 Posts: 4
|
Posted: Mon Sep 22, 2003 3:27 am Post subject: Help: php, soap & GoogleAPI |
|
|
Hi aprelium,
Just sent the zip file to support@aprelium.com. Thanks a lot,
Daniel |
|
Back to top |
|
 |
nonmek -
Joined: 04 Sep 2003 Posts: 4
|
Posted: Wed Oct 01, 2003 3:59 am Post subject: Thank you so much!!! |
|
|
Hello Aprelium,
Just want to say THANK YOU SO MUCH for your help. All the best,
Daniel |
|
Back to top |
|
 |
|