I want to be able to get the variable after a URL in a server.

like http://localhost/?1

1 would be the variable. I dont know how to set up a server wither (Web server) Any help