What I need to do is the following, but I'm stuck and don't know how...
1) Grab the location of the page being checked. I.E. if http://www.somesite.com/dir1/dir2/page.htm was being checked, I'd need to have a variable with value http://www.somesite.com/dir1/dir2/ from that (so grabbing the folder the page is in and the url).
2) Construct an eregi_replace or preg_replace command that takes any img tag where the src does not start with http://, and add in the variable from 1.
So an image tag like <img src=http://www.somesite.com/dir1/dir2/image.gif> would remain unchanged, but <img src=image.gif> would be changed to <img src=http://www.somesite.com/dir1/dir2/image.gif>.
Any idea would be more than welcome!