<?php
ob_start();
function facelink($link) {
$link = str_replace ("\u00253A",":",$link);
$link = str_replace ("\u00252F","/",$link);
$link = str_replace ("\u002526","&",$link);
$link = str_replace ("\u00253F","?",$link);
$link = str_replace ("\u00253D","=",$link);
return $link;
}
function faceduzelt($urele)
{
$explode=explode("/",$urele);
$say=count($explode);
$son=$explode[$say-1];
$explode2=explode("_",$son);
$videoaydi=$explode2[0];
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, " Mozilla/5.0 (Windows; U; Windows NT 6.1; tr; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8");
curl_setopt($ch, CURLOPT_HEADER, 0);
//curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_URL, "http://www.facebook.com/ajax/flash/expand_inline.php?target_div=u879823_18&__a=1&v=$v ideoaydi");
$al = curl_exec($ch);
$al = stripslashes($al);
$exp=explode('["video_src","',$al);
$exp=explode("\"],",$exp[1]);
$son=$exp[0];
$json = '{"url": "'.$son.'"}';
$json = json_decode($json);
$json= urldecode($json->{'url'});
return $json;
}
$player = $_GET['link'];
if ((strpos($player,'facebook.com')) or (strpos($player,'fbcdn.net'))) {
$player = faceduzelt($player);
}
$player = str_replace('http://','',$player);
header("Location:http://$player");
?>