• Welcome to Valhalla Legends Archive.
 

[PHP] Automatic Updater Code

Started by AC_Drkan, March 08, 2006, 06:00 PM

Previous topic - Next topic

AC_Drkan

Hmm.. Can't quite figure this one out. This is what my problem is,

I wrote  a script:
http://files.flawgaming.com/ServerStatus/

I wanted it to connect to here:
http://www.flawgaming.com/ServerStatus/UpdateChecker.php

And retrieve the current version, then, download the version if it isn't up to date.

Heres my coding so far:
$UpdateURL = "http://www.flawgaming.com/ServerStatus/UpdateChecker.php";
$CodingVer = 1;

$UPDateCheck = fsockopen($UpdateURL, 80, $errno, $errstr, 5);
echo($errno." ".$errstr."<BR>");
if ($UPDateCheck != NULL) {
echo("ENTERED LOOP<BR>");
$UPDate = fread($UPDateCheck, 1000);
$CheckThis = explode(' ', $UPDate);
Echo($CheckThis[0]." ".$CheckThis[1]."<BR>");
}

That is for the Update Checker

Now, this is what the Update checker looks like:
echo($CurrentVersion." ".$CurrentDownload); $CurrentVersion = 1;$CurrentDownload = "http://www.flawgaming.com/ServerStatus/";?>


Here's where im stumped:
2 No such file or directory

I check all the paths, and it looks clean, but still not connecting, did i make an error somewhere that im not seeing? Someone care to help a brother out?!


EDIT:
NVM, FIGURED IT OUT!
"The Arguments of Today Result in the Wars of Tomorrow" - Quote By Muah.
<@Logan> I spent a minute looking at my own code by accident.
<@Logan> I was thinking "What the hell is this guy doing?"

<kow`> "There are 10 types of people in the world... those who understand binary and those who don't."
<SpaceRain> That's only 2 types of people, kow.
<SpaceRain> STUPID


<[TN]FBMachine> i got kicked out of barnes and noble once for moving all the bibles into the fiction section

God i love Bash.org.