我想构建一个简单的反向链接检查程序,检查其他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(),但这不起作用:/
一些建议?谢谢!