PHP code to extract ID from Taobao URL_PHP tutorial

WBOY
Release: 2016-07-21 16:12:21
Original
982 people have browsed it

Copy code The code is as follows:

$taobao = 'taobao.com';
$tmall = 'tmall.com';
$guojitmall = 'tmall.hk';
$ juhuasuan = 'ju.taobao.com';

/*
Get the baby’s id

Leisure e-family

*/
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 ) {
                                                                                                                                                                                                                                                                                           >                                                                                                                                                                                                                                                                                          //echo $v,'
';
                                                                                                                                             >                                                                                                                                                                                                                                                                                                                      >                                                                                          
if (is_numeric ( $str )) {
                                                                                                    } else if ($NO == 0 || ($x > 9 && $x < ; 11)) {
                                                                                                                                                                                                                                                                     🎜>}
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/313662.htmlTechArticleCopy the code as follows: ?php $taobao = 'taobao.com'; $tmall = 'tmall.com' ; $guojitmall = 'tmall.hk'; $juhuasuan = 'ju.taobao.com'; /* Get the baby's id Casual e-family*/ function quid(...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template