Pull and save an image on your server from any site

This is a little script I’ve been playing with. I’m using it on my pet project GoGuide.co.za, a social bookmarking site. The plan is for the site to pull a thumbnail image of a submitted URL’s page. The script scans specified sites for the first image with a width greater than 200px. I suggest 200px as in most cases blogs and news sites will not have any images with widths greater than 200px other than in their content.

The script is simple. It grabs the HTML source of a page. Scans for HTML image tags. Grabs the path of an image and copies it to your server.

Download source - ZIP
Download source - RAR

imagecode.gif

Share this post: Share this post with the world.
  • Muti
  • GoGuide
  • Facebook
  • del.icio.us
  • Digg
  • Reddit
  • StumbleUpon
  • Technorati
By admin / Mar 14th, 2008 / Category: , Programming

One Response

  1. [...] when registering a site or submitting a link. I rate this coupled with an RSS aggrigator and the image pulling script could make the basis forĀ a good content aggregator (I have never made a content aggregator so I [...]

Leave a Reply