How To Parse URL In PHP

In this tutorial I will tell you how to parse URL in PHP, Normally we are create an custom function to explode URL into different arrays.PHP have built in PHP function parse_url () to parse URL.

Below are simple example to parse URL

1
2
3
$nexUrl = 'https://graph.facebook.com/xxxxxx/feed?limit=400&until=1353532418';
$parseURL = parse_url($nexUrl);
print_r($parseURL);
Result:

The following two tabs change content below.
Hi, This is Parvez Alam from India. I am software developer with 6 years’ experience in web development. I have submitted articles on PHP, Mysql, Magento,CSS, HTML, jQuery, web designing and social API. You can subscribe to my blog via RSS/Twitter/Google plus and Facebook. parvez1487(at)gmail(dot)com