<?php
/*
	[Phpup.Net!] (C)2009-2011 Phpup.net.
	This is NOT a freeware, use is subject to license terms

	$Id: getinfo.php 2010-08-24 10:42 $
*/
define('IN_PHPUP',1);
date_default_timezone_set('Asia/Shanghai');
define('ROOT_PATH',str_replace('models','',dirname(__FILE__)));
include ROOT_PATH.'/inc/curl.class.php';
include ROOT_PATH.'/inc/rep.inc.php';
include ROOT_PATH.'/data/cache/setting.php';
include ROOT_PATH.'/data/config.inc.php';
header("Content-type:text/html;charset=".$GLOBALS['charset']);

$curl=new curl();
$r=array();
if(!empty($_REQUEST['url']))
{
	$regurl=trim(strip_tags($_REQUEST['url']));
	foreach($apirep as $k=>$v)
	{
		$reg=explode('=',$v[1]);
		$r[$k]=explode('-',$reg[0]);
	}

	$content=$curl->get($regurl);
	$content=substr($content,0,500);
	
	$mykey='hao123';
	foreach($r as $k=>$v)
	{
		$count=count($v);
		$a=0;
		foreach($v as $key=>$val)
		{
			if(strpos($content,$val))
			{
				$a++;
			}
		}
		if($a==$count)
		{
			$mykey=$k;
			break;
		}
	}
	exit($apirep[$mykey][0]);
}