Copy Code code as follows:
<?php
$taobao = ' taobao.com ';
$tmall = ' tmall.com ';
$guojitmall = ' tmall.hk ';
$juhuasuan = ' ju.taobao.com ';
/*
Take the baby's ID
Leisure Group E
*/
function Quid ($strurl) {
$strurl = Strtolower ($strurl);
if (Strpos ($strurl, ' id ')!== false) {
$arr = Explode ('? ', $strurl);
$arr = Explode (' & ', $arr [1]);
$NO = 0;
foreach ($arr as $k => $v) {
if (is_string ($v)) {
Determine if ID is included
if (Strpos ($v, ' id ')!== false) {
Process the number of return IDs that contain item or num
if (Strpos ($v, ' item ')!== false | | Strpos ($v, ' num ')!== false) {
echo $v, ' <br/> ';
$i = Strrpos ($v, ' = ');
$str = substr ($v, $i + 1);
if (Is_numeric ($STR)) {
return $NO = $str;
}
} else {
echo $v, ' <br/> ';
$i = Strrpos ($v, ' = ');
$str = substr ($v, $i + 1);
$x = strlen ($STR);
if (Is_numeric ($STR)) {
if ($x ==11) {
$NO = $str;
else if ($NO = = 0 | | ($x > 9 && $x < 11)) {
$NO = $str;
}
}
}
}
}
}
return $NO;
}
}
?>