PHP - 简单链接检查器

时间:2011-11-09 18:38:57

标签: php

我想构建一个简单的反向链接检查程序,检查其他URL上是否存在URL,但我无法弄清楚如何转义URL,需要正确检查preg_match

    $html = file_get_contents($backlink_url[$index]); 
    // Get the content from a webpage
    $check = preg_match("/".$check_url[$index]."/", $html);
    // Check if the link exsists

我尝试了urlencode()和addslashes(),但这不起作用:/

一些建议?谢谢!

0 个答案:

没有答案
相关问题