Hey guys, this is pretty much my first small-ish release ever. I have noticed on many private server websites that there are links that say "Click HERE to register" and it is just a link to a reg page hosted off of their host. But when you click it, it usually sits there unresponsive because their computer is off. So.
Now just change the parts that correspond to your server.
Remember, this is an iframe so you might need to change the height to match your needs. ** Also, the 2 after $error is how long it waits before timing out, it could be one but this is just so that if it cant connect to the socket it could be because of high traffic.
PHP Code:
<?php
$ip = "Your IP Here. No http://";
$port = "80";
if (! $sock = @fsockopen($ip, $port, $num, $error, 2))
echo "<font color='red'>The host computer is off. Please try later.</font>";
else{
echo '<iframe src="http://Your IP again/YourRegisterPage.php" frameborder="0" height="Height" width="100%" scrollable="no"> Your Browser Does not support iframes!</iframe>';
fclose($sock);
}
?>
PHP Code:
<?php
$ip = "68.253.76.228";
$port = "80";
if (! $sock = @fsockopen($ip, $port, $num, $error, 2))
echo "<font color='red'>We are sorry, the host is offline. Check back later.</font>";
else{
echo '<iframe src="http://68.253.76.228/Register.php" frameborder="0" height="100" width="100%" scrollable="no"> Your Browser Does not support iframes, Sorry!</iframe>';
fclose($sock);
}
?>