This program is a test to see if I can parse a link passed by another page on the web site and come out with the main focus and the particular page #. The reason that I wrote this program is th help me with the entries of my blog. I need to parse the link variable passed by the passin g page and set up a switch to include the page for the 'main' section of the web page.

Initially, I tested out a simple program to find a file named fave1.php. The results are as follows:

Test Print
fave1.php
This file exists.

Next, I need to implement a parsing algorithm. I know that, for the main pages, I pass the page number to include in the passed link as 'page' + a numeric value. I need to parse out the 'link' variable.

Length of the passed variable: 6

Value of passed variable: page12

The leftmost 4 characters are: page

The page number to be retrieved is Page 12.