What it does is that it gets sites from a database, however some sites contain illegal strings like rapidshare.com and i dont want those sites to be listed.
So i have created another while in the other while loop which loops through a database with illegal strings but it doesnt seem to work.
It only works when theres one illegal string in the database :/ if i have more it doesnt work.
Would greatly appreciate if someone had a look
Best Regards
So i have created another while in the other while loop which loops through a database with illegal strings but it doesnt seem to work.
It only works when theres one illegal string in the database :/ if i have more it doesnt work.
Would greatly appreciate if someone had a look
Best Regards
Code:
//Get sites
while($article = mysql_fetch_assoc($result)){
$siteID = $article['feed_id'];
$article_ID = $article['article_id'];
$articleTitle = $article['title'];
$article_Description = $article['summary'];
// Here we get all forbidden strings
$data = mysql_db_query($databaseName, "SELECT strings FROM `evots_filter` WHERE 1");
// loops through all the strings and check
while($row = mysql_fetch_array($data)) {
$filterWord = $row['strings'];
$pos = strpos($article_Description, $filterWord);
if ($pos === false) {
print('<li>');
print('<div class="article">');
printf('<h2><a href="/out.php?site=%s&article=%s" target="_blank" rel="external">%s</a></h2>',$siteID, $article_ID, $articleTitle);
printf('<div class="article_date">%s</div>', $article["date_posted"]);
printf('<div class="article_summary">%s</div>', $article_Description);
print('</div>');
print('</li>');
}
else{
}
}
}





