Fordham, the Jesuit University of New York

CISC 3300 L01

Internet & Web Programming

Spring, 2015

Dr. Robert K. Moniot

back Back to course home page

Web Project 7: a simple PHP page

Assigned: Monday, March 9
Due date: Thursday, March 12
Points: 5

The aim of this project is to get familiar with PHP and use it for a small application.

Create a PHP web page named project7.php that checks the IP address of the visitor. If this is inside the domain (i.e. beginning with 150.108), it displays a friendly greeting and some exclusive content. If the address is outside the domain, then it welcomes the outsider and offers help getting to know Fordham.

This example page from the lectures on PHP shows how to get at the IP address.

Be sure to test your code for both cases. From off campus, to get a Fordham IP you can use a remote desktop to erdos, or use a secure shell connection and a text-mode browser such as lynx or w3m. If you are on campus, any wired connection (such as those for the machines in the CS lab in LL 812) will have the Fordham IP address. Any mobile device using either the Fordham wireless or a cellular data connection will have a foreign IP address. (The Fordham wireless is configured this way so that it will be treated as untrusted by internal systems.)

Note: Your project page must pass the W3C validator with no more than the unavoidable warning about the experimental HTML5 conformance checker.