1. Home
  2. Computing & Technology
  3. Python

Part 1: Laying the Groundwork with HTML, CGI, and PHP

From , former About.com Guide

2 of 10

The Basic Layout: HTML - CGI or PHP - Python power at back.

This implementation will have three basic parts. It will obviously have a Python backend that retrieves the RSS data in XML format , processes it, and returns the desired information from the feed. The frontend will be a web page . The names and addresses of the feeds will be kept in a separate file of our own design and designation. This part of the tutorial will look at setting up the front end and the form handling code.

As the frontend of the application will be a webpage, you will need access to an Apache (or similar) web server. If you have a personal web site, you will be able to run this application there.

Those who have read my tutorials on CGI and PHP-Javascript as a CGI replacement may wonder which one we will use. The eighty lines of code contains implementations for both. Which one you use is up to you -- the dynamics are the same. For the tutorial, we will be giving some attention to what the PHP script would look like. If you use the CGI implementation, be sure to enable CGI scripts outside of cgi-bin as detailed in the Apache documentation.

Explore Python
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Python

©2009 About.com, a part of The New York Times Company.

All rights reserved.