Yahoo, iPhone, and WordPress
Equip your weblog with a front end tailored for the IPhone
If you develope applications in PHP and MYSQL, you can place an iPhone Safari front-end on your Wordpress weblog using Yahoo’s small business service which cost’s less than $20 a month and provides PHP, MYSQL, and WordPress.
***
Here are the high level steps I used to build an IPhone front-end for the WordPress weblog:
- Sign up for Yahoo Small business. This enables PHP, and MYSQL
- Use Yahoo’s “Create & Update” page to generate a free Word Press environment. The Word Press MYSQL database can be accessed from PHP scripts running from the small business account.
- Download a file named \wpblog\wp-config.php to your PC, open it, and get the MYSQL DBName, UserName, and User Password. Use these values in your own PHP scripts to connect with and query the WordPress MYSQL database.
- Write PHP scripts to show the structure of WordPress’s MYSQL database. Here’s a dbping script which shows table names and column names for some key tables.
- Using WordPress table structure information obtained from dbping, write PHP scripts to display BLOG content on the iPhone. Use larger than normal fonts. Everything else is pretty much standard HTML.
If you have an IPhone, view this page (www.core3.com/icore) using your IPhone to see a WordPress Blog tailored for the IPhone.
Here’s a picture of the setup

Â
Â
Â
Â
 ***
February 4th, 2008 - Before beginning the project to create an IPhone browser application, I’d never heard of Wordpress. I’m in IT, but it’s corporate, and nearly all Java, with little or no PHP or Perl. My goal was to build an IPhone application folks could use to share information about the IPhone. I hadn’t intended to create a weblog. However, I figured a content management system of some sort would be needed. I considered trying to build something myself from scratch using MySQL. However, aside from re-inventing the wheel,  the build-from-stratch approach would require extra time and be thin on features.
***Â
Since I use Yahoo’s small business service I looked around the control panel and noticed that two separate weblog programs are included for free. The programs are Moveable Type and WordPress.Â
***
Knowing zero about either package, I read up a bit and learned that one is written in Perl and the other in PHP.  PHP is newer than Perl yet it has a large following, so I decided to experiment with WordPress. A few hours after installation, I had writen a couple of PHP scripts to query the WordPress MySQL database and pull back posts and comments.
***
In the last few day’s I’ve been reading about WordPress plugin’s. I’ve now learned I could have created a plugin theme tailored for the IPhone. Others have already done this. For instance, see Theme Critic’s review of Hello 1.0. Oh well. Guess I’ll dig in and try to learn more about Wordpress Plugin’s. A good place to start looks to be the Devlounge series “How to Write a WordPress Plugin” By Ronald Huereca which discusses plugin “How-To” techniques in a manner that’s clear and readable.
Â
Tony said,
January 29, 2008 @ 11:42 pm
This approach would work with any ISP hosting any version of WordPress.
IPhone Cafe » Blog Archive » CNET CiUI III said,
April 12, 2008 @ 1:09 am
[…] The common American idiom “Walk Before You Run” is advice I tend to practice.  iPhone Cafe is a Wordpress weblog with an iPhone user interface (in addition to it’s WordPress interface) and it’s been running since January 2008.  Now, I’d like to convert iPhone Cafe into a “real” iPhone web application which means doing a better job of conforming with iPhone’s recommended Safari web browser best practices for css and javascript.  I can do PHP and MySQL and all that, but with no prior iPhone web browser development experience, I’d like to use an iPhone framework developed by the community. iUI and CiUI are two frameworks developed and posted since the iPhone’s release. Let’s see what can be done with CiUI […]