CGI Ipaddress
Join the DZone community and get the full member experience.
Join For Free/* This is a CGI program that prints out the IP address
* of the requester.
*/
#include
#include
int main (int argc, char *argv[], char *envp[])
{
char *REMOTE_ADDR;
printf("Content-type: text/plain \n\n");
printf("%s",getenv("REMOTE_ADDR"));
return 0;
}
Opinions expressed by DZone contributors are their own.
Comments