Forum Moderators: coopster

Message Too Old, No Replies

PHP and cron using Cpanel.

How to pass variables using get.

         

TerryLM

9:50 pm on Nov 17, 2006 (gmt 0)

10+ Year Member



Ok I have a script that a friend of mine wrote in php.

The script updates ONLY by hitting the page with a browser.

I've tried using

wget -O /dev/null user:pass@http://members.mydomain.com/script.php?update=true

and

php /home/mydir/public_html/members/script.php?update=true

I've even used:

wget -post-data 'update=true' user:pass@http://members.mydomain.com/script.php

The only thing I can get to not error on me is:
wget -O /dev/null -post-data "update=true" user:pass@http://members.mydomain.com/script.php

That simply returns my shell prompt without any errors. It doesn't update the page.

I'm using Cpanel and I don't know if that may be the problem or what...

My absolute basic question is...

How do I call this url via cron/shell and have it update?
[members.mydomain.com...]

I'm pulling my hair out here and my "buddy" won't work on this unless I'm paying him because he says the script is fine! - UH!

Thanks in advance. :)

dreamcatcher

7:53 am on Nov 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi TerryLM,

Try the following command in CPanel:

php -q /home/mydir/public_html/members/script.php?update=true

dc

inbound

1:32 pm on Nov 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think the post by jamesa in [webmasterworld.com...] may help. It deals with running a PHP command from the CLI and passing parameters.