redirecting...

TarinC

New Member
Messages
698
Reaction score
0
Points
0
now i remember! last time i did i made the script i used the code before u edited it. can u put the code you put in before?
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
I'm not sure what one you mean... Is it posted in another post earlier in this thread?
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
You should always close the file opened with fopen().. The overhead shouldn't really matter.
 

TarinC

New Member
Messages
698
Reaction score
0
Points
0
sorry for bumping this old thread but i need help!

Code:
<?php
[color=#0000bb]$handle = @fopen("[url="http://tps.servecounterstrike.com:27016/"]http://tps.servecounterstrike.com:27016/[/url]", "r");
if ($handle) 
{
fclose($handle);
$content .= "<center>";
$content .= "<table>"
."<tr><td colspan=\"2\"><p align=\"center\"><b>Regular Counter-Strike Server</b></td></tr>"
."<tr><td width=\"50%\"><p align=\"center\"><img src=\"<A href="http://tps.x10hosting.com/tps/custom/images/green-status.gif\"></td><td">http://tps.x10hosting.com/tps/custom/images/green-status.gif\"></td><td width=\"50%\">Online! <a href=\"steam: &quot;-applaunch 10 -game cstrike +connect tps.servecounterstrike.com:27016&quot;\">(Connect)</a></td></tr>"
."</table>";
$content .= "</center><br><br>";
} else {
fclose($handle);
$content .= "<center>";
$content .= "<table>"
."<tr><td colspan=\"2\"><p align=\"center\"><b>Regular Counter-Strike Server</b></td></tr>"
."<tr><td width=\"50%\"><p align=\"center\"><img src=\"<A href="http://tps.x10hosting.com/tps/custom/images/red-status.gif\"></td><td">http://tps.x10hosting.com/tps/custom/images/red-status.gif\"></td><td width=\"50%\">Offline!</td></tr>"
."</table>";
$content .= "</center><br><br>";
}[/color]
[color=#0000bb]
$handle = @fopen("[url="http://tps.servecounterstrike.com:27014/"]http://tps.servecounterstrike.com:27014/[/url]", "r");
if ($handle) 
{
fclose($handle);
$content .= "<center>";
$content .= "<table>"
."<tr><td colspan=\"2\"><p align=\"center\"><b>Wc3FT Counter-Strike Server</b></td></tr>"
."<tr><td width=\"50%\"><p align=\"center\"><img src=\"<A href="http://tps.x10hosting.com/tps/custom/images/green-status.gif\"></td><td">http://tps.x10hosting.com/tps/custom/images/green-status.gif\"></td><td width=\"50%\">Online! <a href=\"steam: &quot;-applaunch 10 -game cstrike +connect tps.servecounterstrike.com:27014&quot;\">(Connect)</a></td></tr>"
."</table>";
$content .= "</center>";
} else {
fclose($handle);
$content .= "<center>";
$content .= "<table>"
."<tr><td colspan=\"2\"><p align=\"center\"><b>Wc3FT Counter-Strike Server</b></td></tr>"
."<tr><td width=\"50%\"><p align=\"center\"><img src=\"<A href="http://tps.x10hosting.com/tps/custom/images/red-status.gif\"></td><td">http://tps.x10hosting.com/tps/custom/images/red-status.gif\"></td><td width=\"50%\">Offline!</td></tr>"
."</table>";
$content .= "</center>";
}
?>[/color]

it stopped working after corey started the working on the server.
does it look right? do i have everything i need? Will it start working after corey is done?
is there a way i could put a time limit when it checks if the site exists?

sorry for all the questions
 
Last edited:
B

Brandon

Guest
I get an error with line 9

PHP:
."<tr><td width=\"50%\"><p align=\"center\"><img src=\"<A href="http://tps.x10hosting.com/tps/custom/images/green-status.gif\"></td><td">http://tps.x10hosting.com/tps/custom/images/green-status.gif\"></td><td width=\"50%\">Online! <a href=\"steam: &quot;-applaunch 10 -game cstrike +connect tps.servecounterstrike.com:27016&quot;\">(Connect)</a></td></tr>"
 
Last edited by a moderator:

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
DesertWar said:
I get an error with line 9

PHP:
."<tr><td width=\"50%\"><p align=\"center\"><img src=\"<A href="http://tps.x10hosting.com/tps/custom/images/green-status.gif\"></td><td">http://tps.x10hosting.com/tps/custom/images/green-status.gif\"></td><td width=\"50%\">Online! <a href=\"steam: &quot;-applaunch 10 -game cstrike +connect tps.servecounterstrike.com:27016&quot;\">(Connect)</a></td></tr>"


On line 9 try:

Code:
."<tr><td width=\"50%\"><p align=\"center\"><img src=\"http://tps.x10hosting.com/tps/custom/images/green-status.gif\"></td><td">http://tps.x10hosting.com/tps/custom/images/green-status.gif\"></td><td width=\"50%\">Online! <a href=\"steam: &quot;-applaunch 10 -game cstrike +connect tps.servecounterstrike.com:27016&quot;\">(Connect)</a></td></tr>"

Edit: *shudders* It's really bad HTML, but that should get rid of the error.
 
Last edited:
B

Brandon

Guest
Parse error: parse error, unexpected ':' in /home/*******/public_html/****/****.php on line 9
 
Last edited by a moderator:

TarinC

New Member
Messages
698
Reaction score
0
Points
0
thats weird... i dont get any errors. it used to work before corey started working on the server. maybe the new security settings dont allow it? im not sure...

here... lemme post the whole file
PHP:
<?php
if (stristr($_SERVER['SCRIPT_NAME'], "block-Servers.php")) {
	Header("Location: ../index.php");
	die();
}
$handle = @fopen("http://tps.servecounterstrike.com:27016/", "r");
if ($handle) 
{
$content .= "<center>";
$content .= "<table>"
."<tr><td colspan=\"2\"><p align=\"center\"><b>Regular Counter-Strike Server</b></td></tr>"
."<tr><td width=\"50%\"><p align=\"center\"><img src=\"http://tps.x10hosting.com/tps/custom/images/green-status.gif\"></td><td width=\"50%\">Online! <a href=\"steam: &quot;-applaunch 10 -game cstrike +connect tps.servecounterstrike.com:27016&quot;\">(Connect)</a></td></tr>"
."</table>";
$content .= "</center><br><br>";
} else {
$content .= "<center>";
$content .= "<table>"
."<tr><td colspan=\"2\"><p align=\"center\"><b>Regular Counter-Strike Server</b></td></tr>"
."<tr><td width=\"50%\"><p align=\"center\"><img src=\"http://tps.x10hosting.com/tps/custom/images/red-status.gif\"></td><td width=\"50%\">Offline!</td></tr>"
."</table>";
$content .= "</center><br><br>";
}
 
$handle = @fopen("http://tps.servecounterstrike.com:27014/", "r");
if ($handle) 
{
$content .= "<center>";
$content .= "<table>"
."<tr><td colspan=\"2\"><p align=\"center\"><b>Wc3FT Counter-Strike Server</b></td></tr>"
."<tr><td width=\"50%\"><p align=\"center\"><img src=\"http://tps.x10hosting.com/tps/custom/images/green-status.gif\"></td><td width=\"50%\">Online! <a href=\"steam: &quot;-applaunch 10 -game cstrike +connect tps.servecounterstrike.com:27014&quot;\">(Connect)</a></td></tr>"
."</table>";
$content .= "</center>";
} else {
$content .= "<center>";
$content .= "<table>"
."<tr><td colspan=\"2\"><p align=\"center\"><b>Wc3FT Counter-Strike Server</b></td></tr>"
."<tr><td width=\"50%\"><p align=\"center\"><img src=\"http://tps.x10hosting.com/tps/custom/images/red-status.gif\"></td><td width=\"50%\">Offline!</td></tr>"
."</table>";
$content .= "</center>";
}
?>
 
Last edited:

Jordan K

[B]tags dont work:([/B]
Messages
1,528
Reaction score
0
Points
0
DesertWar said:
Parse error: parse error, unexpected ':' in /home/*******/public_html/****/****.php on line 9

You have an : where it's not supposed to be.
 

TarinC

New Member
Messages
698
Reaction score
0
Points
0
the one u checked was messed up... all my links automatically added the <a> tag. the new one is the exact thing i have in the file.
 

TarinC

New Member
Messages
698
Reaction score
0
Points
0
i think i know why it doesnt work. the port 27016 and 27014 must have been blocked when corey finished the sucurity fixes.

is it possible to tell the "fopen" command to check if the site exists for a time limit?
 
Last edited:
Top