checking user's current page and condition statement
<p>guys im looking for a comprehensive code to check if a visitor is in index.php  then showing some lines to him</p>

<p>i mean i want to consider every possibility for this code</p>

<pre><code>function curPageURL() {
 $pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
 return $pageURL;
}

$curentUrl = curPageURL();


if (preg_match("/index.php/",$curentUrl) || preg_match("/index.html/",$curentUrl)) {

}
</code></pre>

<p>but im looking for a more complete code to see if user is in index page of my website</p>
