In this post, we can find some string data in current url in browser using PHP predefine function. So just go through this simple function in PHP.

 
strpos($_SERVER['REQUEST_URI']);
 
Using Example: -


if(strpos($_SERVER['REQUEST_URI'],"myexamplestring")!==false)
{
 echo “myexample.php”
}

In this code "myexamplestring" is a string that we are searching in current URL and $_SERVER['REQUEST_URI'] - function is used here for getting the current URL.

if you can share your feedback with using comments and contact form below. if you have any query regarding Google Adsense or Blogging then you can ask me. i will reach you as soon as possible.

Thanks,

0 comments :

Post a Comment

 
# Top