fauzanjeg

Debug, Result of response using wp_remote_get

May 3rd, 2021 (edited)
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. /* Debug, Result of response using wp_remote_get */
  2. function debug() {
  3.     $instagram = wp_remote_get(
  4.         'https://www.instagram.com/rakapuckarpunktcom/?__a=1',
  5.         array(
  6.             'timeout' => 10,
  7.         )
  8.     );
  9.  
  10.     echo 'Instagram: ';
  11.     var_dump( wp_remote_retrieve_response_message( $instagram ) );
  12.     echo '<br>';
  13.     $facebook = wp_remote_get(
  14.         'https://www.facebook.com/rakapuckarcom/',
  15.         array(
  16.             'timeout' => 10,
  17.         )
  18.     );
  19.  
  20.     echo 'Facebook: ';
  21.     var_dump( wp_remote_retrieve_response_message( $facebook ) );
  22.     var_dump( $facebook );
  23.  
  24. }
  25.  
  26. add_action( 'jnews_after_body', 'debug' );
Add Comment
Please, Sign In to add comment