开发者

How to verify the ownership of a website?

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!";
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜