0
votes

I'm attempting to set up a cron job to visit multiple url's once a day. I've scheduled the command in my plesk interface to visit a .php file and it visits the requested file OK.

What script would I use inside of the .php file on my server to visit the urls?

Would it be something like...

wget -q -O- http://www.example.com
wget -q -O- http://www.example.com/page

thanks for any help.

1

1 Answers

0
votes

If you're trying to visit a url/pull information from a URL, why not use cURL?

$ch = curl_init(); 
// set url 
curl_setopt($ch, CURLOPT_URL, "example.com"); 

//return the transfer as a string 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 

// $output contains the output string
$output = curl_exec($ch); 
// close curl resource to free up system resources 
curl_close($ch);