[San-Diego-pm] Using a PHP script as a function
Joel Fentin
joel at fentin.com
Mon Aug 9 21:47:03 PDT 2010
I have a perl program and I am trying to use a PHP script as a
function. That is to say that my perl program passes data to it
and it returns data. I have not been able to get it to run, let
alone return data.
If you take:
http://calscape.com/dev/plant_editor/getPlantList.php?address=14295+recuerdo&city=del+mar&state=ca&zipcode=92014&native_status=native
and put it in Firefox, it returns data which is displayed.
First I tried 20 variations of:
my $cmd = 'php
../dev/plant_editor/getPlantList.php?address=14295%20recuerdo&city=del%20mar&state=ca&zipcode=92014&native_status=native';
my $Stuff = `$cmd`;
die "|$Stuff|";
It not only doesn't return data, but it doesn't seem to run the PHP.
======================
I also tried:
my $xxx =
system('http://calscape.com/dev/plant_editor/getPlantList.php?address=14295+recuerdo&city=del+mar&state=ca&zipcode=92014&native_status=native');
die "|$xxx|";
just to see if I could get it to run. I could not.
======================
I also tried:
print "Content-type: text/html\n\n";
open(XXX,"http://calscape.com/dev/plant_editor/getPlantList.php?address=14295+recuerdo&city=del+mar&state=ca&zipcode=92014&native_status=native
|");
while(<XXX>){print}
close(XXX);
======================
I've run out of ideas and nothing I Googled seemed to help.
Suggestions please.
--
Joel Fentin tel: 760-749-8863
Biz Website: http://fentin.com
Personal Website: http://fentin.com/me
More information about the San-Diego-pm
mailing list