Home >Backend Development >PHP Tutorial >PHP extracts product ID from Taobao URL

PHP extracts product ID from Taobao URL

WBOY
WBOYOriginal
2016-07-25 09:07:562065browse
Used when building Taobao website
                 
                                                                                                                                                                                                                                                                                                    


$_REQUEST['s_k']; Taobao link searched by the user                                                                                                                                                                                                'taobao.com',//Taobao products
                                                                                                      'taobao.com', // Taobao products
                                         'tmall .com'//Mall products
  1.                                                                                                                                                                                                                                                                 if( strpos($s_k,$u))
  2.                                                                                                                                                                                                                     $p=$this->getParms($u ['query']);
  3.                                                                                           {
  4.                                                                              break;                                                                                                                                                                                           Code
Statement:
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