3 Replies - 999 Views - Last Post: 28 July 2009 - 04:49 PM Rate Topic: -----

#1 Austinkir  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 20-March 09

Using php to build a Mobile (phone) version of site

Posted 27 July 2009 - 04:29 PM

I also posted this under "Web Development"... Don't want people thinking I'm over posting!

I'm currently looking into creating a site that would eventually include a separate mobile version, with some mirroring content.

I was thinking of putting all the raw content into separate files, and then including them in both the main site and the mobile site using the php include tag. This way updates would be reflected on both versions (mobile and main).

The mobile version would be structured with simple layout to look good on small screens (with minimal scrolling), and would then pull the same content as the main site and include it with simpler formatting.


My question: Is this a good way to do this? Are there any simpler and easier standards to pull this sort of thing off?

Thank you!

Is This A Good Question/Topic? 0
  • +

Replies To: Using php to build a Mobile (phone) version of site

#2 JBrace1990  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 110
  • View blog
  • Posts: 760
  • Joined: 09-March 08

Re: Using php to build a Mobile (phone) version of site

Posted 27 July 2009 - 05:45 PM

the iPhone has it's own standards for the mobile safari browser.

Some other ones do as well, depending on the browser.

In general, it should just be small and minimal images, unless for the iphone.
Was This Post Helpful? 0
  • +
  • -

#3 Austinkir  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 20-March 09

Re: Using php to build a Mobile (phone) version of site

Posted 28 July 2009 - 03:43 PM

Thank you for your reply. I understand that the mobile site needs to be simple, that has nothing to do with my question. ;)

I'm wondering if building a "shell" for both mobile and main parts of site, and then filling them with the content differently to display correctly.
Was This Post Helpful? 0
  • +
  • -

#4 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3103
  • View blog
  • Posts: 10,898
  • Joined: 08-August 08

Re: Using php to build a Mobile (phone) version of site

Posted 28 July 2009 - 04:49 PM

View PostAustinkir, on 27 Jul, 2009 - 07:29 PM, said:

I was thinking of putting all the raw content into separate files, and then including them in both the main site and the mobile site using the php include tag. This way updates would be reflected on both versions (mobile and main).

I'm not sure you're fully aware of what php is. It's a programming language, so it's capable of dynamically changing content. You want to set up a system where you do something like this:

if($mobile_browser)
{
 // code to display content in a mobile format
} else
{
 // code to display content in standard format
}


This is probably a situation where your best bet is to use a framework. The controlling code then merely calls the mobile view if the browser is mobile and a standard view otherwise.

Read up on MVC and frameworks.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1