hi,<br><br>make sure &quot;<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">../dev/plant_editor/getPlantList.php&quot; has a php shebang #!/usr/bin/env php or whatever.. so it can run from CLI<br>
</span>also, take out the url-encoded get parameters since perl wont be calling it in a browser.<br><br>You may actually need to grab those vars from $argv or w/e the PHP mechanism for cmd line args is.. as opposed to $_POST or $_GET.<br>
<br>:) Good Luck!<br><br><div class="gmail_quote">On Mon, Aug 9, 2010 at 9:47 PM, Joel Fentin <span dir="ltr">&lt;<a href="mailto:joel@fentin.com">joel@fentin.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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.<br>
<br>
If you take:<br>
<a href="http://calscape.com/dev/plant_editor/getPlantList.php?address=14295+recuerdo&amp;city=del+mar&amp;state=ca&amp;zipcode=92014&amp;native_status=native" target="_blank">http://calscape.com/dev/plant_editor/getPlantList.php?address=14295+recuerdo&amp;city=del+mar&amp;state=ca&amp;zipcode=92014&amp;native_status=native</a><br>

and put it in Firefox, it returns data which is displayed.<br>
<br>
First I tried 20 variations of:<br>
my $cmd = &#39;php ../dev/plant_editor/getPlantList.php?address=14295%20recuerdo&amp;city=del%20mar&amp;state=ca&amp;zipcode=92014&amp;native_status=native&#39;;<br>
my $Stuff = `$cmd`;<br>
die &quot;|$Stuff|&quot;;<br>
<br>
It not only doesn&#39;t return data, but it doesn&#39;t seem to run the PHP.<br>
<br>
======================<br>
<br>
I also tried:<br>
my $xxx = system(&#39;<a href="http://calscape.com/dev/plant_editor/getPlantList.php?address=14295+recuerdo&amp;city=del+mar&amp;state=ca&amp;zipcode=92014&amp;native_status=native&#39;" target="_blank">http://calscape.com/dev/plant_editor/getPlantList.php?address=14295+recuerdo&amp;city=del+mar&amp;state=ca&amp;zipcode=92014&amp;native_status=native&#39;</a>);<br>

die &quot;|$xxx|&quot;;<br>
<br>
just to see if I could get it to run. I could not.<br>
<br>
======================<br>
<br>
I also tried:<br>
print &quot;Content-type: text/html\n\n&quot;;<br>
open(XXX,&quot;<a href="http://calscape.com/dev/plant_editor/getPlantList.php?address=14295+recuerdo&amp;city=del+mar&amp;state=ca&amp;zipcode=92014&amp;native_status=native" target="_blank">http://calscape.com/dev/plant_editor/getPlantList.php?address=14295+recuerdo&amp;city=del+mar&amp;state=ca&amp;zipcode=92014&amp;native_status=native</a> |&quot;);<br>

while(&lt;XXX&gt;){print}<br>
close(XXX);<br>
<br>
======================<br>
<br>
I&#39;ve run out of ideas and nothing I Googled seemed to help.<br>
Suggestions please.<br><font color="#888888">
<br>
<br>
<br>
-- <br>
Joel Fentin       tel: 760-749-8863<br>
Biz Website:      <a href="http://fentin.com" target="_blank">http://fentin.com</a><br>
Personal Website: <a href="http://fentin.com/me" target="_blank">http://fentin.com/me</a><br>
_______________________________________________<br>
San-Diego-pm mailing list<br>
<a href="mailto:San-Diego-pm@pm.org" target="_blank">San-Diego-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/san-diego-pm" target="_blank">http://mail.pm.org/mailman/listinfo/san-diego-pm</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Respectfully,<br>Chris Hart<br>Developer / System Administrator<br>Insuremonkey.com<br>2080 E. Flamingo, Suite 223<br>Las Vegas, NV 89119<br>