|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
||||
|
||||
|
Another Way?
Hey i have a cronjob set to run every 24 hours and to use wget to run a php script which sends emails out to users about a certain topic they have selected. This all works fine but in my root folder (above public_html) it stores a copy of the php file wget runs and i want to know is there a way of not making it download to the root folder?
|
|
#2
|
||||
|
||||
|
RE: Another Way?
Forgot to say my command is
WGET /public_html/email.php i presume it works because i get an email about my user every day. |
|
#3
|
||||
|
||||
|
RE: Another Way?
Why use wget at all? Why don't you just run the script via the php command line:
php -f /public_html/email.php |
|
#4
|
||||
|
||||
|
RE: Another Way?
ok thanks.
|
|
#5
|
|||
|
|||
|
RE: Another Way?
The problem with calling PHP directly (above) is that in many cases you only have the module installed, not the executable
I _always_ use cURL - the method below works flawlessly Most servers have cURL installed (if not go get it from http://www.haxx.se) cURL is a command-line based tool similar to wget but with many more options and facilities Then add into your crontab something along the lines of /usr/bin/curl http://www.myserver.dom/somecode.php It's a good idea to have the line MAILTO='' somewhere above this in your cron or root will end up getting an email of the HTML |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Programming Theory > Another Way? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|