If you need urgent support, call 999 or go to your nearest A&E. To contact our Crisis Messenger (open 24/7) text THEMIX to 85258.
Read the community guidelines before posting ✨
Aged 16-25? Share your experience of using the discussion boards and receive a £25 voucher! Take part via text-chat, video or phone. Click here to find out more and to take part.
Options
Running a script to automatically save new content
![Former Member](https://us.v-cdn.net/6030621/uploads/defaultavatar/nJHX7Z3NJVPO4.jpg)
in General Chat
Hi
How easy is it to develop a script that will automatically follow a domain for new content (it wouldn't necessarily need to capture *all* content), so every 15s or so it takes the newest content, saves it in a folder, and so on.
Just entertaining an idea I have, but not really sure the best way to go about it.
How easy is it to develop a script that will automatically follow a domain for new content (it wouldn't necessarily need to capture *all* content), so every 15s or so it takes the newest content, saves it in a folder, and so on.
Just entertaining an idea I have, but not really sure the best way to go about it.
0
Comments
Most sites these days that have regularly updated content produce RSS feeds, your best bet would be to collect the info from that.
Basically I just want to fill up a folder with pics as and when they're posted lol.
$data = file_get_contents("http://www.finalwebsites.com");
$pattern = "/src=[\\"']?([^\\"']?.*(png|jpg|gif))[\\"']?/i";
preg_match_all($pattern, $data, $images);
example from:
http://www.web-development-blog.com/archives/parse-html-with-preg_match_all/
that's just an example with server side scripting. If you're to run it on your own computer as a more classic program, then you'd need to parse the raw html output in a loop structure in your favourite language and look for image references. for example.
http://www.chaoticsoftware.com/ProductPages/WebWatcher.html
We use this at work and works fine. It checks many thousands of web pages per day.
Haha very nearly.