File size: 4.22Kb
<?
/*
Copyright (c) 2013 LospaCiprian
*/
echo "<link rel=\"styleSheet\" type=\"text/css\" href=\"http://m.wapstar.ro/style.css\"/>";
echo '<div class="surfmen"><b>Meniu Jocuri</b></div>';
echo "<div class=\"surfmen\"><b><a href=\"http://m.wapstar.ro/contact.php\"><img src=\"http://m.wapstar.ro/imagini/contact.png\"></a></b> | <b><a href=\"http://m.wapstar.ro/reclama.php\"><img src=\"http://m.wapstar.ro/imagini/info.png\"></a></b> | <b><a href=\"http://m.wapstar.ro/index.php?actiune=parteneri\"><img src=\"http://m.wapstar.ro/imagini/parteneri.png\"></a></b> | <b><a href=\"http://gb.wapstar.ro/wapstar\"><img src=\"http://m.wapstar.ro/imagini/guestbook.png\"></a></b> | <b><a href=\"http://m.wapstar.ro\"><img src=\"http://m.wapstar.ro/imagini/tvlive.png\"></a></b></div>";
function cut($content,$start,$end){
if($content && $start && $end) {
$r = explode($start, $content);
if (isset($r[1])){
$r = explode($end, $r[1]);
return $r[0];
}
return '';
}
}
function get($url) {
$data = curl_init();
curl_setopt($data, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($data, CURLOPT_URL, $url);
$reivall = curl_exec($data);
curl_close($data);
return $reivall;
}
if ($_GET['d']) {
$d = base64_decode($_GET['d']);
$name = strtolower(basename($d));
$name = str_replace('tomasha.com', $_SERVER['HTTP_HOST'], $name);
function size($url){
$headers = get_headers($url,1);
return $headers['Content-Length'];
}
function type($url){
$headers = get_headers($url,1);
return $headers['Content-Type'];
}
$img = $d;
header("Content-Disposition: attachment; filename=$name");
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control:no-cache, must-revalidate');
header('Pragma: public');
header("content-length:".size($img));
header("Content-type:".type($img));
readfile($img);
exit;
}
if ($_GET['v']) {
$u = get('http://www.tomasha.com/mobile-games/'.$_GET['v'].'.php');
$st = strstr($u, '<div id="items_panel2">');
$ex = explode('<a href="http://www.tomasha.com/download.php', $st);
$title = cut($u, '<title>', '</title>');
echo "<h1>$title</h1>";
for($i = 1; $i <= count($ex)-1; $i++){
$link = explode('url=',$ex[$i]);
$link = explode('"',$link[1]);
$array[] = base64_encode($link[0]);
$array1[] = cut($ex[$i], '<span>', '</span>');
$array2[] = cut($ex[$i], 'src="../../../mobile-games/', '" width=');
}
if ($_GET['p'])
$hal = $_GET['p'];
else $hal = 0;
$jumperhal = 5;
$total = count($ex)-1;
$end = $hal + $jumperhal;
if ($end > $total)
$end = $total;
for($i = $hal; $i < $end ; $i++){
if ($ex[1]) {
echo "<div><img src='http://i.tinysrc.mobi/http://www.tomasha.com/mobile-games/$array2[$i]'><br><a href='?d=$array[$i]'>$array1[$i]</a></div>";
}
}
echo '<div class=header>';
if($ex[1]){
$v = $_GET['v'];
if ($hal > 1){
echo '<a href="?v='.$v.'&p='.($_GET['p']-$jumperhal).'"><< Inapoi </a>';
}else{
echo '<font color=red><< Inapoi </font>';
}
echo '|';
if ($end < $total){
echo ' <a href="?v='.$v.'&p='.$end.'">Inainte >></a>';
}else{
echo '<font color=silver>Next >></font>';
}
}
echo '</div>';
exit;
}
$u = get('http://www.tomasha.com/mobile-games/adventure-mobile-games.php');
$st = cut($u, '<span class="list">Games Category', '<!--Body Ends Here-->');
$ex = explode('<a href="http://www.tomasha.com/mobile', $st);
echo "<center><img src=\"http://m.wapstar.ro/imagini/animee.png\" alt=\"\"/></center>";
for($i = 1; $i <= count($ex); $i++){
$link = cut($ex[$i], '-games/', '.php');
$name = cut($ex[$i], '">', '</a>');
if ($name) {
echo "<li class=pasang><a href='?v=$link'>$name</a>";
}
}
echo "<div class=\"surfmen\"><b><a href=\"http://m.wapstar.ro/contact.php\"><img src=\"http://m.wapstar.ro/imagini/contact.png\"></a></b> | <b><a href=\"http://m.wapstar.ro/reclama.php\"><img src=\"http://m.wapstar.ro/imagini/info.png\"></a></b> | <b><a href=\"http://m.wapstar.ro/index.php?actiune=parteneri\"><img src=\"http://m.wapstar.ro/imagini/parteneri.png\"></a></b> | <b><a href=\"http://gb.wapstar.ro/wapstar\"><img src=\"http://m.wapstar.ro/imagini/guestbook.png\"></a></b> | <b><a href=\"http://m.wapstar.ro\"><img src=\"http://m.wapstar.ro/imagini/tvlive.png\"></a></b></div>";
echo "<br/><br/><center><b><big><a href=\"http://m.wapstar.ro\">meniu principal</a></big></b>";
?>