Page 1 of 1

how to perform this ??

Posted: Fri Jul 06, 2007 6:43 am
by PHPycho
Hello forums !!
Consider the following case:

Code: Select all

$ref_url = "http://www.xyz.com";
// or $ref_url = "http://xyz.com" (without 'www')
$check_url = "http://xyz.com/index.php?action=a&mode=b&blabla";
I want to check the if the $check_url contains the $ref_url or not.
Thanks in advance to all of you.

Posted: Fri Jul 06, 2007 6:53 am
by onion2k
Try strpos().

Posted: Fri Jul 06, 2007 7:01 am
by Gente
Does your check need to include url validation?

Posted: Fri Jul 06, 2007 8:27 am
by superdezign