This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Add HTTPS support to gad-data-model.php

By: a guest on Aug 13th, 2012  |  syntax: PHP  |  size: 0.72 KB  |  views: 72  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.   function create_google_chart_url($width, $height)
  2.   {
  3.         $chart_url = 'http://chart.apis.google.com/chart?chs=';
  4.         // Change the chart source URL for secure (HTTPS) pages
  5.         if( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) {
  6.                 $chart_url = 'https://chart.googleapis.com/chart?chs=';
  7.         }
  8.     return $chart_url . $width . "x" . $height . "&chf=bg,s,FFFFFF00&cht=lc&chco=0077CC&chd=t:" . $this->chart_values . "&chds=" . ($this->minvalue - 20). "," . ($this->maxvalue + 20) . "&chxt=x,y&chxl=0:" . $this->x_axis_labels . "&chxr=1," . $this->minvalue . "," . $this->maxvalue . "&chxp=0," . $this->y_axis_labels . "&chm=V,707070,0," . $this->first_monday_index . ":" . $this->total_count . ":7,1|o,0077CC,0,-1.0,6";
  9.   }
clone this paste RAW Paste Data