Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
September 20, 2014, 10:08:36 PM

Pages: [1]   Go Down
  Print  
Author Topic: why would something work fine?  (Read 931 times)
Zorfox
Intergalactic Cowboy
*****
Offline Offline

Posts: 74


WWW
« on: March 23, 2003, 05:49:00 AM »

Okay, I have this code:

code:
#!/usr/bin/perl
use SOAP::Lite;
my $key='NONE OF YOUR BUSINESS';
# of course its not that



print "Content-Type: text/html\n\n";
my $googleSearch = SOAP::Lite -> service("file:GoogleSearch.wsdl");
my $result = $googleSearch -> doGoogleSearch($key, $query, 0, 10, "false", "", "false", "", "latin1", "latin1");


print "$result->{'estimatedTotalResultsCount'}";

( this involves the Google API )
 
Now, instead of giving a 500 server error, LIKE USUAL, it displays '0'. Of course, there are not 0 results to whatever i put in to $query... which (GASP!) is undefined. Why, when I have good code, it KILLS IT,  but when i've been bad, it displays?

by the way, I used $query because there was a query string variable called query. PHP automatically parses querystring or STDIN, and i was used to that.

just wanted to share STUPIDITY OF THE DAY.
Logged

cheese
Pages: [1]   Go Up
  Print  
 
Jump to: