Executing php scripts

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
phaiz
A semi-regular
A semi-regular
Posts: 28
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Jul 24, 2014 9:48 pm

Executing php scripts

Post by phaiz »

I have a "Seeder Program" on my TF2 game servers which gives players certain rewards for helping to fill empty servers. This program is ran by a php script which automatically tracks the program requirements and then adds the players to a Sourcebans group.

The problem I am running into is executing this script through the console. I am able to successfully execute the script by visiting the page in a web browser with ?raw=1 added after index.php. If I try to execute it with any known console command, it does not work. I have tried the following

php index.php
php index.php?raw=1
php index.php raw=1

Running "php index.php?raw=1" returns
Could not open input file: index.php?raw=1

Running both "php index.php" or "php index.php raw=1 returns the entire script in the console, but doesn't actually execute it.

This is making us think that something is wrong with the commands we are using, or maybe something is missing elsewhere.

Does anyone there have an idea on this?
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Executing php scripts

Post by soja »

Try lynx,
lynx -dump http://mywebsite.com/index.php?raw=1

This can be ran in a cron job as well.
Not a NFO employee
phaiz
A semi-regular
A semi-regular
Posts: 28
Joined: Thu Jul 24, 2014 9:48 pm

Re: Executing php scripts

Post by phaiz »

soja wrote:Try lynx,
lynx -dump http://mywebsite.com/index.php?raw=1

This can be ran in a cron job as well.
I will give this a shot once I have someone to test it on. Thanks!
Post Reply