Hello, I would like your help with the following problem, which I have in this code.
function verificarParametro($loopurl,$urlHost) {
if (preg_match("/(\W|^){$urlHost}(\W|$)/i", $loopurl))
return true;
else
return false;
It checks the url by taking the parameter set to $urlHost
and checking on $loopurl
, if the value is true, otherwise it is false.
Now here's my problem, I need to do a full check from start to finish of the parameter that was specified in the $urlHost
field, even if it has any special characters or any other type of parameter, such as /*+-!|?\:
etc.
For example, if I put this to get the parameter below, it will give line error.
if (verificarParametroA('https://drive.google.com/file/d/abcdfghiglmnopqrstuvxz/
', 'drive.google.com/file/d/')) {
echo 'Sim'; }