Просмотр файла portal_jadmaker/make.php

Размер файла: 2.39Kb
<?php
/* WAP Jad-Maker v1.01 (C) 2007 Aban.Net.Ru */

error_reporting(0);
require_once('pclzip.lib.php');

$is_ok=false;

$url=trim($HTTP_GET_VARS['url']);

unset($c);

if($url)
{
if(strpos($url,'http://')===false)$url='http://'.$url;
$fn='tmp/'.time().rand();

$c=file_get_contents($url);
if($c)
{
$fp=fopen($fn,"w");
if($fp)
{
fputs($fp,$c);
fclose($fp);
chmod($fn,0777);
}
}
}

if($c)
{
$zip = new PclZip($fn);

$c = $zip->extract(PCLZIP_OPT_BY_NAME,"META-INF/MANIFEST.MF", PCLZIP_OPT_EXTRACT_AS_STRING);
$c = $c[0]['content'];
if($c)
{
$a=explode('/',$url);
$jn=str_replace(".jar",".jad",$a[count($a)-1]);

$c=trim(str_replace("\r\n","\n",$c));

$a=explode("\n",$c);
$c='';
foreach($a as $s)
{
if(stripos($s,"MIDlet-Jar-Size:")===false && stripos($s,"MIDlet-Jar-URL:")===false)
{
 $c.=$s."\n";
}
}

$c.="MIDlet-Jar-Size: ".filesize($fn)."\nMIDlet-Jar-URL: ".$url."\n";

header("Content-Type: text/vnd.sun.j2me.app-descriptor");
header("Content-Disposition: attachment; filename=".$jn);
header("Content-Length: ".strlen($c));
echo $c;
$is_ok=true;
}
}

if(file_exists($fn))unlink($fn);
if($is_ok)exit();

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Portal.Wen.Ru - развлекись!</title>
<style type="text/css">
body { font-weight: normal; font-size: normal; font-family: Courier new; color: lime; background-color: #000000 }
a:link,a:active,a:visited { text-decoration: underline; color : blue }
a:hover { text-decoration: none; color : blue }
div { margin: 1px 0px 1px 0px; padding: 0px 0px 0px 0px; font-size: 11px;}
table { margin: 1px 0px 1px 0px; padding: 0px 0px 0px 0px; font-size: 11px;}
.a {margin: 0px; border-top: 1px solid silver; border-left: 1px solid silver; border-right: 1px solid silver; border-bottom: 1px solid silver; padding: 2px; vertical-align: middle; background-color: #00AAEE;  font-size: 11px; color: #000000; }
</style></head>
<body bgcolor="silver"><!--MADE BY Shtirlitz--><div class=a>
<div class=a>

<b>OnLine Jad генератор</b></div></div><div>



Ошибка!
 Возможно вы ввели неверный адрес.<br/>

<a href="index.php">Попробовать еще раз?</a>

</div><div class=a><div class=a>
<b>&#169; Portal.Wen.Ru</b><br/>
Powered by Jad Maker

</div></div></body></html>