Hi, my perl-knowledge is not very good so hopefully someone here can help me.
what I want to do seems quite simple: replacing an url.
This is what I have:
$url is fetched from a database-field:
[http://www.otherdomain.com/adserver/adclick.php?n=a42caa8f]
$text_gen is also fetched from a database-field :
[<a href="http://www.otherdomain.com/adserver/adclick.php?n=a42caa8f" target="_blank"><img src="http://www.otherdomain.com/adserver/adview.php?what=zone:329&n=a42caa8f" border="0" alt="">]
===================
my perl-code to replace the $url in $text_gen by $kod:
===================
....
my $url=$row_html->[1];
my $kod="http://www.domain.com?hbid=13";
$text_gen=~s/$url/$kod/gs;
.....
===================
unfortunately the link-url isn't replaced and I don't know why.
if I have an URL in $url and $text_gen like " http://www.domain.com/index.html " then it works!
Any comments?
Regards,
Manu
Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
what I want to do seems quite simple: replacing an url.
This is what I have:
$url is fetched from a database-field:
[http://www.otherdomain.com/adserver/adclick.php?n=a42caa8f]
$text_gen is also fetched from a database-field :
[<a href="http://www.otherdomain.com/adserver/adclick.php?n=a42caa8f" target="_blank"><img src="http://www.otherdomain.com/adserver/adview.php?what=zone:329&n=a42caa8f" border="0" alt="">]
===================
my perl-code to replace the $url in $text_gen by $kod:
===================
....
my $url=$row_html->[1];
my $kod="http://www.domain.com?hbid=13";
$text_gen=~s/$url/$kod/gs;
.....
===================
unfortunately the link-url isn't replaced and I don't know why.
if I have an URL in $url and $text_gen like " http://www.domain.com/index.html " then it works!
Any comments?
Regards,
Manu
Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.