Development Articles
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOtherDevelopment Articles

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 25th, 2003, 01:03 PM
vinniem vinniem is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 2 vinniem User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Google API w/PHP

Came across this article - URL on DevShed about using the Google Web APIs with PHP.

I've never worked with OOP/classes in PHP so I'm having a hard time troubleshooting. The problem is that the search request always returns the same set of results. Checking the value of $params[q] throughout the code listed in the article produces the correct query term so I'm assuming that my problem lies in nusoap.php. It appears that the URL of my post is what is actually being delivered to Google by the nusoap class as the query term.

To see the problem in action, go to - URL and scroll down to the bottom. The value that I'm setting for 'q' in the DevShed code is '$preformat[title]' from Postnuke. Hardcoding a search term for 'q' works as expected. Why does this choke when given a variable?

Any ideas?

Thanks,
Vince

Last edited by vinniem : May 25th, 2003 at 01:07 PM.

Reply With Quote
  #2  
Old May 26th, 2003, 07:26 AM
melonfire melonfire is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Posts: 45 melonfire User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
What version of PHP are you using?

If you are using an older version of PHP, you may need to toggle the behaviour of the "register_globals" variable, which controls the manner in which variables are sent between forms. This could explain why you are having no problems when you hardwire the query string, but are unable to get results when the query is a form variable.
__________________
--
Articles, tutorials and more, all at http://www.melonfire.com/community/columns/trog/

Reply With Quote
  #3  
Old May 26th, 2003, 09:01 AM
vinniem vinniem is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 2 vinniem User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PHP version

The version of PHP I'm running is 4.3.1, and register_globals is on.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDevelopment Articles > Google API w/PHP

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap