Server rentals :: NFOservers.com

Forums

All times are UTC - 8 hours



Author Message
PostPosted: Mon Apr 16, 2012 9:34 pm 
Offline
A semi-regular
A semi-regular

Joined: Fri Mar 23, 2012 10:15 am
Posts: 24
Our Web server runs Windows Server. This *might* work on Linux servers with some modifications.
Here's how I have our server grabbing screenshots:

Web Server runs a 'Batch' (.bat) file, which calls a set of FTP commands. It FTP's to the NFO server, grabs the latest screenshots into a publicly available directory on the web server. Then, deletes them on the Game server. A scheduled task runs this every ~5 mins or so.

Note: The 1st time you run it, it will be SLOW since it has to catch up and copy all screenshots. After that point, the synch every 5 mins is small and not noticeable to players.

RDP to your web server. (You will NEED access to your web server for this-- or be very clever in scripting/coding to create this.)

Create a "C:\PB_Screenshot\" folder
On your web server's root, create a sub-folder for each server. (I'll give an example of 2 servers.): C:\Apache\htdocs\pbss\Server_1\
C:\Apache\htdocs\pbss\Server_2\

In the C:\PB_Screenshot folder, create a "GrabPBSS.bat" and "GrabPBSS.txt" files. Paste the contents in...

For the "GrabPBSS.bat" file:
Code:
ftp -v -i -s:C:\PB_Screenshot\GrabPBSS.txt


In the "GrabPBSS.txt" file:
Code:
REM =======Server_1=======
open YOUR_SERVER_1.game.nfoservers.com
YOUR_FTP_USERNAME
YOUR_FTP_PASSWORD
lcd C:\Apache\htdocs\pbss\Server_1
ascii
cd svss
get pbsvss.htm
mget pb*.htm
binary
mget pb*.png
mdelete pb0*.png
mdelete pb0*.htm
close
REM =======Server_2=======
open YOUR_SERVER_2.game.nfoservers.com
YOUR_FTP_USERNAME
YOUR_FTP_PASSWORD
lcd C:\Apache\htdocs\pbss\Server_2
ascii
cd svss
get pbsvss.htm
mget pb*.htm
binary
mget pb*.png
mdelete pb0*.png
mdelete pb0*.htm
close


Your game server's hostname, FTP User/Pass should be available in your NFO control panel. It's not the same as your User/Pass to get into the Forum/Panel.

Now, as bhzdclan suggested, just throw the "Main Stream Gamers' PunkBuster Screenshot Viewer" HTML file ("msgpbssv.html") into the "Server_1" and another copy into "Server_2" folder. Then, you just point your web visitors to...
http://www.YOUR_WEBSITE/pbss/Server_1/msgpbssv.html
http://www.YOUR_WEBSITE/pbss/Server_2/msgpbssv.html

For shorter URLs, you could also rename "msgpbssv.html" to "index.html" and shorten the url to /Server_1/ and /Server_2/

Run the ".bat" file and make sure it works. You should see ".png" and ".htm" files populate in the folders you made, and they will be removed from the BF3 game server after the copy. Assuming it works, set a scheduled task to run the ".bat" file every 5 mins (or however long you wish).

Folder/File names changed to protect our servers :) But, hopefully it is clear! Good luck.

- CPx4


Top
 Profile  
 
PostPosted: Tue May 15, 2012 9:53 pm 
Offline
A semi-regular
A semi-regular

Joined: Fri Mar 23, 2012 10:15 am
Posts: 24
FYI, as a follow-up to my previous post (above this), I realized that the "pbsvss.htm" file grew huge, and my script didn't account for it.

So, if interested, I'll re-post my instructions and include an extra 'PowerShell' script that cleans the file so it can be re-uploaded to the game server.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
It is currently Thu May 23, 2013 3:10 pm
Powered by phpBB® Forum Software © phpBB Group