freets3.ovh
Active Member
- Sep 19, 2015
- 150
- 105
- 85
Demo : http://kingts3.com/kevin/1.php
1.php
	
	
	
		
			
			1.php
		PHP:
	
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
   <head>
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
       <title>Stats Kingts3.com & Freets3.ovh</title>
       
       
       <!-- 1. Add these JavaScript inclusions in the head of your page -->
       <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.js"></script>
       <script type="text/javascript" src="http://code.highcharts.com/highcharts.js"></script>
       
       
       <!-- 2. Add the JavaScript to initialize the chart on document ready -->
       <script>
       var chart; // global
       
       function requestData() {
           $.ajax({
               url: 'live-server-data.php',
               success: function(point) {
                   var series = chart.series[0],
                       shift = series.data.length > 20; // shift if the series is longer than 20
       
                   // add the point
                   chart.series[0].addPoint(eval(point), true, shift);
                   
                   // call it again after one second
                   setTimeout(requestData, 1000);   
               },
               cache: false
           });
       }
           
       $(document).ready(function() {
           chart = new Highcharts.Chart({
               chart: {
                   renderTo: 'container',
                   defaultSeriesType: 'spline',
                   events: {
                       load: requestData
                   }
               },
               title: {
                   text: 'Clients Online Now, Freets3.ovh & Kingts3.com'
               },
               xAxis: {
                   type: 'datetime',
                   tickPixelInterval: 150,
                   maxZoom: 20 * 1000
               },
               yAxis: {
                   minPadding: 0.2,
                   maxPadding: 0.2,
                   title: {
                       text: 'Value',
                       margin: 80
                   }
               },
               series: [{
                   name: 'Clients online',
                   data: []
               }]
           });       
       });
       </script>
       
   </head>
   <body>
       
       <!-- 3. Add the container -->
       <div id="container" style="width: 800px; height: 400px; margin: 0 auto"></div>
       
       <div style="width: 800px; margin: 0 auto">
           
       </div>
   </body>
</html> 
 
		 
 
		 
 
		 
 
		 <3
 <3