Help: php, soap & GoogleAPI

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
nonmek
-


Joined: 04 Sep 2003
Posts: 4

PostPosted: Tue Sep 16, 2003 5:03 pm    Post subject: Help: php, soap & GoogleAPI Reply with quote

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 View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Sep 17, 2003 12:54 am    Post subject: Re: Help: php, soap & GoogleAPI Reply with quote

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 View user's profile Send private message Send e-mail
nonmek
-


Joined: 04 Sep 2003
Posts: 4

PostPosted: Wed Sep 17, 2003 6:40 am    Post subject: Help: php, soap & GoogleAPI Reply with quote

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 View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Sep 19, 2003 3:46 pm    Post subject: Re: Help: php, soap & GoogleAPI Reply with quote

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 View user's profile Send private message Send e-mail
nonmek
-


Joined: 04 Sep 2003
Posts: 4

PostPosted: Mon Sep 22, 2003 3:27 am    Post subject: Help: php, soap & GoogleAPI Reply with quote

Hi aprelium,

Just sent the zip file to support@aprelium.com. Thanks a lot,

Daniel
Back to top View user's profile Send private message
nonmek
-


Joined: 04 Sep 2003
Posts: 4

PostPosted: Wed Oct 01, 2003 3:59 am    Post subject: Thank you so much!!! Reply with quote

Hello Aprelium,

Just want to say THANK YOU SO MUCH for your help. All the best,

Daniel
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group