youneek Posted April 18, 2007 Share Posted April 18, 2007 I wrote a script to help figure out an archive.org score. It is supposed to lookup muliple domains, but isn't working. It's only doing one. Can somebody help? <? if (!isset($_GET["domains"])){ ?> <form method="GET" action=""> <textarea name="domains" rows="10" cols="30"></textarea><br /> <input type="submit" name="send" value="Send"> </form> <? }else{ $domains = explode("\n", $_GET['domains']); foreach ($domains as $addr){ $url = "http://web.archive.org/web/*/http://".$addr; $data = implode("", file($url)); preg_match_all ("/<p class=\"mainSearchTitle\">([^`]*?)<\/p>/", $data, $matches); foreach ($matches[0] as $match) { $match = strip_tags($match); echo $match."<br />"; } } } ?> Link to comment https://forums.phpfreaks.com/topic/47659-help-with-foreach-loop/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.