I have one URL string like
'http://example.com/glamour/url.php?ad_id=[ad_id]&pubid=[pubid]&click_id=[click_id]'
So I want to fetch value of all parameters which mentioned in []. Like ad_id,pubid,clickid
How can I fetch values of parameters?
I have one URL string like
'http://example.com/glamour/url.php?ad_id=[ad_id]&pubid=[pubid]&click_id=[click_id]'
So I want to fetch value of all parameters which mentioned in []. Like ad_id,pubid,clickid
How can I fetch values of parameters?
<?php
echo $_GET['ad_id']; // ad_id is the name of parameter.
?>
This code will give you the value of parameter
For String of URL try this :
$parts = parse_url($url);
parse_str($parts['query'], $query);
echo $query['ad_id'];
You could use this command.
print_r($_GET);
And then you could see the all parameters in the url.