Parameters on Baidu search result page last search term (BS)

Source: Internet
Author: User

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]

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.