Advertisement
cuonic

Untitled

Sep 7th, 2012
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.99 KB | None | 0 0
  1. <?php
  2.  
  3. // SimpleXML Calendar test :
  4.  
  5. echo "[STATUS] (" . microtime() . ") Started SimpleXML test" . "<br/><br/>" . "\r\n";
  6.  
  7. $xml = simplexml_load_file("https://www.google.com/calendar/feeds/cuonic%40gmail.com/private-902ba81ec27511383b3d504f9916e056/basic");
  8.  
  9. var_dump($sxml);
  10. echo "<br/><br/>";
  11.  
  12. echo "[STATUS] (" . microtime() . ") Finished SimpleXML test" . "<br/><br/>" . "\r\n";
  13.  
  14. // Curl Calendar test :
  15.  
  16. echo "[STATUS] (" . microtime() . ") Started Curl test" . "<br/><br/>" . "\r\n";
  17.  
  18. $curl = curl_init("https://www.google.com/calendar/feeds/cuonic%40gmail.com/private-902ba81ec27511383b3d504f9916e056/basic");
  19. curl_setopt($curl, CURLOPT_TIMEOUT, 10);
  20. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
  21. curl_setopt($curl, CURLOPT_HEADER, FALSE);
  22. curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
  23.    
  24. $result = curl_exec($curl);
  25.    
  26. curl_close($curl);
  27.  
  28. echo $result;
  29. echo "<br/><br/>";
  30.  
  31. echo "[STATUS] (" . microtime() . ") Finished Curl test" . "<br/><br/>" . "\r\n";
  32.    
  33. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement