本文整理汇总了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) {