Exemplo n.º 1
0
* @author youzu
* @version 1.0.0
* @date 2015-07-07
*/
if (!defined('IN_MOBILE_API')) {
    exit('Access Denied');
}
$body = array('formhash' => $_GET['formhash'], 'srchtxt' => $_GET['keyword'], 'searchsubmit' => 'yes', 'tpp' => 10, 'page' => 1);
if (isset($_GET['tpp'])) {
    $body['tpp'] = $_GET['tpp'];
}
if (isset($_GET['page'])) {
    $body['page'] = $_GET['page'];
}
BigAppAPI::$tpp = $body['tpp'];
BigAppAPI::$page = $body['page'];
if (is_null($body['formhash']) || is_null($body['srchtxt'])) {
    @bigapp_core::result(array('error' => 'param_error'));
}
if (function_exists('iconv')) {
    $body['srchtxt'] = iconv('UTF-8', BIGAPP_CHARSET . '//ignore', $body['srchtxt']);
} else {
    $body['srchtxt'] = mb_convert_encoding($body['srchtxt'], BIGAPP_CHARSET, 'UTF-8');
}
$proto = 'http://';
if (isset($_SERVER['HTTPS']) && 'on' === $_SERVER['HTTPS']) {
    $proto = 'https://';
}
if (isset($_SERVER['SCRIPT_NAME'])) {
    $url = $proto . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];
} else {