$GLOBALS['google']['ad_type'] = 'text_image'; $GLOBALS['google']['channel'] = ''; $GLOBALS['google']['client'] = 'pub-2389600000216179'; $GLOBALS['google']['format'] = 'mobile_single'; $GLOBALS['google']['https'] = read_global('HTTPS'); $GLOBALS['google']['ip'] = read_global('REMOTE_ADDR'); $GLOBALS['google']['markup'] = 'chtml'; $GLOBALS['google']['oe'] = 'utf8'; $GLOBALS['google']['output'] = 'chtml'; $GLOBALS['google']['ref'] = read_global('HTTP_REFERER'); $GLOBALS['google']['url'] = read_global('HTTP_HOST') . read_global('REQUEST_URI'); $GLOBALS['google']['useragent'] = read_global('HTTP_USER_AGENT'); $google_dt = time(); google_set_screen_res(); google_set_muid(); function read_global($var) { return isset($_SERVER[$var]) ? $_SERVER[$var] : ''; } function google_append_url(&$url, $param, $value) { $url .= '&' . $param . '=' . urlencode($value); } function google_append_globals(&$url, $param) { google_append_url($url, $param, $GLOBALS['google'][$param]); } function google_append_color(&$url, $param) { global $google_dt;
function google_show_ad($id, $channel = '') { global $bnc_wptouch_version; $ad = ''; $GLOBALS['google']['client'] = $id; $GLOBALS['google']['channel'] = $channel; $google_dt = time(); google_set_screen_res(); google_set_muid(); $snoopy = new Snoopy(); $snoopy->agent = 'WPtouch ' . $bnc_wptouch_version; $ad = ''; $result = $snoopy->fetch(google_get_ad_url()); if ($result) { $ad = $snoopy->results; } return $ad; }