Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > Business Forums > Promotion Techniques

Reply
 
LinkBack Thread Tools Display Modes
Old 09-22-2011, 12:34 AM   #1 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 920
spiderguy84 is on a distinguished road
Default Website showing AlertView promoting iphone app

I've been to a few different forums and websites on my iPhone (sorry I can't remember which). When you go to the site, it detects you are on an iPhone, and shows what looks just like a UIAlertView stating that there is an iPhone app for this website, and prompts to click OK to redirect. Can someone direct me to how to code my website to do something like this?
__________________
My latest app...i Miss Mommy
spiderguy84 is offline   Reply With Quote
Old 09-22-2011, 05:00 AM   #2 (permalink)
Passionate Troll
 
Promo Dispenser's Avatar
 
Join Date: May 2011
Posts: 991
Promo Dispenser is on a distinguished road
Default

1. this belongs into a programming subforum.

2. Here is a code you can start with. Add it above the header of your website and design an own iphone optimized website for your content and put it to the path you provided here.
(the path I used is just an example. You can use whatever you want)

PHP Code:
<?php
$browser 
strpos($_SERVER['HTTP_USER_AGENT'],"iPhone");
if (
$browser == true)  {
header('Location:http://yourwebsite.com/iphonefriendly/index.php');
}
?>
To see how it works, visit http://iphone.3dmagicbox.com on your PC and on your iphone. You will see the difference (not on ipad!).
__________________

Last edited by Promo Dispenser; 09-22-2011 at 05:05 AM.
Promo Dispenser is offline   Reply With Quote
Old 09-22-2011, 01:02 PM   #3 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 920
spiderguy84 is on a distinguished road
Default

Thanks for the suggestion, but what I was looking for wasn't just a way to detect iPhone users and redirect them, but one that shows an alertview telling the user there is an iphone app available on that site.
__________________
My latest app...i Miss Mommy
spiderguy84 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 455
19 members and 436 guests
7twenty7, AliCeja31, AppleDev, boyax, ChrisYates, David-T, Free App Monster, gbenna, HarrysLad, ipodphone, jbro, Kryckter, minbq58, Objective Zero, Paul Slocum, pipposanta, sapmarc, SLIC, usernametaken
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,691
Threads: 94,134
Posts: 402,943
Top Poster: BrianSlick (7,990)
Welcome to our newest member, sapmarc
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:10 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0