- #include <iostream>
- #include <stdlib.h>
- using namespace std;
- void main(){
- char *RemoteAddr = getenv("REMOTE_ADDR");
- char *QueryString = getenv("QUARY_STRING");
- cout<<"Content-type: text/html"<<endl<<endl;
- cout<<"<html><body>";
- cout<<"<h>Здравствуйте! Мы знаем о Вас все!</h1>";
- printf("Ваш IP-адрес: %s<br>",RemoteAddr);
- printf("Вот параметры, которые вы указали: %s", QueryString);
- cout<<"</body></html>";
- cin.get();
- }