<?php
$id= $_GET['id'];
$url = 'http://vko.su/get/'.$id;
$hdrs = get_headers($url, 1);
$hdrs = array_change_key_case($hdrs, CASE_LOWER);
$link = str_replace(basename($hdrs['location']), getenv('HTTP_HOST') . '_' . basename($hdrs['location']), $hdrs['location']);
//print $link;
header('location: http://vko.su' . $link);
/*
$her = get_headers($url, 1);
$herr = 'http://vko.su'.$her['Location'];
header('location: ' . $herr);
*/
?>