I need some php code which has a defined window size, if size is true run the page if not redirect to another page. I will manage the window size using an iframe. Is it possible with php? If not is there another way.
this is a little javacript that checks the width and height then sets the document location if it isnt wht you specified, but it is being echoed from php. you can play with the maxheight, max width and url variables.
<?php
$jssnippet = "<script type='text/javascript'>var width = window.innerWidth;
var height= window.innerHeight;
var maxheight=480;
var maxwidth=360;
var redirecturl='http://www.xl21.org';
if((width>maxwidth) && (height>maxheight)){document.location=url; }</script>";
echo $jssnippet;
?>
PHP can't possibly know the window size.
This is a task for JavaScript.