Jump to content

Recommended Posts

I am attempting to write an ad-on for a banner exchange script, I am trying to write a mod to be run on a cron script once daily, what its going to do is connect to the exchange database, get the URLs of the members, open the site and search for our code in it.. It gets the urls, and opens them, but doesn't search for the code, or atleast say it does.. here's the code:

 

<?

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("/^x10exchange/", '$data')) {
    echo "A match was found." .$row[url]. "<br>";
} else {
    echo "A match was not found." .$row[url]. "<br>";
} 
}
?> 

 

 

Basically, I just want it to search for x10exchange on the page, I know some of them have it.. Later on, I am going to code it to suspend the member if its not found, but this is just a test.. It returns them all as not found.. here's an example:

 

http://x10exchange.com/forums/usercheck.php

Link to comment
https://forums.phpfreaks.com/topic/105136-solved-searching-for-a-string/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.