|
You last visited: Today at 01:49
Advertisement
[Question]Updating and php page question
Discussion on [Question]Updating and php page question within the Shaiya Private Server forum part of the Shaiya category.
01/07/2013, 18:15
|
#1
|
elite*gold: 0
Join Date: Dec 2012
Posts: 47
Received Thanks: 15
|
[Question]Updating and php page question
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
|
#2
|
elite*gold: 0
Join Date: Oct 2009
Posts: 172
Received Thanks: 70
|
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
|
#3
|
elite*gold: 0
Join Date: Dec 2012
Posts: 47
Received Thanks: 15
|
Code:
<?php
$server="127.0.0.1";
$port1="30800";
$port2="30810";
$fp = fsockopen($server,$port1,$errno,$errstr,1);
if(!$fp){echo " <img src='http://i48.tinypic.com/21ja8nn.png'> Login server is offline.";}
else{echo "<img src='http://i45.tinypic.com/2qamn3d.png'> Login server is online.";}
fclose($fp);
echo "<br>";
$fp = fsockopen($server,$port2,$errno,$errstr,1);
if(!$fp){echo "<img src='http://i48.tinypic.com/21ja8nn.png'> Game server is offline.";}
else{echo "<img src='http://i45.tinypic.com/2qamn3d.png'> Game server is online.";}
fclose($fp);
?>
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
|
#4
|
elite*gold: 0
Join Date: Oct 2009
Posts: 262
Received Thanks: 812
|
Quote:
Originally Posted by Prideness
Code:
<?php
$server="127.0.0.1";
$port1="30800";
$port2="30810";
$fp = fsockopen($server,$port1,$errno,$errstr,1);
if(!$fp){echo " <img src='http://i48.tinypic.com/21ja8nn.png'> Login server is offline.";}
else{echo "<img src='http://i45.tinypic.com/2qamn3d.png'> Login server is online.";}
fclose($fp);
echo "<br>";
$fp = fsockopen($server,$port2,$errno,$errstr,1);
if(!$fp){echo "<img src='http://i48.tinypic.com/21ja8nn.png'> Game server is offline.";}
else{echo "<img src='http://i45.tinypic.com/2qamn3d.png'> Game server is online.";}
fclose($fp);
?>
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
|
#5
|
elite*gold: 0
Join Date: Dec 2012
Posts: 47
Received Thanks: 15
|
Code:
Warning: fsockopen() [function.fsockopen]: unable to connect to 127.0.0.1:30800 (Anslutningsförsöket misslyckades eftersom den anslutna datorn inte svarade inom en viss tid eller på grund av att den etablerade anslutningen till värddatorn inte längre fungerar. ) in C:\xampp\htdocs\Others\ServerStatus.php on line 6
Login server is offline.
Warning: fclose() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\Others\ServerStatus.php on line 9
Warning: fsockopen() [function.fsockopen]: unable to connect to 127.0.0.1:30810 (Anslutningsförsöket misslyckades eftersom den anslutna datorn inte svarade inom en viss tid eller på grund av att den etablerade anslutningen till värddatorn inte längre fungerar. ) in C:\xampp\htdocs\Others\ServerStatus.php on line 13
Game server is offline.
Warning: fclose() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\Others\ServerStatus.php on line 16
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
|
#6
|
elite*gold: 0
Join Date: Oct 2009
Posts: 262
Received Thanks: 812
|
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
|
#7
|
elite*gold: 0
Join Date: Oct 2009
Posts: 172
Received Thanks: 70
|
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
|
#8
|
elite*gold: 0
Join Date: Dec 2012
Posts: 47
Received Thanks: 15
|
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
|
|
|
 |
Similar Threads
|
[question] How to change country at payment page( uridium page)
10/06/2012 - DarkOrbit - 7 Replies
Hi! epvp :)
i want to buy premium, but i see the price 6 euro for one month.
normally i buy premium for 1 month is 5 euro.
6 euro because the country, someone know how to change the country? :confused:
thankyou before :)
'Laa
|
[Question] Reg Page
06/22/2011 - CO2 Private Server - 1 Replies
Hello,
So my server today has a big problem. There are couple ppl comming on my server chatbox sayin that they will hack my website. They failed so far, but one came today and he ddos'ed the reg page.
So my question is there a way to stop em from ddosing the site again.
Thanks,
AlienGod
|
[Question] Div Auto Updater, updating files
01/08/2010 - Dekaron Private Server - 3 Replies
Okay for all those who have a div updater for pak client i have a question about updating.
Okay so ill explain the problem first. on my htdocs, update folder i have 4 folders for example.
1.0.1
1.0.2
1.0.3
1.0.4
and each of those folders have some numbers of .div files
|
CRC Updating Question
12/02/2008 - Dekaron - 2 Replies
I have a question concerning updating the CRC folder after an update. I know that the CRC folder is mainly items from the share folder. Updating that part is simply a matter of extracting and copying the right files.
But is there an additional step to making the new version CRC folder work? Or is updating the CRC just a matter of updating the data files?
|
Question about updating Menasculio's INIdecrypt
11/12/2008 - Archlord - 5 Replies
My question is: Is all I need to edit is the new and current DWORD value?
It's been so long since i have worked with this stuff.. can anyone point me in the right direction of the correct dword, i will be googling for it in the mean-time...
The original post with links to the download is here:
http://www.elitepvpers.com/forum/archlord/101460-i ni-files-decrypt-howto.html
Here is Menasculio's current sourcecode:
|
All times are GMT +1. The time now is 01:49.
|
|