Hi!
I need to pass a URL from database field to a redirect function. To do this I read the text from the database replacing the tag <a href= with <a href=redirect.php3?op=redir&url=
Ok... but I need to urlencode all the URL because if not, php returns the URL bad cuz character like "#" or "?" and all the text after that char are just ignored.
I'm doing this with:
$fulltext = ereg_replace("<a href=", "<a href=redirect.php3?op=redir&sid=$sid&url=", $fulltext);
How can I pass the urlencoded to redirect.php3. I need to urlencode all text from <a to a> in a given field, and there are more than 1 Url in that text... this is to count the hits received in that url.
I explained my problem? Sorry for my bad english 😛
Regards!