只需阅读页面内容就像读取文件一样.PHP为您完成连接.然后只需通过正则表达式或简单的字符串比较查找字符串.
$url = 'http://my.url.com/';
$data = file_get_contents( $url );
if ( strpos( 'maybe baby love you', $data ) === false )
{
// do something
}
Run Code Online (Sandbox Code Playgroud)
小智 5
//The Answer No 3 Is good But a small Mistake in the function strpos() I have correction the code bellow.
$url = 'http://my.url.com/';
$data = file_get_contents( $url );
if ( strpos($data,'maybe baby love you' ) === false )
{
// do something
}
Run Code Online (Sandbox Code Playgroud)