Russ
<b>Retired *****</b>
- Messages
- 3,168
- Reaction score
- 2
- Points
- 38
I have this script, basically what it is to do, is connect to a database, get all of the URLs out of a table, and check them for a string, if it finds it say so, if not say it didn't.. it connects to the db alright, but its returning them all as not found, although I know it is on one of the pages it's searching.. heres the code:
Basically, its suppose to search for tufat.com..
PHP:
<?
echo "<b>Users found:</b><br> ";
mysql_connect("localhost", "8888888888", "8888888888888");
mysql_select_db("888888888888");
$result = mysql_query("SELECT * FROM `ebp_ad` LIMIT 0, 30 ");
while($row = mysql_fetch_array($result)){
file_get_contents($row[url]);
if (preg_match("/^tufat.com/", '$data')) {
echo "A match was found." .$row[url]. "<br>";
} else {
echo "A match was not found." .$row[url]. "<br>";
}
}
?>
Basically, its suppose to search for tufat.com..
Last edited: