Using get_headers in WordPress
-
I’m trying to access the ‘Last-Modified’ meta data for a file, however I haven’t managed to get it working inside of WordPress.
Outside of WordPress, this works fine:
$remoteheaders = get_headers($url, 1); echo $remoteheaders['Last-Modified'];
However, that function won’t run inside the WP API. I’ve seen that there are two WP functions, wp_get_http and wp_get_http_headers, but i haven’t gotten either to work.
Can anyone provide a working example to doing this?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Using get_headers in WordPress’ is closed to new replies.