PDA

View Full Version : Realtime web page data



Sphere
- 16th February 2013, 20:10
Im currently using the wiznet chip and I am able to generate a web page. But I would like to have live data without refreshing the page. I know you can use ajax, but im not much of a web coder and the examples ive seen are using a pc server, so you dont realy get to see all the code. So if anyone can point me in the right direction it would be appreciated.

Thanks Sphere.

mackrackit
- 19th February 2013, 08:13
<?php
$page = $_SERVER['PHP_SELF'];
$sec = "60";
header("Refresh: $sec; url=$page");
?>

Sphere
- 20th February 2013, 18:28
Not having much luck with the code but thanks for sharing.

Sphere.

mackrackit
- 20th February 2013, 22:09
I miss read your question. The code I gave was for a server with PHP.
The code below will cause the browser to re-load the page every 30 seconds, if the content has changed on the WIZ server it will be displayed.
Put this in the header of the web page.

<meta http-equiv="refresh" content="30">

Sphere
- 21st February 2013, 20:39
Thanks for the code. Works like a champ.

Sphere:)

Ive added this to it to goto a specific url- <meta http-equiv="refresh" content="60;url=http://YOUR-SITE-HERE.com/">