Guest User

search.php

a guest
Jul 16th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <base target="read">
  2. <?php
  3. require_once('htmlparser.inc');
  4.  
  5. $WORD = rawurlencode($_GET['res']);
  6. print "検索語句:".rawurldecode($WORD)."<br>";
  7.  
  8. $URL = ("https://find.2ch.net/?COUNT=30&STR=" ."$WORD");
  9. $htmlText = @file_get_contents( "$URL" );
  10. $parser = new HtmlParser ($htmlText);
  11.  
  12. while ($parser->parse())
  13. {
  14. $value = $parser->iNodeValue;
  15. if($parser->iNodeName = "a" && str_replace("test/read","",$parser->iNodeAttributes['href']) != $parser->iNodeAttributes['href'] && $parser->iNodeValue)
  16. print "<a href=http://localhost/rep2/read.php?&url=".$parser->iNodeAttributes['href'].">$value</a><br>";
  17. }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment