Home >Backend Development >PHP Tutorial >Teach you step by step how to do keyword matching project (search engine)----On the fourth day, teach you how to do it----_PHP tutorial
The fourth day
Xiao Shuai Shuai finally mastered the magic secrets.
Xiao Shuaishuai came to the company with hope. The secret book given by Boss Yu was different. He wanted to go and play with the secret book in front of Boss Yu immediately, so that he could see how powerful the secret book was. (0 Little did he know that the secret book was created by him0)
<?<span>php reqiure </span>'ExtendedCurl.php'<span>; </span><span>$curl</span> = <span>new</span><span> ExtendedCurl(); </span><span>$content</span> = <span>$curl</span>->get("http://www.taobao.com"<span>); </span><span>if</span>(<span>$curl</span>-><span>hasError()){ </span><span>throw</span> <span>new</span> <span>Exception</span>(<span>$curl</span>->getError(), <span>$curl</span>-><span>getHttpCode()); } </span><span>echo</span> <span>$content</span>;
Xiao Shuai Shuai actually just knows how to use it, but he doesn’t know why he does it. (Actually, it’s because I don’t have enough mental training, I’m just proficient in the moves)
Xiao Shuaishuai took this result to Boss Yu, and Boss Yu took a look: Well, not bad, it’s improved compared to last time.
Xiao ShuaiShuai thought that Mr. Yu would be surprised, and felt that Xiao ShuaiShuai's ability had reached a new level.
But Xiao Shuai Shuai was not discouraged, at least the boss still praised him.
Xiao Shuaishuai replied: Thank you Boss Yu for your praise. With your guidance, I can do this task better, and I will continue to work hard in the future. So next...this...what to do with keywords...(strike while the iron is hot)
Boss Yu, after listening to Xiao Shuaishuai’s words, I feel that Xiao Shuaishuai has potential and is a talent that can be molded. (I have this idea silently in my heart) However, I still have to answer Xiao Shuaishuai’s question, and then speak kindly :
Do you know html dom? It doesn’t matter if you don’t know. You can make up for these basic knowledge in the future. You can learn about it PHP Simple HTML DOM Parser I will send you the address later. There are some examples above. It should be easy for you to get started.
Reference Manual:
PHP Simple HTML DOM Parser: http://simplehtmldom.sourceforge.net/
PHP Simple HTML DOM Parser Manual: http://simplehtmldom.sourceforge.net/manual.htm
Xiao Shuai Shuai replied: Thank you, Boss Yu, you are so awesome! (Xiao Shuai Shuai is actually quite smart)
Xiao Shuaishuai once again took the martial arts secret book to practice. He believed that one day he would master a magical skill like Jiuyang Magic, and he could master any martial arts with just a little bit of knowledge.
Currently, Baidu promotion has three matching methods: precise, phrase, and broad. Generally speaking, the golden combination matching method is: broad matching + search term report + negative keywords. In terms of traffic, it's broad>phrase>accurate. You can set it according to your actual situation!
If you want an exact match, you need to put quotes around ABC.