Title: Using get_headers in WordPress
Last modified: August 19, 2016

---

# Using get_headers in WordPress

 *  [jweikelinteractive](https://wordpress.org/support/users/jweikelinteractive/)
 * (@jweikelinteractive)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/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)

 *  Thread Starter [jweikelinteractive](https://wordpress.org/support/users/jweikelinteractive/)
 * (@jweikelinteractive)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/using-get_headers-in-wordpress/#post-1847303)
 * Nevermind, solved the issue. When working inside the wordpress api, use all lowercase
   letters. For example, ‘Last-Modified’ would be ‘last-modified’.

Viewing 1 replies (of 1 total)

The topic ‘Using get_headers in WordPress’ is closed to new replies.

## Tags

 * [headers](https://wordpress.org/support/topic-tag/headers/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [request](https://wordpress.org/support/topic-tag/request/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [jweikelinteractive](https://wordpress.org/support/users/jweikelinteractive/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/using-get_headers-in-wordpress/#post-1847303)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
