[Question]Updating and php page question

01/07/2013 18:15 Prideness#1
Hello,
I got 2 questions.

First I'll do the update question: My host-pc I am currently hosting my test server on, drops his connection like twice a week(at least this week). That doesn't matter that much, but the problem is that the IP also changes. That's the problem, now my question is, can I change the IP that's set in the game.exe (and/or other files in my client) through an update? If yes, how would this work. Do I have to do the same thing as a regular update, in this case, make another game.exe, create a patch with the new game.exe and upload it to my patch site?

Or is there any other way I can change the IP in game.exe, without having to download the new game.exe or configure the network settings that it doesn't change IP on restart?

PHP question:
The ServerStatus.php file I'm using from Svinseladden does only partly work, It does when the server is online but when it is offline it says there are OpenSockets errors in line 6/9/13/16... I have looked for something but I couldn't think of nothing, can any of you see the problem?
Code:
Line 6: $fp = fsockopen($server,$port1,$errno,$errstr,1);
Line 9: fclose($fp);
Line 13: $fp = fsockopen($server,$port1,$errno,$errstr,1);
Line16: fclose($fp);
Unlike this one, all my other .php scripts are working like a charm.\

Thanks in advance!
01/07/2013 18:32 zokylove#2
Updater question answer:YES
Use winrar to make path.Edit game.exe IP then right click->>add to archive.Select zip from menu "Archive format" and change game.zip in ps0xx.patch in "Archive Name"

PHP:

this lines check if server online or offline. To check this error il need to see full code.Check if u have the ports 30800 and 30810 open.This might fix problem.But till i dont see entire code cant tell.
01/07/2013 19:32 Prideness#3

Open the spoiler to see the full .php file, about the ports, since it can detect if the server is online, I suppose the ports are opened already, or am I wrong? If I am, should these ports be both opened on TCP and UDP? I guess both if I they are closed?

About the game.exe should this really be done with winRAR? I am using 7-zip to compress the files and making patches.
01/07/2013 20:37 abrasive#4
Quote:
Originally Posted by Prideness View Post

Open the spoiler to see the full .php file, about the ports, since it can detect if the server is online, I suppose the ports are opened already, or am I wrong? If I am, should these ports be both opened on TCP and UDP? I guess both if I they are closed?
Can you paste the error messages you are getting? That way we can see what line number it is occurring on, and what type of error.
01/07/2013 21:47 Prideness#5

I've opened port 30810 and 30800 both TCP and UDP and on both incoming and outgoing, though I'm still getting this error.
01/08/2013 01:53 abrasive#6
It looks like all that is happening is fsockopen() is failing when this server is offline (which is expected), but the code is still trying to run fclose(). I've changed it so it only tries to run fclose() when fsockopen() is successful. This is untested, but see if it works.
Code:
<?php
$server="127.0.0.1";
$port1="30800";
$port2="30810";

$fp = fsockopen($server,$port1,$errno,$errstr,1)
if($fp){
	echo '<img src="http://i45.tinypic.com/2qamn3d.png"> Login server is online.<br>';
	fclose($fp);
}else{
	echo '<img src="http://i48.tinypic.com/21ja8nn.png"> Login server is offline.<br>';
}

$fp2 = fsockopen($server,$port2,$errno,$errstr,1)
if($fp2){
	echo '<img src="http://i45.tinypic.com/2qamn3d.png"> Game server is online.';
	fclose($fp2);
}else{
	echo '<img src="http://i48.tinypic.com/21ja8nn.png"> Game server is offline.';
}
?>
01/08/2013 02:15 zokylove#7
about the updater u can use 7zip also, but be sure to make archive format ZIP else will result as an error.And wb abrasive.Glad your back.
01/08/2013 16:08 Prideness#8
Thanks for the rewriting, I'll test it tonight, since I don't have access to host-pc right now. I'll let you know here if it works (or not). Thanks again :D