php3-list | 199908
Date: 08/24/99
- Next message: Colin Viebrock: "RE: [PHP3] How to include a block of JavaScript code"
- Previous message: Rômul: "[PHP3] PHP/FI + Mini SQL 1"
- Next in thread: jj <email protected>: "Re: [PHP3] - post & redirect"
- Reply: jj <email protected>: "Re: [PHP3] - post & redirect"
- Reply: Jason Brooke: "Re: [PHP3] - post & redirect"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Some time ago, Jason Brooke has posted a code to pass variables to another
page rather by POST method than the GET method
the code was:
$host="my.host.com";
$mydata="k=$k";
$sp=fsockopen($host,80);
fputs($sp,"POST /index.php3 HTTP/1.1\n");
fputs($sp,"Host: $host\n");
fputs($sp,"Content-type: application/x-www-form-urlencoded\n");
fputs($sp,"Content-length: ".strlen($mydata)."\n");
fputs($sp,"Connection: close\n\n");
fputs($sp,$mydata);
fclose($sp);
The problem is:
When I post the variables like that, the only thing I do, is open a
connection from php3 script to the other php3 script without getting any
output. I tried to
echo fgets($sp,1024)."<BR>";
serveral times, but while the connection was between the two scripts, it did
not detect my browser either I could not get to any cookies or even the
"REAL" IP, it returned the IP address of the server, where was the script
located.
I need something that will let MY browser post the variables to the server.
Anyone gets any idea ?
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Colin Viebrock: "RE: [PHP3] How to include a block of JavaScript code"
- Previous message: Rômul: "[PHP3] PHP/FI + Mini SQL 1"
- Next in thread: jj <email protected>: "Re: [PHP3] - post & redirect"
- Reply: jj <email protected>: "Re: [PHP3] - post & redirect"
- Reply: Jason Brooke: "Re: [PHP3] - post & redirect"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

