Show Script
Showing code for: mobile.irev
Back
<?rev
-- Standard header -------------------------------
put "Troz : : On-Rev" into tHeader
include "../../includes/header.irev"
include "../../includes/menu.irev"
--------------------------------------------------
?>
<?rev
command recordVisitors
-- this is here so I can check that the various user agents are being sent to the right page
put $_SERVER["DOCUMENT_ROOT"] into tPath
put tPath & "data/mobile_hits.txt" into tHitsFile
put $_SERVER["REMOTE_ADDR"] into tRemAddr
put $_SERVER["HTTP_USER_AGENT"] into tAgent
put the long date & tab & the long time into tHitTime
put URL ("file:" & tHitsFile) into tHits
put tRemAddr & tab & tAgent & tab & tHitTime & cr after tHits
put tHits into URL ("file:" & tHitsFile)
end recordVisitors
?>
<?rev include "includes/scriptlink.irev" ?>
<h1>Mobile Page</h1>
<p>You should be redirected to this page if you try to access the desktop page from a mobile device.</p>
<div class="info">
If you tried to access the desktop.irev page from a non-mobile device and were automatically re-directed to this page, please
<a href="mailto:sarah@troz.net?subject=Mobile%20device%20incorrectly%20detected">email me</a>
and I will try to fix it.
<p>
It would help if you included the following data in your email: <br />
<pre>HTTP_USER_AGENT: <?rev put $_SERVER["HTTP_USER_AGENT"] ?></pre>
</div>
<?rev recordVisitors ?>
<?rev
-- Standard footer -------------------------------
include "includes/showIncludes.irev"
include "../../includes/footer.irev"
--------------------------------------------------
?>