fork(4) download
  1. <?php
  2.  
  3. $html = '<html>
  4. <head></head>
  5. <body>
  6. <a href="https://w...content-available-to-author-only...e.com/user.asp?ref=fvFCF9D8N4Ak">bubu</a>
  7. </body>
  8. </html>';
  9.  
  10. $dom = new DOMDocument;
  11. @$dom->loadHTML($html);
  12.  
  13. foreach ($dom->getElementsByTagName('a') as $tag) {
  14.  
  15. $href = $tag->getAttribute('href');
  16.  
  17. if (!empty($href)) {
  18.  
  19. echo $queryString = parse_url($href, PHP_URL_QUERY);
  20. }
  21. }
  22.  
  23.  
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
ref=fvFCF9D8N4Ak