Paste number 24103: script timing out

Paste number 24103: script timing out
Pasted by: easypwn
When:2 years, 10 months ago
Share:Tweet this! | http://paste.lisp.org/+ILJ
Channel:None
Paste contents:
Raw Source | XML | Display As
<?php

	$remip = $_SERVER['REMOTE_ADDR'];
	$get = str_replace($_SERVER['DOCUMENT_ROOT'], "", $_SERVER['SCRIPT_FILENAME']);

	echo "<table border='1'>";
	echo "<tr><td>[".$remip."]</td><td>&nbsp; connecting to ".$_SERVER['SERVER_NAME'].":".$_SERVER['SERVER_PORT']." ...</td></tr>";

	if(@fsockopen('tcp://'.$_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0)) {
		echo "<tr><td>[".$remip."]</td><td>&nbsp; connected, sending GET ".$get." ...</td></tr>";
	} else {
		@fclose();
		die ("<tr><td>[".$remip."]</td><td>&nbsp; connection failed</td></tr>");
	}

	echo "<tr><td>[".$remip."]</td><td>&nbsp; waiting for response ...</td></tr>";
	
	@fclose();


	$fp = @fsockopen('tcp://'.$_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0);

	if($fp) {

		$send = @fwrite($fp, "GET ".$get);

		if(fread($fp, 1)) {
			echo "<tr><td>[".$remip."]</td><td>OK</td></tr>";
		}

	} else {
		@fclose();
		die( "<tr><td>[".$remip."]</td><td>404</td></tr>");
	}

	@fclose();
	echo "</table>";

?>

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.