Advertisement
ozh

wp_remote_get with cookie

ozh
Sep 9th, 2011
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.17 KB | None | 0 0
  1. <?php
  2.  
  3. // In a WP environment
  4.  
  5. $cookies = "omg=1";
  6. $headers = array( 'cookie' => $cookies );
  7. var_dump( wp_remote_get( 'http://url/', array( 'headers' => $headers ) ) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement