Freelance Projects

All Freelance Projects at One Location


Simple Link Grabber  19.05.08

Hello,
I need a simple PHP script that will grab all links off a page. I want it to read a .txt file with a full list of urls to parse. It should parse each url and simply extract the full link in the a href statements. These urls will most likely only be showing local file names in the href statement so I need you to add the front portion in when you go to write it.

I want all the links written to the same file. So here’s an example:

I have a .txt file with 3 urls in it:
http://www.domain1.com/page1.php
http://www.domain2.com/page2.php
http://www.domain3.com/page3.php

I want each url read and ALL links from on that page from ALL 3 URLS written to the same file (links.txt) in the same place the link grabber script was run from (so just create the file upfront and append to it as you go).

So if the 3 domains above each had 1 link on them, I would then end up with ONE file, links.txt, with 3 different urls written to it. Just one url per line with the FULL URL written. So let’s say each domain above had a link on it called abc.php. The “links.txt” file written from above example would be:

http://www.domain1.com/abc.php
http://www.domain2.com/abc.php
http://www.domain3.com/abc.php

Very Simple stuff. I don’t have time to code it myself.

Who wants it?

Share and Enjoy:
  • Digg
  • del.icio.us
  • Google Bookmarks
  • Twitter
  • Facebook
  • StumbleUpon
  • Slashdot
  • Technorati
  • BlinkList
  • Reddit
  • DZone
  • Live
  • NewsVine
  • LinkedIn
  • Yahoo! Buzz
  • MySpace
  • Netvibes
  • Tumblr
  • Yahoo! Bookmarks
  • Add to favorites
  • email
  • Print
  • RSS


If you liked this project, make sure you
Subscribe to Freelance Projects RSS feed!