This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11927 - <?php $GLOBALS['google']['ad_type']='text_image'; $GLOBALS['google']['channel']='1703687091'; $GLOBALS['google']['client']='pub-7525996935542119'; $GLOBALS['google']['color_border']='6699CC'; $GLOBALS['google']['color_bg']='003366'; $GLOBALS['google']['co
Summary: <?php $GLOBALS['google']['ad_type']='text_image'; $GLOBALS['google']['channel...
Status: RESOLVED INVALID
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-31 14:48 UTC by contributor
Modified: 2011-08-04 05:14 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2011-01-31 14:48:22 UTC
Specification: http://www.w3.org/TR/html5/Overview.html
Section: http://www.whatwg.org/specs/web-apps/current-work/#top

Comment:
<?php

$GLOBALS['google']['ad_type']='text_image';
$GLOBALS['google']['channel']='1703687091';
$GLOBALS['google']['client']='pub-7525996935542119';
$GLOBALS['google']['color_border']='6699CC';
$GLOBALS['google']['color_bg']='003366';
$GLOBALS['google']['color_link']='FFFFFF';
$GLOBALS['google']['color_text']='AECCEB';
$GLOBALS['google']['color_url']='AECCEB';
$GLOBALS['google']['format']='mobile_double';
$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();
google_set_via_and_accept();
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;
  $color_array = split(',', $GLOBALS['google'][$param]);
  google_append_url($url, $param,
		    $color_array[$google_dt % sizeof($color_array)]);
}

function google_set_screen_res() {
  $screen_res = read_global('HTTP_UA_PIXELS');
  if ($screen_res == '') {
    $screen_res = read_global('HTTP_X_UP_DEVCAP_SCREENPIXELS');
  }
  if ($screen_res == '') {
    $screen_res = read_global('HTTP_X_JPHONE_DISPLAY');
  }
  $res_array = split('[x,*]', $screen_res);
  if (sizeof($res_array) == 2) {
    $GLOBALS['google']['u_w'] = $res_array[0];
    $GLOBALS['google']['u_h'] = $res_array[1];
  }
}

function google_set_muid() {
  $muid = read_global('HTTP_X_DCMGUID');
  if ($muid != '') {
    $GLOBALS['google']['muid'] = $muid;
  }
  $muid = read_global('HTTP_X_UP_SUBNO');
  if ($muid != '') {
    $GLOBALS['google']['muid'] = $muid;
  }
  $muid = read_global('HTTP_X_JPHONE_UID');
  if ($muid != '') {
    $GLOBALS['google']['muid'] = $muid;
  }
  $muid = read_global('HTTP_X_EM_UID');
  if ($muid != '') {
    $GLOBALS['google']['muid'] = $muid;
  }
}

function google_set_via_and_accept() {
  $ua = read_global('HTTP_USER_AGENT');
  if ($ua == '') {
     $GLOBALS['google']['via'] = read_global('HTTP_VIA');
     $GLOBALS['google']['accept'] = read_global('HTTP_ACCEPT');
  }
}

function google_get_ad_url() {
  $google_ad_url = 'http://pagead2.googlesyndication.com/pagead/ads?';
  google_append_url($google_ad_url, 'dt',
		    round(1000 * array_sum(explode(' ', microtime()))));
  foreach ($GLOBALS['google'] as $param => $value) {
    if ($param == 'client') {
      google_append_url($google_ad_url, $param,
			'ca-mb-' . $GLOBALS['google'][$param]);
    } else if (strpos($param, 'color_') === 0) {
      google_append_color($google_ad_url, $param);
    } else if (strpos($param, 'url') === 0) {
      $google_scheme = ($GLOBALS['google']['https'] == 'on')
	  ? 'https://' : 'http://';
      google_append_url($google_ad_url, $param,
			$google_scheme . $GLOBALS['google'][$param]);
    } else {
      google_append_globals($google_ad_url, $param);
    }
  }
  return $google_ad_url;
}

$google_ad_handle = @fopen(google_get_ad_url(), 'r');
if ($google_ad_handle) {
  while (!feof($google_ad_handle)) {
    echo fread($google_ad_handle, 8192);
  }
  fclose($google_ad_handle);
}

?>

Posted from: 117.200.53.160
Comment 1 Michael[tm] Smith 2011-08-04 05:14:41 UTC
mass-move component to LC1