[MiniRelease] Responsive Register page

01/22/2010 01:42 iRook#1
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.

PHP Code:
<?php
$ip 
"Your IP Here. No http://";
$port "80";
if (! 
$sock = @fsockopen($ip$port$num$error2))
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);
}
?>
Now just change the parts that correspond to your server.
PHP Code:
<?php
$ip 
"68.253.76.228";
$port "80";
if (! 
$sock = @fsockopen($ip$port$num$error2))
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);
}
?>
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.
01/22/2010 02:57 .Ryu#2
Goodjob =P
02/12/2010 15:07 paralyzer2#3
Thanks
02/12/2010 16:53 paralyzer2#4
HELP

This is my code
Code:
<?php
$ip = "5.251.83.226";
$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://5.251.83.226/regpage.php" frameborder="0" height="100" width="100%" scrollable="no"> Your Browser Does not support iframes, Sorry!</iframe>';
fclose($sock);
}
?>
And here is a screenshot
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
02/14/2010 03:10 LegalConquer#5
Why does everyone have it set to open a regpage in a new window? XD is it like tradition or something
09/17/2010 15:13 _DreadNought_#6
Very good and easy to use!

This need a #bump as I know people will use it :)
09/17/2010 15:33 FrontBoy#7
Thanks dude!
09/17/2010 18:06 Basser#8
Nothing new.
09/17/2010 20:19 _DreadNought_#9
^ This hasn't been released before.