1) your code assumes that your site and IP are separated by one or several whitespace characters and soes not contains any excess letters. In your other thread you shown that they are separated by commas and contains quotes around them.
2) You should fill your map in one loop and then search for entered string by using member functon find().