How can I get the last updated date of the website?

209 Views Asked by At

I tried to get last-modified from the webpage header using get_headers().

<?php
$url = 'http://www.example.com';

print_r(get_headers($url));

print_r(get_headers($url, 1));
?>

But I don't get result, and the code above says that

Warning: get_headers() has been disabled for security reasons in [...][...] on line 4

Warning: get_headers() has been disabled for security reasons in [...][...] on line 6

Does anyone knows how to fix this?

And how to get the headers of the webpage?

Exactly, I want to get the last-updated date or modified.

If that's not available, when the website was created.

0

There are 0 best solutions below