hi i try to make a function like this:
function check($vorwahl,$rufnummer,$data_to_send) {
$tcp = fsockopen("zielhost.at",80,&$errno,&$errstr,30);
fputs($tcp, "GET /index.shtml HTTP/1.0\n");
fputs($tcp, "Host: zielhost.at\n");
fputs($tcp, "Referer: eigenerhost.at\n");
fputs($tcp, "Content-type: application/x-www-form-urlencoded\n");
fputs($tcp, "Content-length: ".strlen($data_to_send)."\n");
fputs($tcp,"$data_to_send\n");
fputs($tcp, "Connection: close\n\n");
$res = '';
while(!feof($tcp)) {
$res .= fgets($tcp, 4096);
}
fclose($tcp);
return $res;
}
but i get the following error:
HTTP/1.0 411 Length Required
Server: Squid/2.4.STABLE1
Mime-Version: 1.0
Date: Tue, 11 Dec 2001 17:49:15 GMT
Content-Type: text/html
Content-Length: 938
Expires: Tue, 11 Dec 2001 17:49:15 GMT
X-Squid-Error: ERR_INVALID_REQ 0
X-Cache: MISS from members.aon.at
Connection: close
ERROR
The requested URL could not be retrieved
hope anybody can help me.
thanks max