Jump to content

PBSS tip


=SoE= dgrillo

Recommended Posts

When we setup the auto screen shots and started streaming to you... we where thinking, man this is going to be a real pain in the ass to go through all of these screen shots!

 

Thats when a member of our clan came up with the idea of automating the some of the process.... Here's how it works.. he made a scipt that logs into the server... deletes the .html files, downloads the .png file then deletes them. The files are downloaded to a private webserver... he has another script that takes the downloaded screen shots, and makes a webpage out of them. This process runs every hour... One of the nice things about this is... all of our screen shots are now cataloged by Month, Day and hour...

 

if anyone has the programming skills to create these, i would highly recommend it.... You still need to look through the images manually... but it saves the hassle of having to download... not to mention it prevents your server Screen shot folder from filling up.

 

Just thought this might be helpful

Link to comment
Share on other sites

i host on windooze so i've had an easy job :lol:

 

taskmanager > batchfile

 

batchfile > get .png files from servers /pb dir

ftp .png files to /servername/ on a protected webfolder

cleanup leftover .htmlfiles

 

set the taskmgr to run every 15 mins :)

 

and this is how i get them presented:

Posted Image

Link to comment
Share on other sites

I understand the jist of it, but it lacks the script required to physically do it.

 

that i'd like to know is what are the scripts used and what needs to be changed to make them function for BFS.

Link to comment
Share on other sites

Example win32 batch to upload and cleanup PB'ss screenshots

 

Needs:

- Win32 server environment

- Webserver accessable tru ftp

- Windows task scheduler

 

Does:

- Gets only the .png files from server's /pb/svss/ folder uploaded to FTP

- Deletes .png and .htm files from /pb/svss/

 

Files:

- UploadPbss.bat

- FTPcommands.cfg

 

Examplefiles added as an attachment (.rar)

5chaap2k_SVSStoFTP.rar

 

UploadPbss.bat

Note that u have to change the path 'C:\SERVERS\FearMPDedicated\USER\pb\svss' to whatever your server's path is

@echo off
echo.
echo Attempting to upload screenshots...
c:
cd C:\SERVERS\FearMPDedicated\USER\pb\svss
IF NOT EXIST C:\SERVERS\FearMPDedicated\USER\pb\svss\*.png GOTO :NOSCREENSHOTS
ftp -s:ftpcommands.cfg >> FTPlogfile.txt
goto done
:done
echo.
echo Deleting transferred screenshots and htm files...
del C:\SERVERS\FearMPDedicated\USER\pb\svss\*.htm /Q >> DeleteHTMLlog.txt
del C:\SERVERS\FearMPDedicated\USER\pb\svss\*.png /Q >> DeletePNGlog.txt
GOTO :END
:NOSCREENSHOTS
CLS
ECHO.
ECHO There are no screenshots present at this moment.
ECHO.
GOTO :END
:END
CLS
EXIT

FTPcommands.cfg

Note that u have to change the path 'C:\SERVERS\FearMPDedicated\USER\pb\svss' to whatever your server's path is

Note that u have to change the path 'PB_Screenshots/Fearserver01/' to whatever your webserver's pbss-storage path is

Note that u have to change the path 'your.ftp.server.ip' to whatever your server's ip is, same for username and password

lcd C:\SERVERS\FearMPDedicated\USER\pb\svss
open your.ftp.server.ip
username
password
cd PB_Screenshots/Fearserver01/
prompt
binary
mput *.png
bye

Now schedule a task in Windows taskmanager to run UploadPBSS.bat every 10 or more minutes

Link to comment
Share on other sites

sweet, muchas gracias! gonna give it a try, thanks bro

We where using a similar script, but just recently changed it, i think he is now doing something with PHP.... i am going to get the script from the guy who wrote it and I will post it here....

Link to comment
Share on other sites

We where using a similar script, but just recently changed it, i think he is now doing something with PHP.... i am going to get the script from the guy who wrote it and I will post it here....

 

I really appreciate all you guys help.

 

Um, if you have a chemistry question I can help you on lemme know.

Link to comment
Share on other sites

I really appreciate all you guys help.

 

Um, if you have a chemistry question I can help you on lemme know.

Here is the generic PHP script that we are using... I have changed the extension to .txt... didn't know if it would be allowed if it was pwhp...just rename, add your info and enjoy

 

We originally wrote this as a DOS/VB script code. But others have asked for this

functionallity so it has been ported to PHP to address those users too.

 

What this does:

 

Log into the bf2 server and download the PB image files to your server.

Remove the image files from bf2 server.

Create an index.html file that will display all of the images.

 

This was meant to be put in a scheduler/chron job to be run once an hour.

 

We wrote this initially for a Windows server, but have I think I've addressed the Linux users.

This change may have introduced typo's to the code.

Send me an email about it.

 

It seems to work ok in latest versions of PHP 4 and 5.

pbftp.txt

Link to comment
Share on other sites

im new to all this and have not done this screen thing yet, but I found a FTP program that automatically sends the SS to my pc and deletes them in the PB folder on the server. You can configure it for any scedule you want, has anyone used this type before seems to be really easy. Like i said earlier i have not tried it yet, i'm setting it up right now so ill know in a day or two.

Link to comment
Share on other sites

  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.