Hi, I am trying to capture images from a website, and save them locally. An example would be 'http://www.mywebsite.com/weather/today/001.jpg' so I would want my script to connect to this site, and save the image to a local folder. the images are always xxx.jpg so for example 103.jpg but some numbers will not exist. If the file does not exist the browser will load the website homepage. What I am trying to do is set a loop which trys the image number, if it is there it will save the image, if the image is not there, it just goes to the next number.
I have two problems, firstly, how do I take the image and save it without having to load with GD, create a new image and export? Can I somehow just download the file? Second, how do I detect if the image is actually there, or whether the server trys to redirect to the homepage (therefore I would need to make the script just jump to the next number)?
Sorry if these are simple things to solve but I don't have much experiance with this sort of operation!
Many Thanks.