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]