Forum Moderators: coopster

Message Too Old, No Replies

preg replace block images from a website

preg_replace

         

MrGecko

12:23 am on May 28, 2008 (gmt 0)

10+ Year Member



Hello how would I block images from a website such as example.com
the image tag will be in many different formats such as <img title="test" src="www.example.com/img.png" onlick="do some thing">.

Thanks,
Mr, Gecko

MrGecko

8:36 pm on May 28, 2008 (gmt 0)

10+ Year Member



If you can't tell me can you tell me where I can learn how?

eelixduppy

9:26 pm on May 28, 2008 (gmt 0)



Once you grab the html img string from the rest of the html then I would just do a simple strpos [php.net]() check on it and if it doesn't return false, block it.