StuartTP
2010-03-03, 12:26
Hello,
I have a php script that rebuilds some pages on a website and would like to run it in a cron job. The best way appears to be to use the CURL command.
The script can be run from a browser simply by calling it:
http://mydomain.com/index.php?page=build&auth=password
I have tried calling it from the command line using the following:
1) /usr/bin/curl http://mydomain.com/index.php?page=build&auth=password
2) /usr/bin/curl http://mydomain.com/index.php?page=build%26auth=password
3) /usr/bin/curl http://mydomain.com/index.php?page=build%26auth%3dpassword
4) /usr/bin/curl http://mydomain.com/index.php?page%3dbuild%26auth%3dpassword
5) /usr/bin/curl http://mydomain.com/index.php%3fpage%3dbuild%26auth%3dpassword
All of which fail!
Can anyone help?
Many thanks,
Stuart.
I have a php script that rebuilds some pages on a website and would like to run it in a cron job. The best way appears to be to use the CURL command.
The script can be run from a browser simply by calling it:
http://mydomain.com/index.php?page=build&auth=password
I have tried calling it from the command line using the following:
1) /usr/bin/curl http://mydomain.com/index.php?page=build&auth=password
2) /usr/bin/curl http://mydomain.com/index.php?page=build%26auth=password
3) /usr/bin/curl http://mydomain.com/index.php?page=build%26auth%3dpassword
4) /usr/bin/curl http://mydomain.com/index.php?page%3dbuild%26auth%3dpassword
5) /usr/bin/curl http://mydomain.com/index.php%3fpage%3dbuild%26auth%3dpassword
All of which fail!
Can anyone help?
Many thanks,
Stuart.