I want to create a tag to allow user to claim the ownership of his website.
How would I get the tag and the match it against the one I have generated.
The tag format will be <!--tag-->
how will I verify this tag if I am ab开发者_JAVA百科le to get the html using file_Get_contents("url");
it's just a string match.
<?php
$tagCode = "<!-- abc123 -->";
$pageContent = file_get_contents("http://www.somesite.com/");
if (strpos($pageContent, $tagCode) !== false) {
echo "it matched!";
}
精彩评论