Hello,
This is a reply to an e-mail that you wrote on Thu, 10 Jul 2003 at 00:14,
lines prefixed by '>' were originally written by you.
Just a few things I picked up on while scanning your code...
> $alltext = ereg_replace('<img src="'.$web, '<img src="',
$alltext);
Some parts of the URL will be case insensitive i.e. the domain name and
protocol. The lazy way around this is to just use a case insenstive
regular expression here.
> $alltext = ereg_replace('<img src="'.$web, '<img src="',
$alltext);
> $alltext = ereg_replace('<img src= "', '<img src="',
$alltext);
> $alltext = ereg_replace('<img src ="', '<img src="',
$alltext);
> $alltext = ereg_replace('<img src = "', '<img src="',
$alltext);
> $alltext = ereg_replace('<img src="', '<img
src="'.$iproxy.$web.'/',
> $alltext);
This could all be done in one line, something like...
"/(<img.+src)( )*(=)( )*([\"'])?($web)([^ "']).*(>)/i"
but it is getting late here so that proably won't work exactly like that.
Also check for a <BASE HREF=....> tag, this can be used to set the first
part of the URL for any links, pictures etc that are not referenced by a
full URL anywhere in the page.
> /*IMAGE.PHP*************************************
You may want to record the headers the remote server gives you for the
images and send them on, or take a guess at them from the file name and
send them using the header() function.
All the best,
David.
--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/
Professional Web Development by David Nicholson
http://www.djnicholson.com/
QuizSender.com - How well do your friends actually know you?
http://www.quizsender.com/
(developed entirely in PHP)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php