Status
Not open for further replies.

Brian77

Active Member
66
2010
7
0
Hi, I'm fetching post from RSS and in all posts are download button images. so every post have this

<a href="http://filehost.com/filepath/xxx" ><img src="http://downloadbutton.com/xxx.jpg" border="0" /></a>

Is it possible somehow write some code which will change all links to that download button image so I could use my own download button image? Thank you for help :)
 
2 comments
use this php code
Code:
[SIZE=2][COLOR=#ff0000]<?php
[/COLOR][COLOR=#0000cd]$var1[/COLOR][COLOR=#000000]  = '<a href="http://filehost.com/filepath/xxx" ><img  src="http://downloadbutton.com/xxx.jpg" border="0" /></a>';
[/COLOR]echo str_replace[COLOR=#000000]("http://downloadbutton.com/xxx.jpg","http_direct_link_of_new_image",[/COLOR][COLOR=#0000cd][SIZE=2]$var1[/SIZE][/COLOR][COLOR=#000000]);[/COLOR][COLOR=#ff0000]
?>[/COLOR][/SIZE]

also can be done by regex
 
Last edited:
Status
Not open for further replies.
Back
Top