27 lines
556 B
PHP
27 lines
556 B
PHP
<?php
|
|
|
|
$url = "https://myriadd.gumroad.com";
|
|
|
|
if (str_contains($url, '?')) {
|
|
$url = substr($url, 0, strpos($url, "?"));
|
|
}
|
|
|
|
$string = file_get_contents($url);
|
|
|
|
$dom = new DomDocument();
|
|
$dom->loadHTML($string);
|
|
$finder = new DomXPath($dom);
|
|
|
|
$content = $finder->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' stretched-link ')]");
|
|
|
|
foreach($content as $node) {
|
|
$tmp = $node->attributes[0]->value;
|
|
if (str_contains($tmp, '?')) {
|
|
$tmp = substr($tmp, 0, strpos($tmp, "?"));
|
|
}
|
|
|
|
print_r($tmp);
|
|
echo "<br>";
|
|
}
|
|
|
|
?>
|