[San-Diego-pm] Using a PHP script as a function

Joel Fentin joel at fentin.com
Tue Aug 10 14:02:08 PDT 2010


Urivan,

LWP::Simple did the trick. Thank you so much.

Urivan Flores wrote:
> 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
> 
> 
> 


-- 
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