Guest User

Untitled

a guest
Jan 23rd, 2021
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. $options  = array (
  2.     'http' =>
  3.         array (
  4.             'ignore_errors' => true,
  5.             'method' => 'DELETE',
  6.             'header' =>
  7.                 array (
  8.                     0 => 'Authorization: login password',
  9.                 ),
  10.         ),
  11. );
  12.  
  13. $context  = stream_context_create( $options );
  14. $response = file_get_contents(
  15.     'https://site.com/wp-json/wp/v2/users/100?reassign=1',
  16.     false,
  17.     $context
  18. );
  19. $response = json_decode( $response );
  20. var_dump($response);
Advertisement
Add Comment
Please, Sign In to add comment