I have explained the seven parameters that appear in the prompt form (F = 3) with the search box, including search history (rsv_sug), keyboard repetition speed (rsv_sug3), and search box position (rsv_bp ), number of times prompted in the search box (rsv_sug1), the method used to enter the search box (rsv_sug5), the method used to search in the search box (rsv_sug2), and other methods used to enter the search term (rsv_n ). Next we will introduce the last search term (BS ).
Baidu search result URL parameter last search term (BS)
NameBS
Meaning last search term (before search)
Parameter Value
BS is equivalent to the parameter values of the original query string (OQ) and keyword (WD,You can enter your own search term, Baidu search box prompt word, related search candidate word or error prompt correct search term, and so on. The length is limited to 38 Chinese characters.
The last search term (BS) exists in most search forms.
After a user performs a search, Baidu retains the last search term, which is called BS.
[PHP] $ beforesearch =$ _ post ['beforesearch']; $ beforesearchgb =$ _ post ['beforesearchg']; if (preg_match ("/IE = UTF-8 | bd_page_type = | Tn = [\ W] + (? = ZD)/I ", $ Baidu) {If (preg_match ("/(BS =) ([^ &] +)/I ", $ baidudecode, $ beforesearch )) echo "The Last search term is ". $ beforesearch [2];} else {If (preg_match ("/(BS =) ([^ &] +)/I", $ baidudecodegb, $ beforesearchgb )) echo "The Last search term is ". $ beforesearchgb [2];} [/PHP]