Scheduled PSN downtime tomorrow in Back Page News

Need some help with a script.


72 replies to this topic - - - - -

#1 FunRoomSite

    Resident Elite

  • 1,314 posts
  • Joined: 07-May 06

Posted 10 February 2012 - 19:04

Hey guys, on my site DominateDominion.com I am trying to have a table that updates every day. Basically, I play a game called League of Legends and they have a map called Dominion. There is no ranked mode for dominion, but I was given some files that can get the players elo. I have a note pad where I type in the person's usernamer whos elo I want to find out, then I run a batch file, and open results.txt and it gives the players elo. The guy who gave me the files said all I need for it to update on my site automatically each day was a script where it dumps all the users from the site to a file, runs the batch file, then sends the update back to the server. So how could I do this? I'm don't know any programming or anything at all. Where should I start looking?


#2 +theblazingangel

    AutoPatcher Veteran

  • 3,113 posts
  • Joined: 25-March 04
  • Location: England, UK

Posted 10 February 2012 - 19:40

To have a script executed once per day you need a scheduled task / cronjob.

If programming is needed, then you'll need to post a copy of the code this person has given to you, along with any relevant code from your website and hope someone here has some free time to help you integrate it.

Your site appears to be running wordpress, so thats a good start, we know you've got PHP available.

#3 FunRoomSite

    Resident Elite

  • 1,314 posts
  • Joined: 07-May 06

Posted 10 February 2012 - 19:51

View Posttheblazingangel, on 10 February 2012 - 19:40, said:

To have a script executed once per day you need a scheduled task / cronjob.

If programming is needed, then you'll need to post a copy of the code this person has given to you, along with any relevant code from your website and hope someone here has some free time to help you integrate it.

Your site appears to be running wordpress, so thats a good start, we know you've got PHP available.
I can do it manually as well. But it's not a script he gave me. Or maybe it is. He sent me like 4 files.

#4 -Alex-

    Noob Hunter

  • 2,551 posts
  • Joined: 08-August 06
  • Location: Liverpool / Amsterdam

Posted 10 February 2012 - 20:11

Can you post the files in a zip file on here? Or are they sensitive...

#5 FunRoomSite

    Resident Elite

  • 1,314 posts
  • Joined: 07-May 06

Posted 10 February 2012 - 20:19

View Post-Alex-, on 10 February 2012 - 20:11, said:

Can you post the files in a zip file on here? Or are they sensitive...
Well he told me he doesn't want me sharing them around a lot. But he knows i'm trying to get it on my site which he is fine with. Sooo... :\

BTW, i'm willing to pay someone if they want to do this for me.

#6 -Alex-

    Noob Hunter

  • 2,551 posts
  • Joined: 08-August 06
  • Location: Liverpool / Amsterdam

Posted 10 February 2012 - 21:23

Well I'm willing to do it for free if you can provide the source code :p

#7 FunRoomSite

    Resident Elite

  • 1,314 posts
  • Joined: 07-May 06

Posted 10 February 2012 - 23:35

View Post-Alex-, on 10 February 2012 - 21:23, said:

Well I'm willing to do it for free if you can provide the source code :p
I sent you a PM.

#8 -Alex-

    Noob Hunter

  • 2,551 posts
  • Joined: 08-August 06
  • Location: Liverpool / Amsterdam

Posted 11 February 2012 - 21:23

Just sent you my email address ;)

#9 -Alex-

    Noob Hunter

  • 2,551 posts
  • Joined: 08-August 06
  • Location: Liverpool / Amsterdam

Posted 12 February 2012 - 01:45

Ok, just so the whole community can help out: the OP has a Windows executable, called by a batch script with a couple of arguments, that returns the results of the query into results.txt.

If you have a Windows server for your webhosting, as theblazingangel said, you can set the batch script up on a scheduled task. From there it's easy to write a PHP file that pulls the results from the text file to display it on your site.

....but I guess the main question is, do you use a Windows server for your hosting?

#10 FunRoomSite

    Resident Elite

  • 1,314 posts
  • Joined: 07-May 06

Posted 12 February 2012 - 21:53

View Post-Alex-, on 12 February 2012 - 01:45, said:

Ok, just so the whole community can help out: the OP has a Windows executable, called by a batch script with a couple of arguments, that returns the results of the query into results.txt.

If you have a Windows server for your webhosting, as theblazingangel said, you can set the batch script up on a scheduled task. From there it's easy to write a PHP file that pulls the results from the text file to display it on your site.

....but I guess the main question is, do you use a Windows server for your hosting?
Errrmmm. I don't know honestly. I use bluehost.com to host my site.

#11 -Alex-

    Noob Hunter

  • 2,551 posts
  • Joined: 08-August 06
  • Location: Liverpool / Amsterdam

Posted 12 February 2012 - 22:37

View PostFunRoomSite, on 12 February 2012 - 21:53, said:

Errrmmm. I don't know honestly. I use bluehost.com to host my site.

Create a file called whatever.php containing this:

<?php echo $_SERVER['SERVER_SOFTWARE']; ?>

Upload it to your server, go to dominatedominion.com/whatever.php, copy the output and post it here.

#12 FunRoomSite

    Resident Elite

  • 1,314 posts
  • Joined: 07-May 06

Posted 12 February 2012 - 22:41

View Post-Alex-, on 12 February 2012 - 22:37, said:

Create a file called whatever.php containing this:

<?php echo $_SERVER['SERVER_SOFTWARE']; ?>

Upload it to your server, go to dominatedominion.com/whatever.php, copy the output and post it here.
It says Apache.

#13 -Alex-

    Noob Hunter

  • 2,551 posts
  • Joined: 08-August 06
  • Location: Liverpool / Amsterdam

Posted 12 February 2012 - 22:44

View PostFunRoomSite, on 12 February 2012 - 22:41, said:

It says Apache.
The FULL output... on second thoughts, try this:

<?php echo php_uname('s'); ?>


#14 FunRoomSite

    Resident Elite

  • 1,314 posts
  • Joined: 07-May 06

Posted 12 February 2012 - 23:25

View Post-Alex-, on 12 February 2012 - 22:44, said:

The FULL output... on second thoughts, try this:

<?php echo php_uname('s'); ?>
Now it says Linux. That's the only thing that popped up.

#15 -Alex-

    Noob Hunter

  • 2,551 posts
  • Joined: 08-August 06
  • Location: Liverpool / Amsterdam

Posted 12 February 2012 - 23:27

You're pretty screwed in that case... unless you get a Windows hosting account.

...or you can get the [uncompiled] source code of the .exe file from the guy who gave you the files (doubtful).