Page 1 of 1

this is a tough one

Posted: Mon Sep 16, 2002 9:40 am
by deezin
Hi -

I own a jobboard and I have a problem that I want to run a script to fix. If I have a job that someone posts that is scammy - usually the person says to go to a certain url and / or says go to their site and go to job #.

so for example the job is:
==========
You must apply for this job at http://www.randomjobs.com/job.asp?id=456

Looking for a graphic designer, please apply by going to randomjobs.com and going to job#456
==========
Would it be something like this? (I know I have a lot of this wrong, so please help me out.

$query = "SELECT id, description FROM projects";

$result = mysql_query($query,$SESS_DBH);

while ($row = mysql_fetch_array($result)) {

$id = $row["id"];

$description = str_replace("You must apply for this job at http://www.randomjobs.com/job.asp?id=", "", $row["description"]);



$updatequery = "UPDATE projects SET description = '$description' WHERE id = $id";

mysql_query($updatequery,$SESS_DBH);

}

What would you do? Thank you for your help.

Posted: Mon Sep 16, 2002 9:45 am
by jason
Your best bet would be to either (a) Check each entry manually for that sort of stuff, or (b) check for any links to any sites, and remove them from the listing.