can php open webpages for you?

Associate
Joined
24 Jul 2004
Posts
1,580
Location
Preston, Lancs
I have a script that I would like to run every 12 hours or so using a cron job. Thats no problem, its already running fine generating perfectly good results. I would like to add to the script some way of opening 4 different URL's after the current script has run so that I can automatically remake my web page entirely.

I presume the fopen("http://mysite.com/page.php"); would merely open the url as and think of it as text, rather than actively processing the scripts contents?

Im guessing now its going to be another 4 cron jobs required, though I have to submit tickets for the engineers to set this up, which is why ideally I would rather have full control using a script.

Any help? :confused:
 
cURL

however.. this is a 'sloppy' process. You should implement a bash script or similar that you can run immediately from cron to perform all that is required.
 
Unless you're doing anything that you really need PHP for, just get your cron job to wget the URL, headers only.

Code:
wget --spider http://example.com/script.php
 
Last edited:
Back
Top Bottom