SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2007
    Location
    London
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry case senstive string search:TIME CRITICAL

    hey,
    I found myself with an e-mail from the adsense team this morning saying some of my urls had porn etc included. Even though the actual videos aren't pornographic. I've been given 72 hrs to remove the adsense ads from any page which its url contains any word or words of an adult nature.

    I thought since they said it was only the url i could get the words from the query string and then if any of the words are found i would disable the adsense ads. I cane up with.

    PHP Code:
    $key=$_REQUEST['keyword'];

    $list=array(bad1,bad2,bad3,bad4);

    $ststr_replace($list"-"$key,$count); 
    I figured if the value of $count was more than 0 then disable the ads. It kinda works but its not case sensitive. For example if i have "Bad" and there is "bad" in the url then it is not recognised....
    Anyone got any ideas on how i can make something that is case sensitive.
    Adsense has £1300 for me from june i can't afford for my account to be closed. Any help is welcomed.

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    str_ireplace()

  3. #3
    Barefoot on the Moon! silver trophy Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,606
    Mentioned
    56 Post(s)
    Tagged
    1 Thread(s)
    First, visit the page they claim contains the words/links, then view the source in your browser.

    You can usually narrow down from there as to where they're being generated from.

    One clever attack I've seen with some CMSes is where an eval(base_64()) line of code had been inserted into some PHP files. That might be something to check for, expecially if the malicious words/links appear near the top of the generated html source.

  4. #4
    SitePoint Zealot
    Join Date
    Jul 2007
    Location
    London
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the replies crmalibu thank u, str_ireplace() looks like what i was looking for.
    force flow thats a good point thanks but i think u misinterpreted what i meant. these videos are uploaded by users on my site and in the url i use the title of the video in the fancy urls. users put words that google seems to find to be against their tos. i've checked the link that they sent to me and it was a tutorial on sex, there was no nudity but there are words mentioned in the title and description that the adsense rep. highlighted.

    i'll have a go using str_ireplace() and see how it works out tho, thanks again


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •