For some reason or another , you might want to fetch a webpage content and parse the HTML returned to get only certain values from a certain website .Of course ,you might tell yourself there are other ways to to fetch a web page with PHP like :
Example 1 : Downloading A Web Page using Php/Curl:
Below is a Simple example how to fetch webpage using curl:
Example 2 : Login to a website with Apache HTTP Authentication:
You might want to access a protected page which has Apache HTTP Authentication . Below is the code how you can achieve this with curl .
Example 3 : Fetch a webpage by using proxies:
Example 4 : Send post data using Array:
Also we can send post data using an array: