Mini Shell
<?php
function grab_link($url, $referer = '', $var = '', $cookie) {
$headers = array(
"User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/3.0.1.1",
"Content-Type: application/x-www-form-urlencoded",
"Referer: " . $url,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, $referer);
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
if ($var) {
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $var);
}
curl_setopt($ch, CURLOPT_URL, $url);
return curl_exec($ch);
}
$url = $_GET['url'];
$data = grab_link($url, $url, '', '');
echo $data;