Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
- <html lang="en">
- <head>
- <title>Dashboard Example</title>
- <style type="text/css">
- body, html { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; }
- iframe { border: none; }
- </style>
- <script type="text/javascript">
- var Dash = {
- nextIndex: 0,
- dashboards: [
- {url: "http://www.google.com", time: 5},
- {url: "http://www.yahoo.com", time: 10},
- {url: "http://www.stackoverflow.com", time: 15}
- ],
- display: function()
- {
- var dashboard = Dash.dashboards[Dash.nextIndex];
- frames["displayArea"].location.href = dashboard.url;
- Dash.nextIndex = (Dash.nextIndex + 1) % Dash.dashboards.length;
- setTimeout(Dash.display, dashboard.time * 1000);
- }
- };
- window.onload = Dash.display;
- </script>
- </head>
- <body>
- <iframe name="displayArea" width="100%" height="100%"></iframe>
- </body>
- </html>
- <meta HTTP-EQUIV="REFRESH" content="15; url=http://www.thepagecycler.com/nextpage.html">
- function RefreshFrame()
- {
- parent.VisibleFrame.location.href = urlArray[i];
- i++;
- if(i < urlArray.length) SetTimeout("RefreshFrame()", 20000);
- }
- var i = 0;
- var urlArray = ['http://google.com','http://yahoo.com', 'http://www.search.com'];
- RefreshFrame();
- <?php
- # Path the config file, full or relative.
- $configfile="config.conf";
- $tempfile="tmp.html";
- # Read the file into an array
- $farray=file($configfile);
- # Count array elements
- $count=count($farray);
- if(!isset($_GET['s'])){
- $s=0;
- }else{
- $s=$_GET['s'];
- if($s==($count-1)){ # -1 because of the offset in starting our loop at 0 instead of 1
- $s=0;
- }else{
- $s=$_GET['s']+1; # Increment the counter
- }
- }
- # Get the line from the array
- $entry=$farray[$s];
- # Break the line on the comma into 2 entries
- $arr=explode(",",$entry);
- # Now each line is in 2 pieces - URL and TimeDelay
- $url=strtolower($arr[0]);
- # Check our url to see if it has an HTTP prepended, if it doesn't, give it one.
- $check=strstr($url,"http://");
- if($check==FALSE){
- $url="http://".$url;
- }
- # Trim unwanted crap from the time
- $time=rtrim($arr[1]);
- # Get a handle to the temp file
- $tmphandle=fopen($tempfile,"w");
- # What does our meta refresh look like?
- $meta="<meta http-equiv="refresh" content="".$time.";url=index.php?s=".$s."">n";
- # The iframe to display
- $content="<iframe src ="".$url."" height="100%" width="100%"></iframe>";
- # roll up the meta and content to be written
- $str=$meta.$content;
- # Write it
- fwrite($tmphandle,$str);
- # Close the handle
- fclose($tmphandle);
- # Load the page
- die(header("Location:tmp.html"));
- ?>
Add Comment
Please, Sign In to add comment