Call us Toll-Free:
1-800-218-1525
Live ChatEmail us

 Sponsors

Netcraftget info

Code Wizard, 12-30-2006

see what kind of webserver a website is running and along with other information.

can be modified to connect to the remote server on another port, uhm.

irc.system33r.net - (SysNet!@)


<?
// Netcraft(get info)
// written by micke andersson (aka teksys/system33r)
// http://system33r.net/
// irc.system33r.net (sysnet!)

function http_request($server, $port) {
$data = "";
$query = "HEAD / HTTP/1.0";
$fp = fsockopen($server, $port);
if($fp) {
fputs($fp, $query."

");
while(!feof($fp)) {
$data .= fread($fp, 1000);
}
fclose($fp);
}
return $data;
}
?>
<FORM>
<INPUT TYPE=HIDDEN NAME=action VALUE=query>
Site: <INPUT TYPE=TEXT NAME=server VALUE="<?echo $server?>"> <SMALL>(ie: system33r.net)</SMALL><BR>
Port: <INPUT TYPE=TEXT NAME=port VALUE="80" SIZE="5" MAXLENGTH="5"><BR>
<INPUT TYPE=SUBMIT VALUE=" OK ">
</FORM>
<?
if($action == "query") {
$data = http_request($server, $port);
echo "Connected To $server on port $port.<p>";
echo "Output: <p><pre>$data</pre><p>";
}
?>
Enjoyed this post?

Subscribe Now to receive new posts via Email as soon as they come out.

 Comments
Post your comments












Note: No link spamming! If your message contains link/s, it will NOT be published on the site before manually approved by one of our moderators.



About Us  |  Contact us  |  Privacy Policy  |  Terms & Conditions