'ello all.
I am trying to pull variables from a URL.
My URL can look like:
website.com
website.com/
website.com/index.php
website.com/index.php/
website.com/index.php/1
website.com/index.php/1/2
website.com/index.php/1/2/abc
etc...
Here is my current code to get the 1/2/abc part.
My question is ... is this the most efficient way? Can someone spoof PHP_SELF?
$VARS = preg_replace('#^([\/]?[-_A-Za-z0-9]*(\.php)?[\/]?(.*))$#', '\\3', $_SERVER['PHP_SELF']);
echo $VARS;
TIA!