Advertisement
interscot

Vimeo testing

Feb 21st, 2018
2,793
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. <?php
  2.  
  3. // Download this file to your WordPress install and name it test.php
  4. // and then access it via test.php?type=vimeo
  5.  
  6. if ($_GET['type']=='vimeo') {
  7.   $url = "https://vimeo.com/api/oembed.json?url=https%3A//vimeo.com/76979871";
  8. } elseif ($_GET['type']=='youtube') {
  9.   $url = 'http://www.youtube.com/oembed?url=http%3A//youtube.com/watch%3Fv%3DM3r2XDceM6A&format=json';
  10. } else {
  11.   die('Must specify type: vimeo/youtube');
  12. }
  13.  
  14. echo "<pre>";
  15. echo "Source IP: " . file_get_contents('https://api.ipify.org') . " (where the script is being called from)\n";
  16. print_r(get_headers($url));
  17.  
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement