NullGet 1.2.0-alpha

发布: 2014-05-28 23:08


  svn 源代码仓库: svn co https://nullget.svn.sourceforge.net/svnroot/nullget nullget

镜像站点: svn co http://gforge.osdn.net.cn/svn/nullget/ nullget


  如果你还没有安装subversion , 请到subversion站点http://subversion.tigris.org/下载最新版本并安装。








$a_url = "http://sourceforge.net/project/showfiles.php?group_id=204368&package_id=243873";
$a_url = "http://sourceforge.net/projects/nullget/files/";
// $a_url = "http://sourceforge.net/projects/nullget/files/nullfxp/";

$pkg_name = "nullget";
$versions = array('2.1.0', '2.0.2', '2.0.1', '2.0.0');
//echo 'SourceForge.net Nullfxp Download page';

$a_c = file($a_url);

// print_r($a_c);

foreach ($versions as $idx => $ver) {

}

$blno = -1;
$elno = 0;
if(!$a_c || count($a_c) == 0 ) {
//echo "Page error. Refresh please.";
echo "SourceForge.net Nullfxp Download page";
}else{
foreach($a_c as $lno => $lv) {
//if(trim($lv) == '') {
// $blno = $lno;
//}
if(strstr(trim($lv), "files_list") != null) {
$blno = $lno;
}

//if(trim($lv) == '
 
') {
// $elno = $lno;
//}
$section_end = false;
if($blno > 0) {
if(trim($lv) == "
") {
$elno = $lno+1;
$section_end = true;
}
}

if($blno > 0 ) {
if($lno == $blno+1 ) {
$lv = str_replace("border=\"0\"", "border=\"1\"", $lv);
}

if($elno == 0 || $lno < $elno) {
if(strstr($lv, "href=\"/") != null) {
$lv = str_replace("href=\"/", "href=\"http://sf.net/", $lv);
}

if(strstr($lv, "href=\"show") != null) {
$lv = str_replace("href=\"show", "href=\"http://sf.net/project/show", $lv);
}

if(strstr($lv, "href=\"mirror") != null) {
$lv = str_replace("href=\"mirror", "target=\"_blank\" href=\"http://sf.net/project/mirror",$lv);
}
if(strstr($lv, "onClick=\"window.location") != null) {
$lv = str_replace("window.location='", "window.location='http://sf.net",$lv);
}
echo $lv;
}
}
if ($section_end) {
break;
}
}
echo "\n";
}

?>



原文: http://qtchina.tk/?q=node/3

Powered by zexport