note 16179 deleted from function.header by jimw

From: Date: Thu, 18 Oct 2001 22:21:33 +0000
Subject: note 16179 deleted from function.header by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-19141@lists.php.net to get a copy of this message
This script send user and password for webserver Authorization and show the page under the password proteccion. No header: fsockopen (util for send lotus domino authorization, at last!!!!!) :-) <?php $server_ip = "localhost"; $server_port = "80"; $user = "homer"; $pass = "simpsons"; $fp = fsockopen ($server_ip, $server_port); // $errno, $errstr, 30); $pass = base64_encode("$user:$pass"); fputs($fp, "GET /esade2.nsf/frmCambioPassword?ReadForm&id=0 HTTP/1.0\r\n"); fputs($fp, "Authorization: Basic $pass\r\n"); fputs($fp, "HOST $server_ip\r\n"); fputs($fp, "\r\n"); while (!feof($fp)) { $content .= fgets ($fp,8192); } $cadena = strstr($content,"<html>"); echo $cadena; fclose ($fp); ?>

« previous php.notes (#19141) next »