1 2 3 4 5 6 7 8 9 10
foreach ($results as $thread) { if(strpos($thread['contents'], 'Hacking attempt!') !== false) { fwrite($fwGood, $thread['url'] . "\n"); } else { fwrite($fwBad, $thread['url'] . "\n"); } echo $thread['url']; die(); }