Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main () {
- string username = "XYZ";
- string password = "XYZ123";
- cout << "Set-Cookie:UserID = " << username << ";\r\n";
- cout << "Set-Cookie:Password = " << password << ";\r\n";
- cout << "Set-Cookie:Domain = www.tutorialspoint.com;\r\n";
- cout << "Set-Cookie:Path = /perl;\n";
- cout << "Content-type:text/html\r\n\r\n";
- cout << "<html>\n";
- cout << "<head>\n";
- cout << "<title>Cookies in CGI</title>\n";
- cout << "</head>\n";
- cout << "<body>\n";
- cout << "Setting cookies" << endl;
- cout << "<br/>\n";
- cout << "</body>\n";
- cout << "</html>\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement