Advertisement
Guest User

Untitled

a guest
Apr 26th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main () {
  5. string username = "XYZ";
  6. string password = "XYZ123";
  7. cout << "Set-Cookie:UserID = " << username << ";\r\n";
  8. cout << "Set-Cookie:Password = " << password << ";\r\n";
  9. cout << "Set-Cookie:Domain = www.tutorialspoint.com;\r\n";
  10. cout << "Set-Cookie:Path = /perl;\n";
  11. cout << "Content-type:text/html\r\n\r\n";
  12.  
  13. cout << "<html>\n";
  14. cout << "<head>\n";
  15. cout << "<title>Cookies in CGI</title>\n";
  16. cout << "</head>\n";
  17. cout << "<body>\n";
  18.  
  19. cout << "Setting cookies" << endl;
  20.  
  21. cout << "<br/>\n";
  22. cout << "</body>\n";
  23. cout << "</html>\n";
  24.  
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement