Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getMCModifiedDate() {
- $curl = curl_init($this->mcURL);
- //don't fetch the actual page, you only want headers
- curl_setopt($curl, CURLOPT_NOBODY, true);
- //stop it from outputting stuff to stdout
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
- // attempt to retrieve the modification date
- curl_setopt($curl, CURLOPT_FILETIME, true);
- $result = curl_exec($curl);
- if ($result === false) {
- die (curl_error($curl));
- }
- $timestamp = curl_getinfo($curl, CURLINFO_FILETIME);
- if ($timestamp != -1) { //otherwise unknown
- return $timestamp;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement