Posted on Thursday 8th of March 2007 at 12:07 in Tutorials

Scraping website content with PHP using Curl

I've been building a side project that just so happens to need this functionality so thought I'd document it on the site as I go.

The function below takes a URL and connects to it and returns all the contents.



How do I use it?
See the code below for an example implementation of the function.



$content will then become the full HTML of the page, so outputting it will replicate the page in it's entirety. Do with it what you will.

 

Enjoy this article? Why not subscribe to the full RSS feed?

Add Your Comments








Comments

Showing most recent 20 of 45 comments [View all comments]

As the business grows, omega watches has also jumped into an

international brand. It is worth mentioning that, omega moon

watchis the ancestor of today's brand-oriented, in order to

protect the quality and brand name will be printed on their products,

the history of fashion in the world, is the first one first. ,replica

watches,vintage omega watches、fake omega

watches、replica omega watches、omega

watches、 omega moon watch
nice.Thank you fo
It is so nice.Thank you for sharing.

That's awesome! I can't wait to get into it.

MBT Shoes Sale offer powerful training shoes Cheap MBT Shoes
Tiffany, Queen's Tiffany jewellery industry, diamond and silver products known world.Tiffany uk was founded in 1837, the beginning of silver tableware is known,Tiffany jewellery uk in 1851 launched a 925 silver ornaments and even more well-known. 1960 a famous Hollywood actress Audrey Hepburn starred in the "Tiffany jewellery sale" is a named Tiffany jewellery london.Tiffany jewelry sale, a symbol of American design. With love silver jewellery and
Tiffany Charms, romance and dreams as the theme, but the wind reputation for nearly two centuries Tiffany Bracelet. It is full of sensual Tiffany Sets and Tiffany Rings, delicate sensibility to meet all of the world women's fantasies and desires.Tiffany Earrings is currently only nine stores in mainland China: Chengdu 1, Shenyang Zhuo show one, two Beijing, Tianjin and one, two Shanghai, Qingdao 1, Hangzhou 1. Tiffany Necklace silver to buy the remaining channels may be fake Tiffany Pendant, please note Tiffany Accessories identification .From the leisure clothing brand Gucci some brand history.Gucci Shoes he opened the first store to launch a series of iconic products.All the avant-garde techniques used on denim today make it a way to turn heads while maintaining a level of comfort not normally associated with fashion. G Star Raw is a frontrunner in the denim design race. For G Star Fall 2010 Collection, they are presenting the Jeans G Star and more sophisticated side of denim,The G Star sale Fall/Winter G Star shop and G Star jeans Collections demonstrates the fusion of G Star jacket,G Star t shirts elegant tailoring and G Star clothing in vibrant colors.G Star shoes Eye-catching metallic washes and G Star raw clothing further enhance the G Star raw jacket, highlighting the G Star raw jeans and G Star raw denim that is distinctively G Star raw t shirts. The urban feel that is always G Star raw shoes is still present,but the G Star Mens and G Star Womens are clean and can serve as perfect additions to your G Star Accessories.and shamwow.the wind reputation for nearly twoiphone revolution
Whoa! I am looking forward for the next updates of your awesome worship. It would be great if you have other great things

just like this. I really love it. Thanks!

can show a man not only his wealthy but also his high taste.replica rolex submariner watchesAs the society developed, many people are pay more attention to one's wearing than before, especially a watch. replica rolex submariner watches If you are wearing a famous brand watch, people will look up you, also will love to do business with you. You will be a successful man with a such luxury fashion watch.
100% comment spam
0302sllrk My company and I are reputable ugg bailey button ,credible, and have helped people just like you ugg shoes 5389 in over 5 different countries.I've been doing business online since March, 12 2002 ugg ultra tall .I've helped hundreds of people with ugg ultra short their wedding speeches.My company was on the front page of ugg nightfall boots the'The Wall Street Journal' June 19, 2002. http://www.ecboot.com/products_new.html
That's awesome! I can't wait to get into it.

Very happy I can comment here!
Best wishes for this year.
If you are looking to get the watch at a much cheaper price then it is better to go with the replica rolex submariner watches.A replica watch is manufactured taking a original
rolex submariner as an example. The quality of the rolex daytona is maintained to high standards such that they last for a long time as the original watches. There will not be a single difference between the original one and the rolex datejust. Here you can find not only quality but also the latest updated designs that will fit to your taste. You can find the perfect match to your taste with the rolex daydate
The best construction foftware
The best construction software
When it comes to silver jewellery, most of everyone expects quality! Tiffany jewellery is absolutely good, tiffany charmsas they produce top-class quality in the every piece of work. Many people could never afford tiffany necklace, as they are little high priced.tiffany accessories But quite some people expect quality and they right away purchase Tiffanyjewelry with no questions.tiffany earringsThey consider that, Tiffany uk
co tiffany rings brings them richness and adds prestigious note to their outlook. The best fortunate fact of Tiffany jewellery uk jewelry is they are really impressive, unique and tiffany pendant
Many people are dreaming of wearing rolex watch as it is a great brand designer watch.Women like to wear all kinds of fashionable accessories sun as the Replica Yachtmaster watches which make them look more fashionable and graceful.man like to wear all kins ofFranck Muller watches to highlight them life style at a fraction of the cost.
As the business grows, replica rolex paypal has also jumped into an international brand. It is worth mentioning that, rolex replica is the ancestor of today's brand-oriented, in order to protect the quality and brand name will be printed on their products, the history of fashion in the world, is the first one first.
replica watch paypal,
replica watches paypal,
fake rolex paypal.
UGG Nightfall, UGG Classic Tall, UGG Classic Mini on sale, free shipping!
watches for salewatches replicaFerrari watchesBreitling watch for saleFranck Muller watch for saleRolex watch for salenike shoes on sale

Subscribe to the RSS Feed

Stay up to date with Seopher.com by subscribing to the RSS feed, either in your browser or subscribe via email using the form below

Updates by Email

By subscribing by email you’re also subscribing to the Seopher.com newsletter; a periodical email outlining new reviews, competitions and other subscriber-only content

  • Wordpress Campaign Manager
  • 125x125 banner only $50 pcm
Want to give your product/website exposure?

Paying for a featured review is a great way to give your product, service or website exposure. For as little as $50 you can have a full review on the site forever.

Advertising Bundle! Review + Banner = $70

To kick start the new improved Seopher.com, buy a review and get a 125x125 advert half price. Your banner gets displayed on over 450 pages for a full month.