After allot of trial and error I ended up coming up with some code that will redirect users to a mobile friendly page, this method won’t really be useful in about 5 years because modern browsers like safari allow full page viewing but this will get you by until then. Remember this code will have to change constantly if you want to stay up to date with the latest hand held devices and mime types.
To get started all you have to do is place the following code in the stop of your php page. If your loading an application you can post this below your application just don’t output any data before the code is executed. To get started making mobile friendly pages you can purchase your domain names and hosting by clicking here.
$mobile_browser = '0';
if(preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone)/i',
strtolower($_SERVER['HTTP_USER_AGENT']))){
$mobile_browser++;
}
if((strpos(strtolower($_SERVER[‘HTTP_ACCEPT’]),’application/vnd.wap.xhtml+xml’)>0) or
((isset($_SERVER[‘HTTP_X_WAP_PROFILE’]) or isset($_SERVER[‘HTTP_PROFILE’])))){
$mobile_browser++;
}
$mobile_ua = strtolower(substr($_SERVER[‘HTTP_USER_AGENT’],0,4));
$mobile_agents = array(
‘w3c ‘,’acs-‘,’alav’,’alca’,’amoi’,’audi’,’avan’,’benq’,’bird’,’blac’,
‘blaz’,’brew’,’cell’,’cldc’,’cmd-‘,’dang’,’doco’,’eric’,’hipt’,’inno’,
‘ipaq’,’java’,’jigs’,’kddi’,’keji’,’leno’,’lg-c’,’lg-d’,’lg-g’,’lge-‘,
‘maui’,’maxo’,’midp’,’mits’,’mmef’,’mobi’,’mot-‘,’moto’,’mwbp’,’nec-‘,
‘newt’,’noki’,’oper’,’palm’,’pana’,’pant’,’phil’,’play’,’port’,’prox’,
‘qwap’,’sage’,’sams’,’sany’,’sch-‘,’sec-‘,’send’,’seri’,’sgh-‘,’shar’,
‘sie-‘,’siem’,’smal’,’smar’,’sony’,’sph-‘,’symb’,’t-mo’,’teli’,’tim-‘,
‘tosh’,’tsm-‘,’upg1′,’upsi’,’vk-v’,’voda’,’wap-‘,’wapa’,’wapi’,’wapp’,
‘wapr’,’webc’,’winw’,’winw’,’xda’,’xda-‘);
if(in_array($mobile_ua,$mobile_agents)){
$mobile_browser++;
}
if (strpos(strtolower($_SERVER[‘ALL_HTTP’]),’OperaMini’)>0) {
$mobile_browser++;
}
if (strpos(strtolower($_SERVER[‘HTTP_USER_AGENT’]),’windows’)>0) {
$mobile_browser=0;
}
//change this to your mobile friendly page
if($mobile_browser>0){
header( “Location: http://www.yourwebsite.com/mobile/” ) ;
} else {
// do something else
}
$ua = $HTTP_USER_AGENT;
if (stristr($ua, “Windows CE”) or stristr($ua, “AvantGo”) or stristr($ua,
“Mazingo”) or stristr($ua, “Mobile”) or stristr($ua, “T68”) or stristr($ua,
“Syncalot”) or stristr($ua, “Blazer”) or stristr($ua, “NetFront”))
{
$DEVICE_TYPE=”MOBILE”;
}
if (isset($DEVICE_TYPE) and $DEVICE_TYPE==”MOBILE”)
{
//change this to your mobile friendly page
header( “Location: http://www.yourwebsite.com/mobile/” ) ;
exit;
}
?>
Code worked seamless. If you canpy and paste the code remember to place the characters <? at the beginning of this as they are truncated.
Regards,
Ron Bobarsky
Product Development
Custom Molding and Coating
Excellent post it will be quite excited to open a website on the mobile just like on the computer i will try definitely this code as well i have learn more than enough from this post please keep it up.
A wonderful article you posted. That is so informatory and creative.Please keep these excellent posts coming.
mexican online pharmacies prescription drugs
https://cmqpharma.online/# mexican drugstore online
mexican mail order pharmacies
Great info and straight to the point. I am not sure if this is in fact the best place to ask but do
you guys have any thoughts on where to get some professional writers?
Thank you 🙂 Escape rooms hub
Very interesting subject, regards for putting up.!
purple pharmacy mexico price list: cmq mexican pharmacy online – mexican rx online
https://canadapharmast.com/# pharmacy wholesalers canada
https://foruspharma.com/# buying from online mexican pharmacy
cheapest online pharmacy india: pharmacy website india – indian pharmacy
indian pharmacy online: buy prescription drugs from india – indian pharmacy
best india pharmacy indian pharmacy paypal reputable indian online pharmacy
medicine in mexico pharmacies: mexico drug stores pharmacies – reputable mexican pharmacies online
canadian pharmacy antibiotics: canadian pharmacy king reviews – canadian pharmacy
indian pharmacy paypal best india pharmacy indianpharmacy com
canadian pharmacy online store: certified canadian pharmacy – legitimate canadian online pharmacies
п»їlegitimate online pharmacies india: reputable indian pharmacies – indian pharmacy online
https://indiapharmast.com/# п»їlegitimate online pharmacies india
mexico pharmacy mexico pharmacies prescription drugs mexico drug stores pharmacies
http://indiapharmast.com/# п»їlegitimate online pharmacies india
cheapest online pharmacy india: indian pharmacies safe – Online medicine home delivery
cheapest online pharmacy india: world pharmacy india – indian pharmacy online
online shopping pharmacy india: india pharmacy – india pharmacy
buy prescription drugs from india: online shopping pharmacy india – top 10 online pharmacy in india
buying prescription drugs in mexico mexican pharmacy buying from online mexican pharmacy
reputable canadian online pharmacy: canadian drug – trustworthy canadian pharmacy
canadianpharmacyworld: canadian pharmacies that deliver to the us – legitimate canadian pharmacies
mexico drug stores pharmacies mexico pharmacy reputable mexican pharmacies online
pharmacies in mexico that ship to usa: medicine in mexico pharmacies – mexican border pharmacies shipping to usa
https://canadapharmast.online/# canadian compounding pharmacy
https://indiapharmast.com/# п»їlegitimate online pharmacies india
mexican border pharmacies shipping to usa: mexican online pharmacies prescription drugs – buying prescription drugs in mexico
canadian world pharmacy: buy drugs from canada – best rated canadian pharmacy
indian pharmacy online: indian pharmacy online – reputable indian online pharmacy
mexican mail order pharmacies mexico pharmacy mexico drug stores pharmacies
legit canadian pharmacy: legal canadian pharmacy online – canadian pharmacy prices
trusted canadian pharmacy: pharmacy canadian superstore – canadian pharmacy phone number
mexican rx online: mexico pharmacies prescription drugs – mexican pharmaceuticals online
medicine in mexico pharmacies buying prescription drugs in mexico online mexico pharmacy
Hi, I do think this is a great website. I stumbledupon it 😉 I’m going to return once again since i have book-marked it. Money and freedom is the best way to change, may you be rich and continue to help others.
top 10 online pharmacy in india: pharmacy website india – indian pharmacy
mexican pharmaceuticals online: buying from online mexican pharmacy – pharmacies in mexico that ship to usa
canada drug pharmacy: best canadian pharmacy online – canadian pharmacy world reviews
https://indiapharmast.com/# reputable indian online pharmacy
buying clomid: can i get clomid without rx – where can i buy cheap clomid without prescription
get generic clomid: where to buy generic clomid without dr prescription – buy clomid without prescription
http://ciprodelivery.pro/# buy ciprofloxacin
This site was… how do you say it? Relevant!! Finally I have found something which helped me. Kudos.
http://amoxildelivery.pro/# buy amoxicillin 500mg capsules uk
Next time I read a blog, I hope that it doesn’t disappoint me just as much as this particular one. I mean, Yes, it was my choice to read, however I actually thought you’d have something interesting to talk about. All I hear is a bunch of whining about something you could possibly fix if you weren’t too busy searching for attention.
https://paxloviddelivery.pro/# paxlovid buy
ciprofloxacin generic price: where to buy cipro online – buy ciprofloxacin over the counter
https://amoxildelivery.pro/# amoxicillin 775 mg
amoxicillin 500mg capsule cost: buy amoxicillin online cheap – azithromycin amoxicillin
Hello there! This article couldn’t be written much better! Reading through this post reminds me of my previous roommate! He always kept talking about this. I am going to send this post to him. Pretty sure he’ll have a great read. Many thanks for sharing!
https://clomiddelivery.pro/# where to buy generic clomid without prescription
https://doxycyclinedelivery.pro/# doxycycline 100 mg cap over the counter
This is a very good tip particularly to those new to the blogosphere. Short but very precise info… Appreciate your sharing this one. A must read article!
cipro pharmacy: buy cipro without rx – buy ciprofloxacin
antibiotics cipro: buy generic ciprofloxacin – cipro pharmacy
http://amoxildelivery.pro/# amoxicillin 500 coupon
https://clomiddelivery.pro/# get generic clomid tablets
http://ciprodelivery.pro/# buy cipro online without prescription
I’m extremely pleased to discover this website. I need to to thank you for ones time for this wonderful read!! I definitely savored every part of it and I have you bookmarked to check out new stuff in your site.
https://amoxildelivery.pro/# how to get amoxicillin over the counter
doxycycline compare prices: doxycycline order canada – doxycycline uk cost
Paxlovid buy online: buy paxlovid online – Paxlovid over the counter
Excellent article! We are linking to this great post on our website. Keep up the great writing.
https://paxloviddelivery.pro/# paxlovid cost without insurance
Can I simply say what a comfort to uncover someone that truly understands what they’re talking about over the internet. You certainly realize how to bring a problem to light and make it important. More and more people must look at this and understand this side of the story. I was surprised you aren’t more popular given that you certainly possess the gift.
https://doxycyclinedelivery.pro/# buy doxycycline 100mg capsule
http://doxycyclinedelivery.pro/# cost of doxycycline 50 mg
buy doxycycline monohydrate: doxycycline 225 mg – where can i get doxycycline uk
can i order generic clomid for sale: can i order cheap clomid tablets – where can i buy cheap clomid without rx
https://clomiddelivery.pro/# where can i buy cheap clomid without rx
bookmarked!!, I like your site.
http://doxycyclinedelivery.pro/# can you buy doxycycline
Hi there! I could have sworn I’ve been to your blog before but after going through some of the posts I realized it’s new to me. Nonetheless, I’m certainly pleased I stumbled upon it and I’ll be book-marking it and checking back often.
https://paxloviddelivery.pro/# paxlovid buy
where can i get generic clomid without rx: can i purchase clomid without insurance – can i get cheap clomid without prescription
can i purchase clomid no prescription: where to get clomid no prescription – how to get cheap clomid tablets
http://amoxildelivery.pro/# buy amoxicillin online with paypal
http://amoxildelivery.pro/# amoxicillin generic
can you get clomid without insurance: can i order clomid tablets – can you buy generic clomid without a prescription
buy cipro: buy ciprofloxacin – buy cipro no rx
There is certainly a great deal to know about this issue. I really like all of the points you have made.
п»їpaxlovid: paxlovid pill – Paxlovid buy online
paxlovid for sale: paxlovid generic – п»їpaxlovid
Very good blog post. I absolutely appreciate this site. Keep writing!
You ought to be a part of a contest for one of the highest quality sites on the web. I’m going to highly recommend this website!
Oh my goodness! Incredible article dude! Thank you so much, However I am having difficulties with your RSS. I don’t understand why I am unable to subscribe to it. Is there anyone else having identical RSS issues? Anyone that knows the answer will you kindly respond? Thanx.
The unique wood structure was closed and demolished in 1961 as a consequence
of safety considerations and changed by the winding concrete staircase nonetheless in use at this time.
According to legend, it acquired its present name from a local actual property agent who
placed a sign at the bottom of the staircase, in reference to both the Bible story a couple of ladder to heaven and the gorgeous
views at the top of the structure.
An impressive share! I have just forwarded this onto a friend who was doing a little research on this. And he actually ordered me breakfast simply because I found it for him… lol. So allow me to reword this…. Thank YOU for the meal!! But yeah, thanx for spending time to talk about this issue here on your site.
https://psk-termit.ru/
amoxicillin 500 mg cost: amoxicillin 250 mg – order amoxicillin online no prescription
doxycycline 50 mg cost: buy doxycycline online – generic for doxycycline
paxlovid india: paxlovid pharmacy – paxlovid cost without insurance