Mobile Version Of Website - "Cannot Open Page Because Too Many Redirects" Error

Oct 4, 2010

I created a mobile version of a client's website. I created a subdomain called [URL] In the past I have used this code on the index.php page:

<?php $mobile = "";
if(preg_match('/Windows CE/i',$_SERVER['HTTP_USER_AGENT'])) { header("location: $mobile");}
elseif(preg_match("/iphone/i",$_SERVER["HTTP_USER_AGENT"])) { header("location: $mobile");}
elseif(preg_match('/Blackberry/i',$_SERVER['HTTP_USER_AGENT'])) { header("location: $mobile");}
elseif(preg_match('/PalmOS/i',$_SERVER['HTTP_USER_AGENT'])) { header("location: $mobile");}
elseif(preg_match('/PalmSource/i',$_SERVER['HTTP_USER_AGENT'])) { header("location: $mobile");}
elseif(preg_match('/SymbianOS/i',$_SERVER['HTTP_USER_AGENT'])) { header("location: $mobile");}

It usually works great. But this time when I try to bring it up on my iPhone I get a "Cannot open Page because too many redirects" error.

View 5 Replies


Making A 'mobile/cell' Version Of A Javascript Website?

I'm about to potentially start work on a website, but the client has a requirement that the website should also be accessible from mobiles/cell phones. He hasn't mentioned which mobiles he wants to support in particular but I assume it would be smart phones like iphone, blackberry, android, etc.

My question is, how much work will this take? For example:

1) Will I need to make two copies of the site, one for computers and one for the mobiles? Or even build 2 copies of all the html files?

2) Are there any special considerations I need to keep in mind when using javascript/ajax? Such as any features which may not be supported on cell phones (such as jquery)?

3) Is there an easy trick for supporting the site on both computers & cell phones? Like just showing a different stylesheet for cell phones and everything else would just work?

View 4 Replies

Develop A Mobile Version Website Without Changing It's Domain Name?

I want to develop the mobile (also includes iphone,ipad,andriod) version of my original site. But I don't want to create another sub domain like [URL], can i dynamically change the document root separately for mobile version and the existing one? I have also noticed that, when I open facebook form iphone or any andriod mobile it opens with it's original domain name like [URL] bt when i open it from any other mobile like nokia or samsung it comes with [URL], what is the difference between this 2?

View 6 Replies

Using Wurfl To Redirect Phones To Mobile Version While IPad / Playbook And Desktops Get That Version

For those of you who use wurfl, I just wanted to check if my logic was correct. I have a page that has both a mobile and desktop version. If I want phones like iPhones, etc to be redirected to the smaller mobile version while iPads, PlayBooks and desktops get the full size version, is this the correct logic on the full size page:

if ($requestingDevice->getCapability("is_wireless_device") == "true" && $requestingDevice->getCapability("is_tablet") == "false") {
//redirect to mobile version

View 2 Replies

Development Environment For A LAMP-based Website - Redirects To Server Default Page?

In our current environment, if any changes need to be made to the code, these changes are directly coded and updated to the Live server.GWe would like to set-up a development server where we can test our changes before uploading to the live site.I have attempted to build a development site locally by installing Apache, PHP & MySQL and copying all the htdocs to the Apache folder.However, when I try to access localhost/ it redirects me to the server default page.

View 1 Replies

Mobile - Build A Mobile Website That Get The Users Phone Book?

is there a way for me to access a users phone contact like from a nokia phone using PHP? I want to build a mobile website that can get the users phone book.

View 2 Replies

Mobile Website Voice Recorder With Mobile Handset

For my website in PHP, we are generating mobile website and have to implement a voice recoding facility via from any mobile device, do you guys know any better option to easily integrate the same with my PHP mobile website. I have tried some Java Applets, but those are not working into iPhone / Android, so any simple tool, which can record voice with any mobile device and option save / play the recorded voice on my website and mobile both side.

View 1 Replies

Curl - Mobile Version By Using File_get_contents() ?

I want to get the mobile version by the use of either file_get_contents() or cURL. I know that it can be done by the help of modifying the HTTP headers in the request.

View 3 Replies

Website To Mobile Website Conversion

If I want to convert it into mobile website, what should to my html or something such that when I open it with my mobile, I should be able to see the whole page in my screen. I tried adding this to my html code... in head

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>

Mobile specs : Any web browsing supporting mobile and am targetting a width of 320px. No Horizontal scrolling allowed. Only vertical scrolling. Just the code for converting to mobile website. I tried a few solutions online but didn't seem to work out.

View 1 Replies

Notify Me When Google Redirects A Visitor To My Website

This is a simple PHP script, that can be very useful. Basically you will receive and email when Google directs a guest/ visitor to your website. Perhaps someone can expand on the script, as any other add-ons would be very useful I presume. This script is for anyone who uses Google Adsense perhaps in their websites, but it is useful..

/* @author Andy M/ xplosion
@script Email me when Google directs a visitor to my website!
$name=""; Add you Name here..
$email_address=""; email address you want the emails sent to.

View 2 Replies

Send Sms From Website To Mobile

how to send sms from web site to mobile

View 9 Replies

Sms To Mobile Phones From Website?

i want to send sms to mobile phones from web site is there any solution for this

View 9 Replies

Turning Website Into A Mobile App?

Turning a website into a mobile app.The site is just not typical site, its social website.They don't want people to just visit the site from their browser, want to give them a new interface.touch mobile apps yet but this will be first.want to leverage what have written where go to get started on this?Where's a good place for "PHP to Mobile for Dummies"?

View 1 Replies

Send MMS From A Website To Mobile Phone

lets say that I have a contract with a MMSC server provider which allows me to send MMSes from my website via a gateway. Will the send script be using the mail PHP function?? Will this be send as a regular email? In wich form has the recepient email adress to be? 'mobile_number'@'?

View 1 Replies

Website Supporting For Mobile Phone

I want to make a website which should open in mobile perfectly. I went through more search and i got WML language based website. Is this not possible to make any website in concerns of design with mobile.Can WML run on php server as well? Need advice how to make a website for mobile application ?

View 4 Replies

Detect Mobile Browser For A Website?

how can i detect if someone visits my website using safari or iexplorer via their mobiles?i think the answer may be using the USER_AGENT variable, but i'm not really sure, so if you have a better idea or already a code running it would be just great to share :)

View 5 Replies

Send Website Contents To Mobile?

I want to send web sites contents to mobile.e.g if any one add new poems in my site then an alert is send to mobile of the site members.

View 2 Replies

Know If The Visitor To Website Using A Mobile Phone Or PC?

I wanna ask, how to know If the visitor to my website using a mobile phone or PC? using php function

View 2 Replies

Send SMS From Website To Mobile Phone

Am trying to build a site as one of the ways to draw traffic l wish to add the "free SMS-to-mobilephone" messaging. Is there someone who can guide me on how to do this in php?

View 2 Replies

Jquery - When Session Times Out It Redirects Entire Page Instead Of Page Loaded Via Ajax

I have a php page that uses php sessions as well as jquery to call pages via ajax. The problem is if the page is idle for so long the page being called via ajax gets redirected to the home page but the rest of the page outside the div being updated with the ajax still shows the person logged in until they try to click a link then the whole page redirects to the login page since the session has timed out. Is there a way in php that once it detects the session has timed out then redirects them to the logout page that the whole page gets redirected instead of just the page being called via ajax?

View 1 Replies

Mysql Database Is Accessed From Cpanel Normally Page Redirects To The Phpmyadmin Page?

i have read somewhere where in when mysql database is accessed from cpanel normally the page redirects to the phpmyadmin page however if a line of code is added to some php file there will be an alert asking to enter username and password in order to access phpmyadmin for security, can anyone tell me which php file that is and also the code that is needed.

View 1 Replies

Upload A File Using C# From A Windows Mobile App To A Website?

I need to upload a file using C# from a windows mobile app to a website. It's running PHP as the webservice on the other side, though I guess it really doesn't have to if there's another way to be able to get the file up there. There is no server-side ASP support, however. My problem really isn't the PHP, it's the mobile C# code. Also, does NOT exist in the compact framework, so unfortunately, that simple solution is gone.

View 2 Replies

Website Receive Email From A Mobile Phone?

I want to receive emails from mobile phone and display it on my website implemented PHP. My site is a free messaging system that sends messages to mobile phones using sendgrid API

I want to display messages from cell phones on my website. Is there any API available ?

View 3 Replies

Parsing Commented Html From Mobile Website

Trying to parse this html with the simple_html_dom but most of it is commented how do I get around that? (It's a mobile page).

ini_set('display_errors', 1);
include(dirname(__FILE__) .'/inc/simple_html_dom.php');
$page = 'url';

View 1 Replies

Download A File After User Has Submitted Data - Page Redirects To Login Page If Any Field Is Empty?

I want the user to download a file "tokina.pdf" after he has submitted user data, the page redirects to the login page if any field is empty. But the bit of code always starts a download process even if user data is incorrect.

$name = $_POST["name_first"];
$mail = $_POST['email'];
$number = $_POST['phone_number'];
echo "Name : $name";
echo '<br>';
echo "Email-ID : $mail";

View 1 Replies

Display Large PDF For Mobile (web Development) Website/usage?

I need to display a PDF with over 100 pages (yeah it's huge) in a mobile website. This is not going to work and I need to come up with an alternative solution. I'm using PHP as the backend and jQueryMobile lib as the mobile framework. I was thinking to convert the PDF to html but then there is the question about how to load each page or load all the pages before hand (as a multi page layout w/ JQM can do).

I was thinking about having each page a AJAX request and loading it this way but wanted to get a fresh point of view on any alternative methods. I'm also concerned about connection speed as mobile devices vary from Edge, 3G, 4G, wireless, etc... so making the load time(s) as fast as possible is a must.

UPDATE: The PDF file size is around 9MB, yeah it's not a lot but for a mobile browser over a slow connection speed this will take some time to display and that's if it doesn't timeout first

View 2 Replies

Copyrights 2005-15, All rights reserved