本文整理匯總了PHP中Http::getResult方法的典型用法代碼示例。如果您正苦於以下問題:PHP Http::getResult方法的具體用法?PHP Http::getResult怎麽用?PHP Http::getResult使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Http
的用法示例。
在下文中一共展示了Http::getResult方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isNewBrowscapVersion
function isNewBrowscapVersion()
{
if (!isset($_SESSION['user_browscap_version'])) {
$_SESSION['user_browscap_version'] = getCurrentBrowscapRelease();
}
if (!isset($_SESSION['server_browscap_version'])) {
$server_browscap_version = "";
if (extension_loaded('soap')) {
$http = new Http();
$http->setTimeout(2);
$http->execute("http://www.website-php.com/en/webservices/wsp-information-server.wsdl?wsdl");
$wsdl = $http->getResult();
if ($wsdl != "" && find($wsdl, "<?xml", 1) > 0) {
$client = new WebSitePhpSoapClient("http://www.website-php.com/en/webservices/wsp-information-server.wsdl?wsdl");
$server_browscap_version = $client->getBrowscapVersionNumber();
}
} else {
/*$http = new Http();
$http->setTimeout(2);
$http->execute("http://browsers.garykeith.com/versions/version-number.asp");
$server_browscap_version = $http->getResult();*/
$server_browscap_version = "";
}
if (trim($server_browscap_version) != "") {
$_SESSION['server_browscap_version'] = $server_browscap_version;
}
}
if (trim($_SESSION['user_browscap_version']) != trim($_SESSION['server_browscap_version'])) {
return trim($_SESSION['server_browscap_version']);
}
return false;
}
示例2: folder
}
}
}
if (strlen($tmp_lang) != 2) {
echo "No language defined in WSP lang folder (" . realpath($lang_folder) . ")\n";
exit;
}
if (!rename('install.htaccess', '.htaccess')) {
echo "The apache user has no right to rename the file install.htaccess to .htaccess. Please give the rights on this file to finalize the installation.\n";
exit;
} else {
require_once dirname(__FILE__) . "/../class/utils/HTTP.class.php";
$http = new Http();
$http->execute(BASE_URL . $tmp_lang . "/");
$http_error = $http->getError();
$http_result = $http->getResult();
if ($http->getStatus() >= 400) {
rename('.htaccess', 'install.htaccess');
echo "Please change your configuration to be compatible with <a href='http://www.website-php.com' target='_blank'>WebSite-PHP</a>:<br/>- Webserver needs to support \"<b>AllowOverride <font color='red'>All</font></b>\" for your website directory!<br/><Directory /your_directory><br/> AllowOverride all<br/></Directory><br/>Edit the configuration file httpd.conf of your apache server. In this file you need to find the tag \"Directory\" concerning website folder (i.e.: www) and set the property AllowOverride with the parameter \"All\" as explained before.<br/><a href='http://httpd.apache.org/docs/current/mod/core.html#allowoverride' target='_blank'>http://httpd.apache.org/docs/current/mod/core.html#allowoverride</a><br/><br/>\n";
echo "<b>If you want to use <font color='red'>Alias</font></b> with WebSite-PHP you need to uncomment and configure the line with \"RewriteBase /myAliasName/\" in the file install.htaccess of the framework.<br/><br/>\n";
echo "If all the previous elements are already configured, then your apache server is configure correctly. But may be, do you have an <b>PHP error</b> (ie: memory_limit).<br/>Please, open your php_error.log file and check if there are no error at the time of your last page refresh. And if you find an erreur, correct it; probably in the configuration file php.ini.<br/>";
exit;
}
}
}
if (!defined('FORCE_SERVER_NAME') || FORCE_SERVER_NAME == "") {
$array_server_name = explode('.', $_SERVER['SERVER_NAME']);
} else {
$array_server_name = explode('.', FORCE_SERVER_NAME);
}
if (sizeof($array_server_name) > 1) {