Changeset 646378
- Timestamp:
- 12/31/2012 01:09:00 PM (13 years ago)
- File:
-
- 1 edited
-
debug-this/trunk/debug-this.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
debug-this/trunk/debug-this.php
r646374 r646378 168 168 $url = get_bloginfo('url') . '/' . $wp->request . "?$query_string"; 169 169 170 #Se ndauth headers for remote fetch170 #Set auth headers for remote fetch 171 171 $cookie_string = ''; 172 172 foreach($_COOKIE as $k => $v) 173 173 $cookie_string .= $k . '=' . urlencode($v) . '; '; 174 174 $cookie_string = trim($cookie_string, '; '); 175 $context = stream_context_create(array('http' => array('header' => "Cookie: $cookie_string"))); 176 177 $buffer = file_get_contents($url, false, $context); 175 $headers = array( 176 'Cookie' => $cookie_string 177 ); 178 179 $http = new WP_Http; 180 $response = $http->request($url, array('method' => 'GET', 'headers' => $headers)); 181 $buffer = $response['body']; 178 182 179 183 preg_match('/%DEBUG_TIME%(.+)%\/DEBUG_TIME%/', $buffer, $matches);
Note: See TracChangeset
for help on using the changeset viewer.