Advertisement
Guest User

Untitled

a guest
Aug 15th, 2011
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1. $ch = curl_init('http://t.co/4iO338e');
  2. curl_setopt($ch, CURLOPT_HEADER, 1);
  3. curl_setopt($ch, CURLOPT_NOBODY, 1);
  4. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  5. preg_match("#Location: (.*)\r\n#", curl_exec($ch), $result);
  6. dump($result[1], curl_getinfo($ch));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement