I have a php page on a website I am trying to send HTTP requests to through C++. This webpage is being run through my school which loves to use subdomains.
The page is on one domain, SubA.xxx.website.edu. When I lookup the address, I find out that SubA.xxx.website.edu is an alias for SubB.xxx.website.edu, and I get returned the IP address for SubB.
The problem is SubB.xxx.website.edu/precise/page.php does not lead me to the same place as SubA.xxx.webiste.edu/precise/page.php. How can I specify I want to access SubA.xxx.website.edu in HTTP? I can only get the IP for xxx.website.edu.
Here is my code for clarification (after creating a UNIX socket)
string mes;
mes = "GET /precise/page.html HTTP/1.1\n";
mes += "Host: ";
mes += argv[1]; // URL or IP of webpage
mes += "\n\n";
send(s, mes.c_str(), mes.length(), 0);