Hey, thanks for the point in the right direction.
I managed to get rid of all the images etc by using
PHP Code:
<?
$dataURL = "friendssite"; $result = file_get_contents($dataURL); function strip($result){ //REGEXP TO STRIP ALL TAGS THAT START WITH <img... return eregi_replace('(.jpg|.gif|.png)', "", $result);
} // USAGE AS FOLLOWS $include = strip($result); echo ($include); ?>
I know this is very sloppy because all it does is cut out the end of the code. It still leaves <img src="image"> but I found that it wasnt removing the background images.
Is there a way to replace multiple values?
eg
PHP Code:
return eregi_replace("< *img[^>]* *>", "", $variable); return eregi_replace("< *background[^>]* *>", "", $variable);
This wouldnt work because of the $variable being used twice, but I'm not sure how to stick it all together at the other end if I used more than one variable.
Thanks for your help, has taught me about eregi_replace
__________________
Websites Created;
warscope.com
ratepayers.org.nz
Last edited by lothop; 10-27-2008 at 07:20 PM..
Reason: Values, Variables
|