[Solved] How to get a custom parameter value using PHP


Try this:

preg_match("/http:\/\/(?:.*?\.)?(.+?)\//", $_GET['redirect'], $matches);

echo ucfirst($matches[1]);

Here is the reg ex test:
https://regex101.com/r/qQ2dE4/58

enter image description here

7

solved How to get a custom parameter value using PHP