If you've used Wi-Fi at any cafe and other various hot spot places around town you might notice that sometimes in order to access the wi-fi you have to go to a login page or an agreements page before you can access the wifi network.
How do you set this up? What is necessary? Can you do this with any router? Can you do this with PHP?
There are many ways to accomplish this. The easiest in terms of installing, configuration, and dropping it in, is Untangle (www.untangle.com). I'm confident that there are people on here who've set these up and have better suggestions, but Untangle is thusfar the only one I've worked with (and it is - admittedly - a limited exposure I have to setting up wi-fi hotspots with http).
You're looking to setup a WiFi Hotspot. There are any number of ways to do this, so you'll need to research and figure out the best way for you. Typically this is set up with RADIUS, or some derivative of it.
MikroTik has this capability built in with it's RouterOS. This is a cheap and easy way to set this up.
Another way to do it is listed here : http://www.howtoforge.com/wifi_hotspot_setup