User
Pass
2FA
 
 

Script Online/Offline

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash -> Programming / Scripting / Database
Author Message1572
LolzyTM

[Mentally Stable]



Status: Offline
(since 08-11-2012 15:22)
Joined: 24 Feb 2011
Posts: 31, Topics: 19
Location: Romania

Reputation: 86.2
Votes: 2

Post Posted: 20-10-2011, 18:27:08 | Translate post to: ... (Click for more languages)

Salut am acest script
Code:
<?php
$status =  GetServerStatus('Server...',27015);
function GetServerStatus($site, $port)
{
$status = array("OFFLINE", "ONLINE");
$fp = @fsockopen($site, $port, $errno, $errstr, 2);
if (!$fp) {
    return $status[0];
} else
  { return $status[1];}
}
?>

Si as vrea ca sa zica daca este online "Online" sau daca este Offline sa zica "Offline" si nu stiu cum sa il modific daca ma poate ajuta cineva ii sunt recunoscator! Ms mult -

0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 20-10-2011, 18:36:43 | Translate post to: ... (Click for more languages)

La sfârșit, înainte de ?>, adaugã:
Code:
echo $status;


Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
LolzyTM

[Mentally Stable]



Status: Offline
(since 08-11-2012 15:22)
Joined: 24 Feb 2011
Posts: 31, Topics: 19
Location: Romania

Reputation: 86.2
Votes: 2

Post Posted: 20-10-2011, 18:46:10 | Translate post to: ... (Click for more languages)

Zice offline si serverul este on!
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 20-10-2011, 22:24:45 | Translate post to: ... (Click for more languages)

Modificã asta
Code:
$status = GetServerStatus('Server...',27015);
cu asta
Code:
$status = GetServerStatus('udp://adr.esa.de.ip',27015);


Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash -> Programming / Scripting / Database  


The time now is 01-05-2024, 22:55:49
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x