when scraping websites, i usually use the function file_get_contents. However, there are times when we only need a specific portion of the site to get; for instance: getting the title of the site or the description. Instead of using file_get_contents...
Posted on October 1, 2006 2:59 PM
Here's a handy function to get specific tag contents. You could modify the tag you wish to scrape by changing the $start_tag and $end_tag variables. Useful in getting data from multiple html tags. <?php function get_tag_contents($start_tag, $end_tag, $url){ $data =...
Posted on October 1, 2006 1:56 PM
Getting the a website title and description is easy. Using the PHP's builtin file_get_contents command together with a regex pattern allows us to capture and get any website title and description without any complex methods that is if the site...
Posted on September 21, 2006 7:04 PM
If you use an RSS reader, you can subscribe to a feed of all future entries tagged 'website scraping'. [ What is this? ]
Other tags used on this blog: