Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. <?php
  2.  
  3. // Server 1
  4.  
  5. if(!class_exists("JFactory")){ // no Joomla
  6.  
  7. header('Authorization: Bearer 123456789');
  8.  
  9. } else { // Joomla framework loaded
  10.  
  11. $app = JFactory::getApplication();
  12. $app->setHeader('Authorization: ', 'Bearer 123456789');
  13. $app->sendHeaders();
  14. }
  15.  
  16. <?php
  17.  
  18. // Server 2
  19.  
  20. $headers = get_headers("http://server1.com/");
  21.  
  22. foreach($headers as $header) {
  23.  
  24. echo $header ."<br/>";
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement