how can i make this work? :/ $homepage = "/"; $currentpage = $_SERVER['REQUEST_URI']; if($homepage==$currentpage) { echo '<meta HTTP-EQUIV="REFRESH" content="0; url=http://mypage.com/<? echo rand(1, 102); ?>">'; } PHP:
it's there by misstake, but even if i remove it rhe resault is currently "http://mypage.com/%3C?%20rand(1,%20102);%20?%3E" when i go to my page the rand wont do a random number :/
No need to use echo twice: <? $homepage = "/"; if($homepage==$_SERVER['REQUEST_URI']) { ?> <meta HTTP-EQUIV="REFRESH" content="0; url=http://mypage.com/<? echo rand(1, 102); ?>"> <? } ?> PHP: