SHARE
TWEET

Untitled

a guest Apr 26th, 2018 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top