Good Day,
Thank You very much for the help and the solutions to my problems, also I would like to apologize for the lack of the error message and you are correct that would have been helpful but I was running out of time before I had to leave for work. It was my hope to get a response for when I got home and therefor did not have the time to give all the information.
Both solutions worked out just the way that I was hoping them to. When I first tried to implement the soultion for the hotlinking I uploaded the .php file and then just clicked the random picture to test and it came back with the error once again. So after redoing it a few times and getting the same result I them reloaded the main homepage and then clicked on the new images that are displayed on the main screen and it worked, without any error. Now I can click on any picture including the random image there is no error at all. I do not understand why I had to go back to the homepage to avoid the error message but it works and that is what matters.
Once again Thank You for your assistance.