Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id$
| * $Id: functions_serverstats.php 5379 2011-02-21 11:06:42Z Tomm $
|
*/
function build_server_stats($is_install=1, $prev_version='', $current_version='', $charset='')
| */
function build_server_stats($is_install=1, $prev_version='', $current_version='', $charset='')
|
Zeile 203 | Zeile 203 |
---|
// Check the hosting company if(strpos($_SERVER['HTTP_HOST'], ".") !== false) {
|
// Check the hosting company if(strpos($_SERVER['HTTP_HOST'], ".") !== false) {
|
$host_url = "http://www.whoishostingthis.com/".$_SERVER['HTTP_HOST'];
| $host_url = "http://www.whoishostingthis.com/".str_replace(array('http://', 'www.'), '', $_SERVER['HTTP_HOST']);
|
$hosting = fetch_remote_file($host_url);
if($hosting) {
|
$hosting = fetch_remote_file($host_url);
if($hosting) {
|
preg_match_all('#'.preg_quote('is hosted by:<br />', '#').'[\n\r]*'.preg_quote('<b><a ', '#').'(title="([^"]*)" )?'.preg_quote('href="/linkout/?t=', '#') .'[0-9]'.preg_quote('&url=', '#') .'([^"]*)" (title="([^"]*)" )?rel="external">([^<]*)'.preg_quote('</a>', '#').'#ism', $hosting, $matches);
| preg_match('#We believe \<a href\="http:\/\/www.whoishostingthis.com\/linkout\/\?t\=[0-9]&url\=?([^"]*)" (title="([^"]*)" )target\=\_blank\>([^<]*)\<\/a\>#ism', $hosting, $matches);
|
$info['hosturl'] = "unknown/no-url";
|
$info['hosturl'] = "unknown/no-url";
|
if(isset($matches[3][0]) && strlen(trim($matches[3][0])) != 0)
| if(isset($matches[1]) && strlen(trim($matches[1])) != 0 && strpos($matches[1], '.') !== false)
|
{
|
{
|
$info['hosturl'] = strtolower($matches[3][0]);
| $info['hosturl'] = strtolower($matches[1]);
|
}
|
}
|
if(isset($matches[6][0]) && strlen(trim($matches[6][0])) != 0)
| else if(isset($matches[3]) && strlen(trim($matches[3])) != 0 && strpos($matches[3], '.') !== false)
|
{
|
{
|
$info['hostname'] = $matches[6][0];
| $info['hosturl'] = strtolower($matches[3]);
|
}
|
}
|
elseif(isset($matches[5][0]) && strlen(trim($matches[5][0])) != 0)
| if(isset($matches[4]) && strlen(trim($matches[4])) != 0)
|
{
|
{
|
$info['hostname'] = $matches[5][0];
| $info['hostname'] = $matches[4];
|
}
|
}
|
elseif(isset($matches[4][0]) && strlen(trim($matches[4][0])) != 0)
| elseif(isset($matches[3]) && strlen(trim($matches[3])) != 0)
|
{
|
{
|
$info['hostname'] = str_replace(array('title=', '"'), '', $matches[4][0]);
| $info['hostname'] = $matches[3];
|
}
|
}
|
elseif(isset($matches[1][0]) && strlen(trim($matches[1][0])) != 0)
| elseif(isset($matches[2]) && strlen(trim($matches[2])) != 0)
|
{
|
{
|
$info['hostname'] = str_replace(array('title=', '"'), '', $matches[1][0]);
| $info['hostname'] = str_replace(array('title=', '"'), '', $matches[2][0]);
|
} elseif(strlen(trim($info['hosturl'])) != 0 && $info['hosturl'] != "unknown/no-url") {
| } elseif(strlen(trim($info['hosturl'])) != 0 && $info['hosturl'] != "unknown/no-url") {
|
Zeile 276 | Zeile 276 |
---|
$amp = "&"; }
|
$amp = "&"; }
|
$server_stats_url = 'http://mybboard.net/stats.php?'.$string;
| $server_stats_url = 'http://www.mybb.com/stats.php?'.$string;
|
$return = array(); $return['info_sent_success'] = false;
| $return = array(); $return['info_sent_success'] = false;
|
Zeile 284 | Zeile 284 |
---|
{ $return['info_sent_success'] = true; }
|
{ $return['info_sent_success'] = true; }
|
$return['info_image'] = "<img src='http://mybboard.net/stats.php?{$string}&img=1' />";
| $return['info_image'] = "<img src='http://www.mybb.com/stats.php?{$string}&img=1' />";
|
$return['info_get_string'] = $string;
return $return;
| $return['info_get_string'] = $string;
return $return;
|