Set image size from rss feed

I have an rss feed where the image size is not set, for example the image is displayed as ---

**hello.tv/imagecache/{size}/cloud/content-images**

      

So if I replace it with 300x400 than the image. So now how can I resize the image from the rss feed prior to saving it to the database.

I am working on php.

+3


source to share


1 answer


If you just need to replace {size} with the string "300x400", you can use something as simple as PHP built into the str_replace function.

$str = '**hello.tv/imagecache/{size}/cloud/content-images**'
$replacedStr = str_replace('{size}', '300x400', $str);

      



http://php.net/str_replace

0


source







All Articles