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

Christopher Hart christopher.p.hart at gmail.com
Mon Aug 9 22:04:32 PDT 2010


yea Urivan's is better.. that way you don't have to alter your php script :)

On Mon, Aug 9, 2010 at 10:03 PM, Urivan Flores <saaib at ciberlinux.net> 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
>
> _______________________________________________
> San-Diego-pm mailing list
> San-Diego-pm at pm.org
> http://mail.pm.org/mailman/listinfo/san-diego-pm
>



-- 
Respectfully,
Chris Hart
Developer / System Administrator
Insuremonkey.com
2080 E. Flamingo, Suite 223
Las Vegas, NV 89119
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/san-diego-pm/attachments/20100809/f3594b6d/attachment.html>


More information about the San-Diego-pm mailing list