本文整理汇总了PHP中unknown_type::getConstructResult方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown_type::getConstructResult方法的具体用法?PHP unknown_type::getConstructResult怎么用?PHP unknown_type::getConstructResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unknown_type
的用法示例。
在下文中一共展示了unknown_type::getConstructResult方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkConnection
/**
* Check the connection
*/
public function checkConnection()
{
$connection = false;
if (preg_match("/logout/", $this->_client->getConstructResult(), $matches)) {
$connection = true;
}
return $connection;
}
示例2: logIn
private function logIn()
{
$html = file_get_contents('https://vpnaffiliates.com/affiliates/affiliates/login.php#login');
if (preg_match("/\"S\\\\\",\\\\\"(.*?)\\\\\"/", $html, $matches)) {
$this->_s = $matches[1];
}
$valuesLogin = array(new Oara_Curl_Parameter('D', '{"C":"Gpf_Rpc_Server", "M":"run", "requests":[{"C":"Gpf_Auth_Service", "M":"authenticate", "fields":[["name","value"],["Id",""],["username","' . $this->_credentials["user"] . '"],["password","' . $this->_credentials["password"] . '"],["rememberMe","Y"],["language","en-US"]]}], "S":"' . $this->_s . '"}'));
$loginUrl = 'https://vpnaffiliates.com/affiliates/scripts/server.php?';
$this->_client = new Oara_Curl_Access($loginUrl, $valuesLogin, $this->_credentials);
$this->_loginResult = $this->_client->getConstructResult();
}
示例3: __construct
/**
* Constructor and Login
* @param $credentials
* @return Oara_Network_Publisher_Effiliation
*/
public function __construct($credentials)
{
$user = $credentials['user'];
$password = $credentials['password'];
$loginUrl = 'http://es.publicideas.com/logmein.php';
$valuesLogin = array(new Oara_Curl_Parameter('loginAff', $user), new Oara_Curl_Parameter('passAff', $password), new Oara_Curl_Parameter('userType', 'aff'));
$this->_client = new Oara_Curl_Access($loginUrl, $valuesLogin, $credentials);
$result = json_decode($this->_client->getConstructResult());
$loginUrl = 'http://publisher.publicideas.com/entree_affilies.php';
$valuesLogin = array(new Oara_Curl_Parameter('login', $result->login), new Oara_Curl_Parameter('pass', $result->pass), new Oara_Curl_Parameter('submit', 'Ok'), new Oara_Curl_Parameter('h', $result->h));
$this->_client = new Oara_Curl_Access($loginUrl, $valuesLogin, $credentials);
}
示例4: logIn
private function logIn()
{
$valuesLogin = array(new Oara_Curl_Parameter('_method', 'POST'), new Oara_Curl_Parameter('data[User][username]', $this->_credentials['user']), new Oara_Curl_Parameter('data[User][password]', $this->_credentials['password']));
$loginUrl = 'https://affiliate.hidemyass.com/users/login';
$this->_client = new Oara_Curl_Access($loginUrl, array(), $this->_credentials);
$dom = new Zend_Dom_Query($this->_client->getConstructResult());
$hidden = $dom->query('#loginform input[name*="Token"][type="hidden"]');
foreach ($hidden as $values) {
$valuesLogin[] = new Oara_Curl_Parameter($values->getAttribute("name"), $values->getAttribute("value"));
}
$urls = array();
$urls[] = new Oara_Curl_Request('https://affiliate.hidemyass.com/users/login', $valuesLogin);
$exportReport = $this->_client->post($urls);
}
示例5: __construct
/**
* Constructor and Login
* @param $credentials
* @return Oara_Network_Publisher_Effiliation
*/
public function __construct($credentials)
{
$user = $credentials['user'];
$password = $credentials['password'];
$loginUrl = 'http://es.publicideas.com/logmein.php';
/*
//getting the hidden value
$dom = new Zend_Dom_Query(file_get_contents("http://www.publicidees.es/"));
$results = $dom->query("input[name='h']");
$hValue = null;
foreach ($results as $result) {
$hValue = $result->getAttribute('value');
}
*/
$valuesLogin = array(new Oara_Curl_Parameter('loginAff', $user), new Oara_Curl_Parameter('passAff', $password), new Oara_Curl_Parameter('userType', 'aff'));
$this->_client = new Oara_Curl_Access($loginUrl, $valuesLogin, $credentials);
$result = json_decode($this->_client->getConstructResult());
$loginUrl = 'http://affilie.publicidees.com/entree_affilies.php';
$valuesLogin = array(new Oara_Curl_Parameter('login', $result->login), new Oara_Curl_Parameter('pass', $result->pass), new Oara_Curl_Parameter('submit', 'Ok'), new Oara_Curl_Parameter('h', $result->h));
$this->_client = new Oara_Curl_Access($loginUrl, $valuesLogin, $credentials);
}
示例6: logIn
private function logIn()
{
$dir = COOKIES_BASE_DIR . DIRECTORY_SEPARATOR . $this->_credentials['cookiesDir'] . DIRECTORY_SEPARATOR . $this->_credentials['cookiesSubDir'] . DIRECTORY_SEPARATOR;
$cookieName = $this->_credentials["cookieName"];
$cookies = $dir . $cookieName . '_cookies.txt';
$defaultOptions = array(CURLOPT_USERAGENT => "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:22.0) Gecko/20100101 Firefox/22.0", CURLOPT_RETURNTRANSFER => true, CURLOPT_FAILONERROR => true, CURLOPT_COOKIEJAR => $cookies, CURLOPT_COOKIEFILE => $cookies, CURLOPT_AUTOREFERER => true, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => false, CURLOPT_HEADER => false);
//Init curl
$ch = curl_init();
$options = $defaultOptions;
$options[CURLOPT_URL] = 'http://ref.webhostinghub.com/affiliates/login.php#login';
$options[CURLOPT_FOLLOWLOCATION] = true;
curl_setopt_array($ch, $options);
$result = curl_exec($ch);
if (preg_match("/\"S\\\\\",\\\\\"(.*?)\\\\\"/", $result, $matches)) {
$this->_s = $matches[1];
}
$valuesLogin = array(new Oara_Curl_Parameter('D', '{"C":"Gpf_Rpc_Server", "M":"run", "requests":[{"C":"Gpf_Auth_Service", "M":"authenticate", "fields":[["name","value"],["Id",""],["username","' . $this->_credentials["user"] . '"],["password","' . $this->_credentials["password"] . '"],["rememberMe","Y"],["language","en-US"]]}], "S":"' . $this->_s . '"}'));
$loginUrl = 'http://ref.webhostinghub.com/scripts/server.php';
$this->_client = new Oara_Curl_Access($loginUrl, $valuesLogin, $this->_credentials);
$this->_loginResult = $this->_client->getConstructResult();
}