note 8495 added to HTTP functions

From: Date: Thu, 14 Sep 2000 02:00:08 +0000
Subject: note 8495 added to HTTP functions
Groups: php.notes 
Request: Send a blank email to php-notes+get-4930@lists.php.net to get a copy of this message
Hi, I have a question, and would be so glad if I found some php-expert who knows the answer. I want to send a variable to a cgi-skript that is located on a different server and want to catch the script's output in a variable in my skript. This other website has a web-interface which checks if a domain-name is used or available. So the form they have on their site refers to a cgi-script by submitting the variable "domain" and gives an output which contains the words "available" or "already registered". Do you know how to send variables over a http-header? thanks and greeds, Alexander Franzen Here my non-working try-out: <? $fp = fsockopen ("www.denic.de/servlet/Whois", 80, &$errno, &$errstr, 30); if (!$fp) { echo "$errstr ($errno)<br>\n"; } else { fputs ($fp, "POST /servlet/Whois HTTP//1.0\n"); $data="domainname=test.de&submit=Suchen&\n\n\n\n"; $str=strlen($data); fputs ($fp, "Content-Length: $str\n\n$data"); while (!feof($fp)) { echo fgets ($fp,128); } fclose ($fp); } ?> http://www.php.net/manual/ref.http.php

« previous php.notes (#4930) next »