November 9th, 1999, 08:54 AM
Is it possible to get a php3 script to check what day it is, and then do some stuff, If it’s let’s say Monday?
This without you doing anything. Like a background - or cronjob…
I guess you would use perl or something to do this, but that is not an option I have.!.
November 10th, 1999, 06:14 PM
1) Compile the PHP CGI version (leave off --with-apache from the ./configure command) and then use CRON to run your script.
2) Use cron to call Lynx with the '-dump' command line option and the URL to the PHP page that does the work.
November 17th, 1999, 11:34 AM
My access level is "user" meaning, I can't recompile anything, I do not have cgi-access... That is my problem.
The only thing I do have access to is php3.
Can you make a php3-script, that "sleeps" for 24 houres "wakesup" checks the date do some other stuff. "sleeps" ...... ect...
November 18th, 1999, 09:24 AM
The only way to do this is with a cron job. If your host doesn't allow this you're pretty much SOL.
A tricky alternative is to have this done by your index page (assuming your site is visited fairly often). Program in a time check and if it's past the time you want, include() the script you want run. Now, the first user to visit the index page after the "trigger time" will cause it to be run.
[This message has been edited by rod k (edited 11-18-99).]
November 18th, 1999, 04:28 PM
Damm! I knew it..
Well I just have to convince somebody that it is a good idear, so that I can get my cron job.!.
November 18th, 1999, 05:45 PM
Well do you have shell access?? If so, you can compile your own copy of PHP in your home directory and then make cron jobs to run it as the interpreter instead of the system-wide copy of PHP.
November 19th, 1999, 02:25 AM
I have wery limited access to the system, meaning:
I have php3 as the only alternative to html...
November 19th, 1999, 07:08 PM
Do you know what type of hardware (Sun, Intel, etc) and what OS (FreeBSD, Solaris, Linux) your ISP runs?
If so, it's not too hard to find someone who'll compile a copy of PHP for you. Then all you should need to do is FTP upload the PHP executable and .ini file to your home directory and call it from there.
If your ISP runs Intel i386/Linux I'd be happy to send you a pre-compiled PHP.
[This message has been edited by jpenix (edited 11-19-99).]
November 24th, 1999, 09:38 AM
What a fine idear!
My ISP is running Intel with a Debian OS
Is that the info you need to compile a php3 for me.. :-)
But I still have to start the thing... NOT having access to cron jobs, how is that done...?
November 29th, 1999, 09:55 PM
Hey Ulrik - Okay, I'm sure I could cough up an executable that'll run on x86 Debian.
Contact me off this board at firstname.lastname@example.org and let me know what options you want compiled into the PHP (if any), and give me an email I can send the file to.