Hi all

Sorry for posting this here (no to anger anyone, could you please reply back 
off line)
I am in need of simulating the post like a web client

The html would look like this:

<form name="form1" action="propsearch.pl" method="post">
<textarea rows="12" cols="70" name="msg">GREENc</textarea>
<input type="submit" value="Submit">
</form>


This is what I have so far:

<?php
$host = "www.example.biz";
$path = "/cgi-bin/ecco/scripts/h2h/glo/propsearch.pl";
$fp = fsockopen( $host , 80, $errno, $errstr, 30);
if (!$fp) {
   echo "$errstr ($errno)<br />\n";
} else {
   $out = "POST /$path HTTP/1.1\r\n";
   $out .= "Host: $host\r\n";
   $out .= "Content-type: application/x-www-form- urlencoded\r\n";
   $out .= "Content-length: " . strlen($path) . "\r\n";
   $out .= "Connection: Close\r\n\r\n";
   $pos = "$path?msg=GREEN";

   fwrite($fp, $out);
   while (!feof($fp)) {
       echo fgets($fp, 128);
   }
   print $pos;
   fclose($fp);
}
?>

Im trying to have my PHP fire the value to the perl script.

If anyome has any tips or advise, I would be most grateful.

Kind Regards and thanks in advance.

Brent Clark


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to