Submit Your Article COD4 COD: WAW
Call of Duty 4 Forums
Home UserCP Members Register Calendar FAQ Downloads Clans


Go Back   Call of Duty 4 Forums > Call of Duty 4 Discussion > COD4: PC > COD4 Server Support
Register FAQ Members List Calendar Downloads Search Today's Posts Mark Forums Read


Welcome to the Call of Duty 4 Forums! Please REGISTER!
Hey there!

It looks like you're enjoying Call of Duty 4 Forums but haven't created an account yet. Why not take a minute to register for your own free account now? As a member you get free access to all of our forums and posts plus the ability to post your own messages, communicate directly with other members and much more. You also have the chance to win great prizes just for posting! Register now!

Already a member? Login at the top of this page to stop seeing this message.

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 09-13-2008, 06:11 PM
Recruit
 
Join Date: Sep 2008
Posts: 3
Lang is on a distinguished road
Default CoD4 Server Status PHP Script

Hey guys,

I have put together a CoD4 server status PHP script you can put on your website.

Some knowledge of PHP/HTML is required if you want to modify the output.

You can demo the script here: WilliamLang.net - Call of Duty 4 Server Status PHP Script Demo
and download it from here: WilliamLang.net - Call of Duty 4 Server Status PHP Script

If you would like automatic updates about changes to the class you can create a free account at PHP Classes.

You can find the link to the class there at Class: Call of Duty 4 Server Status - PHP Classes

Lemme know if you find any bugs!

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post! Submit to N4G
Reply With Quote
Payin' The Bills (Register to get rid of this advertisement!)
  #2  
Old 09-16-2008, 11:41 AM
CTerrian's Avatar
Private Private First Class
 
Join Date: Jul 2008
Location: North Georgia
Posts: 11
CTerrian is on a distinguished road
Send a message via ICQ to CTerrian Send a message via AIM to CTerrian Send a message via MSN to CTerrian Send a message via Yahoo to CTerrian
Default

When I open it from my computer it displays fine in my browser.

I've edited the index file with the our info. The only thing I did to the "COD4ServerStatus.php" is add our IP address under var $server = '69.65.13.82';
When I open index I see these two lines:

"getServerStatus()){ // $status->parseServerData(); // $serverStatus = $status->returnServerData(); // $players = $status->returnPlayers(); // $pings = $status->returnPings(); // $scores = $status->returnScores(); ?> "

How do I hide these top two lines?

Also... When I ftp the file and try opening it using Firefox, I get nothing. What am I doing wrong?
http://oldephartz.com/cterrian/index.php
http://oldephartz.com/cterrian/COD4ServerStatus.php
__________________

Last edited by CTerrian : 09-16-2008 at 12:37 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post! Submit to N4G
Reply With Quote
  #3  
Old 09-16-2008, 02:23 PM
Recruit
 
Join Date: Sep 2008
Posts: 3
Lang is on a distinguished road
Default

Hey CTerrian,

Thanks for trying out my script. First off, you don't want to edit var $server in COD4ServerStatus.php - you just want to change the server that's called in index.php (though this shouldn't create any problems anyways)

Also you might try replacing any <? (opening php tag) with <?php instead. Some servers do not allow the truncated opening php tag. There is no such rule for the closing one (?>)

Hope that helps!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post! Submit to N4G
Reply With Quote
  #4  
Old 09-20-2008, 01:03 AM
Recruit
 
Join Date: Jun 2008
Posts: 2
unholyman is on a distinguished road
Default

ok where do I place this script and how do we use it I have edited the index.php the ip now where do I place in in my games sever or my webhost ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post! Submit to N4G
Reply With Quote
  #5  
Old 09-20-2008, 06:46 PM
Recruit
 
Join Date: Sep 2008
Posts: 3
Lang is on a distinguished road
Default

You can place it wherever you like!

However, if you ran it on your server it may run faster as the server would be accessing itself.

To be honest you probably wouldn't notice a difference if you put it on your games' server or the webhost.

But if you put it on your games' server use 'localhost' or '127.0.0.1' as the server.

If your games' server is dedicated I recommend putting it on your webhost as to not slow down the server with the extra resources Apache or IIS ( if its Windows) would take up.

Hope that helps.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post! Submit to N4G
Reply With Quote
  #6  
Old 10-15-2008, 02:33 AM
Recruit
 
Join Date: Oct 2008
Posts: 1
Beni_Skate is on a distinguished road
Default

Hi

First of all thanks for the nice sript!

I also had CTerrians Problem and with <?php instead of <? it works fine.

But I can nowhere see the map name or a picture of the map.

I tried to insert following line in the index.php:
Map: <?php echo $serverStatus['_Maps'];?>
But when I open the Site there isnt any mapname.
The Output is:
Map: Array

Does anybody know how to display a mapname and one of the included pictures?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post! Submit to N4G
Reply With Quote
  #7  
Old 01-10-2009, 11:40 AM
Recruit
 
Join Date: Sep 2008
Posts: 8
bigmack is on a distinguished road
Default

Wow, that is pretty nice..
I have seen another page that actually queries the master server to tell you what status it THINKS your server is in based on the master list. Have you got any info on where that one might be? I just can't seem to locate that url again..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post! Submit to N4G
Reply With Quote
  #8  
Old 05-07-2009, 09:52 AM
Recruit
 
Join Date: May 2009
Posts: 1
zerofourseven is on a distinguished road
Default

I'm getting these errors:

PHP Notice: Undefined variable: timeout in C:\inetpub\wwwroot\cod4server\COD4ServerStatus.php on line 48
PHP Notice: Undefined index: _Maps in C:\inetpub\wwwroot\cod4server\COD4ServerStatus.php on line 117

i changed <? to <?php. if i just put <? then i would get the same error as CTerrian.

Any ideas
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post! Submit to N4G
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
New COD4 Server johnnybob Servers 3 03-19-2008 04:06 PM
Win XP or Win 2003 server for dedicated CoD4 server? asphalt COD4 Server Support 8 01-10-2008 11:17 AM
COD4 Server - Master Server List Checker Rain COD4 Server Support 1 12-19-2007 07:23 PM
[DFP] COD4 TDM Server maubo Servers 0 12-11-2007 03:50 AM
COD4 Server Help jakari COD4 Server Support 3 11-29-2007 01:48 PM





All times are GMT -6. The time now is 02:57 PM.

COD4boards.com is an and Legal
Style designed by: vBSkinworks SEO by vBSEO 3.1.0 Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.