Authored by 梁志锋

Merge remote-tracking branch 'origin/master'

... ... @@ -152,9 +152,11 @@ class Yohobuy
* @parma mixed $cache 控制是否启用接口数据的缓存(时间单位为秒). 如3600表示缓存1小时, false表示不缓存
* @param bool $returnJson 控制是否返回json格式数据
* @param int $timeout 超时时间
* @param null $userAgent
* @param bool $useGzip 是否启用Gzip
* @return mixed
*/
public static function get($url, $data = array(), $cache = false, $returnJson = false, $timeout = 5, $userAgent = null)
public static function get($url, $data = array(), $cache = false, $returnJson = false, $timeout = 5, $userAgent = null, $useGzip = true)
{
// 销毁私钥参数
if (isset($data['private_key'])) {
... ... @@ -175,6 +177,9 @@ class Yohobuy
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
if ($useGzip) {
curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
}
if (!empty($userAgent)) {
curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);
}
... ...
... ... @@ -31,7 +31,7 @@ class SearchData
case 'production':
case 'release':
//return 'http://search.yoho.cn/yohosearch/search.json';
return 'http://101.201.178.220/yohosearch/search.json'; //return 'http://100.98.132.63/yohosearch/search.json';
return 'http://search.yohoops.org/yohosearch/search.json'; //return 'http://100.98.132.63/yohosearch/search.json';
case 'preview':
return 'http://101.200.31.165/yohosearch/search.json';
case 'test':
... ...
[memcached]
master.hosts=192.168.166.16:12111,192.168.166.17:12111,192.168.166.18:12111
slave.hosts=192.168.166.16:12112,192.168.166.17:12112,192.168.166.18:12112
session.hosts=192.168.166.16:12111,192.168.166.17:12111,192.168.166.18:12111
master.hosts=memcache1.yohoops.org:12111,memcache2.yohoops.org:12111,memcache3.yohoops.org:12111
slave.hosts=memcache1.yohoops.org:12112,memcache2.yohoops.org:12112,memcache3.yohoops.org:12112
session.hosts=memcache1.yohoops.org:12111,memcache2.yohoops.org:12111,memcache3.yohoops.org:12111
[redis]
servers.hosts=127.0.0.1:6379
\ No newline at end of file
... ...
[memcached]
master.hosts=10.66.1.6:12111,10.66.1.7:12111,10.66.1.8:12111
slave.hosts=10.66.1.6:12112,10.66.1.7:12112,10.66.1.8:12112
session.hosts=10.66.1.6:12111,10.66.1.7:12111,10.66.1.8:12111
master.hosts=memcache1.yohoops.org:12111,memcache2.yohoops.org:12111,memcache3.yohoops.org:12111
slave.hosts=memcache1.yohoops.org:12112,memcache2.yohoops.org:12112,memcache3.yohoops.org:12112
session.hosts=memcache1.yohoops.org:12111,memcache2.yohoops.org:12111,memcache3.yohoops.org:12111
[redis]
servers.hosts=127.0.0.1:6379
\ No newline at end of file
... ...
[memcached]
master.hosts=10.66.1.6:12111,10.66.1.7:12111,10.66.1.8:12111
slave.hosts=10.66.1.6:12112,10.66.1.7:12112,10.66.1.8:12112
session.hosts=10.66.1.6:12111,10.66.1.7:12111,10.66.1.8:12111
master.hosts=10.66.101.9:12111,10.66.101.9:12111,10.66.101.9:12111
slave.hosts=10.66.101.9:12112,10.66.101.9:12112,10.66.101.9:12112
session.hosts=10.66.101.9:12111,10.66.101.9:12111,10.66.101.9:12111
[redis]
servers.hosts=127.0.0.1:6379
\ No newline at end of file
... ...
[memcached]
master.hosts=10.66.101.9:11111,10.66.101.9:11211,10.66.101.9:11311
slave.hosts=10.66.101.9:11111,10.66.101.9:11211,10.66.101.9:11311
session.hosts=10.66.101.9:11111,10.66.101.9:11211,10.66.101.9:11311
master.hosts=memcache1.yohoops.org:12111,memcache2.yohoops.org:12111,memcache3.yohoops.org:12111
slave.hosts=memcache1.yohoops.org:12112,memcache2.yohoops.org:12112,memcache3.yohoops.org:12112
session.hosts=memcache1.yohoops.org:12111,memcache2.yohoops.org:12111,memcache3.yohoops.org:12111
[redis]
servers.hosts=127.0.0.1:6379
\ No newline at end of file
... ...
[memcached]
master.hosts=10.66.101.9:11111,10.66.101.9:11211,10.66.101.9:11311
slave.hosts=10.66.101.9:11111,10.66.101.9:11211,10.66.101.9:11311
session.hosts=10.66.101.9:11111,10.66.101.9:11211,10.66.101.9:11311
master.hosts=memcache1.yohoops.org:12111,memcache2.yohoops.org:12111,memcache3.yohoops.org:12111
slave.hosts=memcache1.yohoops.org:12112,memcache2.yohoops.org:12112,memcache3.yohoops.org:12112
session.hosts=memcache1.yohoops.org:12111,memcache2.yohoops.org:12111,memcache3.yohoops.org:12111
[redis]
servers.hosts=127.0.0.1:6379
\ No newline at end of file
... ...
[memcached]
master.hosts=10.66.101.9:11111,10.66.101.9:11211,10.66.101.9:11311
slave.hosts=10.66.101.9:11111,10.66.101.9:11211,10.66.101.9:11311
session.hosts=10.66.101.9:11111,10.66.101.9:11211,10.66.101.9:11311
master.hosts=10.66.101.9:12111,10.66.101.9:12111,10.66.101.9:12111
slave.hosts=10.66.101.9:12112,10.66.101.9:12112,10.66.101.9:12112
session.hosts=10.66.101.9:12111,10.66.101.9:12111,10.66.101.9:12111
[redis]
servers.hosts=127.0.0.1:6379
\ No newline at end of file
... ...