Would there be a program where i can put a photo into it and it recognises the photo.
The purpose is to get details of where is photo was taken and by whom.
This would pretty much be magic rather than science. How do you expect any software to do that? Unless you mean extracting EXIF information. This is information ("tags") added to an image file by many cameras at the time of taking the picture or added later in a computer using software - time, date, make of camera, aperture, shutter speed, if flash was on, etc, etc, and in some cameras, GPS location information, and potentially much more. Often the photographer will add extra information such as title, name of photographer, notes, comments, all sorts of things. Is that what you meant? If so, there are dozens of programs that can do that, just Google for EXIF readers or tools. You are only going to get out what has been put there, no software can do magic tricks. Not every picture is going to have every possible EXIF tag filled.
List of standard EXIF tags
http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html