[San-Diego-pm] Using a PHP script as a function
Urivan Flores
saaib at ciberlinux.net
Mon Aug 9 22:03:08 PDT 2010
On Mon, 09 Aug 2010 21:47:03 -0700, Joel Fentin wrote
> 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.
Joe,
1. You can use wget/curl to load the url:
wget 'http://blablabla'
(don't forget the single quotes around the URL)
2. Use LWP:
#!/usr/bin/perl
use LWP::Simple;
my $data = get('http://blablabla/yourscript.php?yadda') or
die 'Unable to get page';
Regards,
--
Urivan Flores-Saaib
saaib at ciberlinux.net
(858) 431-9734
More information about the San-Diego-pm
mailing list