开发者

Script / Code to check an output of a webpage and return result

开发者 https://www.devze.com 2023-03-27 05:33 出处:网络
I am looking for a script e.g. perl or code - C# etc. in order to che开发者_如何学Cck a webpage for a string.

I am looking for a script e.g. perl or code - C# etc. in order to che开发者_如何学Cck a webpage for a string.

For example to check if a php page is running, we can echo Hello World, and the script would then check for the string "Hello World" on the webpage output and return true or false.


Fetch the data with LWP, then run a pattern match over the retrieved document.


Look for a ScreenScraper in your preferred language. You can use it to get the HTML output of the site and get a specific part, like paragraphs, images or - like in your case - a single string (mostly using XPath).

0

精彩评论

暂无评论...
验证码 换一张
取 消