Last active
November 12, 2017 16:06
-
-
Save hexium310/86ec1abd777d6bea91dd16e894bdcf80 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dom = new DOMDocument(); | |
@$dom->loadHTML(file_get_contents('http://user.keio.ac.jp/~rhotta/hellog/')); | |
$through = (new DOMXPath($dom))->query('//div[@id="links"]//a[@href="2009-06-20-1.html"]'); | |
if ($through->length === 1) { | |
echo "今日のthrough: {$through[0]->nodeValue}\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment