Original query string (OQ) parameters on the baidu search result page)

Source: Internet
Author: User

When the baidu search result page appears, the content entered in the search box is automatically saved. Baidu search uses this parameter to name it OQ separately.

Baidu search result URL parameter originally queried string (OQ)
NameOQ
Meaning original query string (original querystring)
Parameter Value
OQ and the keyword (WD) parameter values share the same characteristics and are alsoEnter your own search term,Keyword in the baidu search box,Related search candidate wordsOrIncorrect keywords prompt correct search termAnd can contain up to 38 Chinese characters.

The original query string not only appears in the related search (F = 1), but also in several other search forms, such as instant search prompt (F = 3) and error prompt correct search (F = 12) there will also be OQ

From a logic perspective, the original query string (OQ) should be determined after the search form (f) before the related search _ Semantic Relevance (rs_src ).

[PHP]

$ Original_querystring = $ _ post ['original _ querystring'];
$ Original_querystringgb =$ _ post ['original _ querystringgb'];
If (preg_match ("/IE = UTF-8 | Baidu \? /I ", $ Baidu ))
{If (preg_match ("/(OQ =) ([^ &] +)/I", $ baidudecode, $ original_querystring ))
Echo "<tr class = \" center \ "> <TD> original query string </TD> ". "<TD> ". $ original_querystring [2]. "</TD> </tr> ";}
Else
{If (preg_match ("/(OQ =) ([^ &] +)/I", $ baidudecodegb, $ original_querystringgb ))
Echo "<tr class = \" center \ "> <TD> original query string </TD> ". "<TD> ". $ original_querystringgb [2]. "</TD> </tr> ";}

[/PHP]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.