Search. php can use file_get_contents to get & quot; www. baidu. coms? Wd $ keyword & quot; where $ keyword comes from the parameter wdsearch. phpfile_get_contents of search. php, and some replacement operations are performed. Finally, the echo content is j...
Use search. phpfile_get_contents
Obtain"http://www.baidu.com/s?wd=$keyword"
Where$keyword
Wd parameter from search. php
Search. phpfile_get_contents
Then perform some replacement operations, and finally echo the content
The next step is the use of jQuery, removing some Baidu elements.
The next question is how to change the action path of the "Baidu click" submit button next to the baidu search box
There is a submit in this form. I changed the action attribute of the form to which it belongs, which has no effect.
I hope the behavior is'search.php?wd='+$('#kw').val()
Instead'/s?wd='+$('#kw').val()
I also analyzed Baidu's script... it's absolutely messy. Please advise.
Reply content:
Use search. phpfile_get_contents
Obtain"http://www.baidu.com/s?wd=$keyword"
Where$keyword
Wd parameter from search. php
Search. phpfile_get_contents
Then perform some replacement operations, and finally echo the content
The next step is the use of jQuery, removing some Baidu elements.
The next question is how to change the action path of the "Baidu click" submit button next to the baidu search box
There is a submit in this form. I changed the action attribute of the form to which it belongs, which has no effect.
I hope the behavior is'search.php?wd='+$('#kw').val()
Instead'/s?wd='+$('#kw').val()
I also analyzed Baidu's script... it's absolutely messy. Please advise.
Check whether the form is submitted using js.
C.delegate("form", "submit", function() { C.find("iframe").on("load", function() { E() }); setTimeout(E, 1000) })
I found this code when analyzing Baidu's nu_instant_search.js, but I still cannot find the E function.