本文整理匯總了PHP中Curl\Curl::setReferer方法的典型用法代碼示例。如果您正苦於以下問題:PHP Curl::setReferer方法的具體用法?PHP Curl::setReferer怎麽用?PHP Curl::setReferer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Curl\Curl
的用法示例。
在下文中一共展示了Curl::setReferer方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: query
public function query($dmName, $force = false)
{
'http://whois.chinaz.com/?DomainName=teqhost.cn';
$curl = new Curl();
$curl->setReferer($this->url);
$page = $curl->get($this->url, array('DomainName' => $dmName));
//有時間完善
}
示例2: query
public function query($dmName, $force = false)
{
//'http://reports.internic.net/cgi/whois?whois_nic=baidu.com&type=domain';
$curl = new Curl();
$curl->setReferer($this->refererUrl);
$Punycode = new Punycode();
$page = $curl->get($this->url, array('whois_nic' => $Punycode->encode($dmName), 'type' => 'domain'));
return $this->parse($page);
}
示例3: query
public function query($dmName, $force = false)
{
//'https://whois.cnnic.net.cn/WhoisServlet?queryType=Domain&domain=teqhost.cn';
$curl = new Curl();
$curl->setReferer($this->refererUrl);
$curl->setOpt(CURLOPT_SSL_VERIFYPEER, false);
$Punycode = new Punycode();
$page = $curl->get($this->url, array('domain' => $Punycode->encode($dmName), 'queryType' => 'Domain'));
return $this->parse($page);
}
示例4: Curl
<?php
require __DIR__ . "/../vendor/autoload.php";
use Curl\Curl;
$curl = new Curl();
/*$url='http://new.yangyue.com.cn/renhao_gv1_sjz/yzm.php';
$cookie_jar = dirname(__FILE__)."/pic.cookie";
echo $cookie_jar;
$curl->setCookieJar($cookie_jar);
$curl->setUserAgent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/47.0.2526.73 Chrome/47.0.2526.73 Safari/537.36");
$g=$curl->get($url);
print_r($curl->rawResponseHeaders);
echo '<br />';
print_r($curl->rawRequestHeaders);
echo '<br />';
echo $g;*/
$names = $_COOKIE[session_name()];
$host = $_SERVER['HTTP_HOST'];
$cookie_jar = dirname(__FILE__) . "/" . $host . '/' . $names;
$url = 'http://new.yangyue.com.cn/renhao_gv1_sjz/phphandle/vote.php';
$i = isset($_GET['i']) ? (int) $_GET['i'] : 53;
$tel = isset($_GET['tel']) ? (int) $_GET['tel'] : 1;
$yzm = isset($_GET['yzm']) ? (int) $_GET['yzm'] : '';
$data = array('i' => $i, 'tel' => $tel, 'yzm' => $yzm);
$curl->setReferer("http://new.yangyue.com.cn/renhao_gv1_sjz/index.php?from=timeline&isappinstalled=0");
$curl->setCookieFile($cookie_jar);
$getData = $curl->post($url, $data);
echo $getData;
示例5: query
public function query($dmName, $force = false)
{
$curl = new Curl();
$curl->setReferer($this->url);
$page = $curl->get($this->url, array('domain' => $dmName));
}