I am trying to get the header url of the url the redirect me to a different page. I am not interested on the original referrer, my goal is to pull out the url of the landing page of the url I input. Below is an example of url that redirects me to different location. I have tried doing the code below but still no luck, it is just giving me errors
<?php
$url = "http://gateway.play44.net:3010/old/videos/one-punch_man_-_03.mp4?st=xV6C9jBU17ALqrMSAWriLA&e=1447624008&server=video44";
$headers = get_headers($url);
$code = $headers[0];
?>
Original Referrer
Landing Page of the original referrer (I want to pull this on out using the original referrer)
http://s3.videobug.net/O/one-punch_man_-_03.mp4?st=k99nV8wxJ8nuqiDVWzFMqg&e=1447624008&start=0