I have this site i made and want it to show up nicley on the iPhone but it shows up the same as it would on the Coomputer. I just want it to what i have in the box on the iPhone
here is the site
http://szeryk.com/Guitar%20Manifesto/Mobile/
also trying to make this page http://szeryk.com/Guitar%20Manifesto/ if site viewed on iPhone or iPad redirect to http://szeryk.com/Guitar%20Manifesto/Mobile/
thank you
iPhone
Moderator: General Moderators
Re: iPhone
Bump again and the post will be locked.
-
mikeashfield
- Forum Contributor
- Posts: 159
- Joined: Sat Oct 22, 2011 10:50 am
Re: iPhone
For sites to be displayed using the native iOS GUI then I'd suggest looking into iWebKit. I use it here on my own project.
To get the redirect to happen when the page is accessed on an iPhone, use something like this:
Any problems give me a shout!
To get the redirect to happen when the page is accessed on an iPhone, use something like this:
Code: Select all
<html>
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 6 November 2007), see www.w3.org">
<?php
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
if (screen.width <= 699) {
document.location = curPageURL() . "/Mobile";
}
?>
</head>
<title></title>
</style>
</head>
<body>
// your page content should the page be viewed on a PC (or anything other than a mobile device with a screen size smaller than 700px)
</body>
</html>
Any problems give me a shout!