note 8495 deleted from HTTP functions by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Thu, 14 Sep 2000 11:31:29 +0000 |
| Subject: | note 8495 deleted from HTTP functions by jmcastagnetto | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4981@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.0n");
$data="domainname=test.de&submit=Suchen&nnnn";
$str=strlen($data);
fputs ($fp, "Content-Length: $strnn$data");
while (!feof($fp)) {
echo fgets ($fp,128);
}
fclose ($fp);
}
?>