There are two ways to perform text check points in http:
Method 1: correlation value judgment
| // This method is often used to take the initiative to find trouble, but it cannot be used to check the function, you can consider using this method (I have not encountered a situation where the function cannot be checked by checking the value) // no matter where the value is to be determined, in server response. Char buffer [20] = {0}; Int J; int I; char str1 [] = "dianping"; web_reg_save_param ("param1", "lB = www. "," RB =. com "," ord = 18 ", last); web_url (" www.hao123.com "," url = http://www.hao123.com/"," resource = 0 "," reccontenttype = text/html ", "Referer =", "snapshot = t1.inf", "mode = html", extrares, "url =/line.gif", Enditem, "url =/images/dropdown.gif", Enditem, "url =/images/guangg/baike.gif", Enditem, last); // lr_log _ Message ("% s,", lr_eval_string ("{param1}"); If (atoi (strcmp (str1, lr_eval_string ("{param1}") = 0) {// check whether the value obtained by the association function is the same as the defined value. For example, print the following lr_log_message ("Give it to me !! ");} |
Method 2: function judgment Note: The web_find function cannot check the value that is not displayed on the page, whereas web_reg_find can. Web_reg_find cannot be placed at the end of action.
| Web_reg_find ("text = dianping", last); web_url ("www.hao123.com", "url = http://www.hao123.com/", "resource = 0", "reccontenttype = text/html ", "Referer =", "snapshot = t1.inf", "mode = html", extrares, "url =/line.gif", Enditem, "url =/images/dropdown.gif", Enditem, "url =/images/guangg/baike.gif", Enditem, last); web_find ("web_find", "What = Music MP3", last ); |