Replace a flickr image url from big to small size with substr_replace

I have been trying out the change the flickr image url from the big size to small and medium size without using the image url’s again.I have landed up with the solution.

<?php
$url="http://farm5.static.flickr.com/4074/4940684667_9c99ff0288_b.jpg";
echo substr_replace($url,"m",-5,1);
echo "<br />";
echo $url;
?>
Advertisements

Adding Flickr Photos in WordPress

1.Login to WordPress Admin Dashboard.

2.Click on the ‘Plugins’ tab to expand on the left hand side of the screen.

3.Then Click on the ‘Add New’ under the plugins tab.

4.Then Search for ‘Flickr Photo Album’ plugin.

5.Click on ‘Install’ the plugin and ‘Activate’ the Plugin.

6.Now under ‘Settings’ tab on the left hand side you will have ‘Photo Album’.

7.Click on ‘Photo Album’ and it will ask you for the ‘Flickr API Key’ and ‘Shared Secret Key’.

8.Now login to your Flickr Account.After the successfull login of your flickr account.

9.Go to the URL and change to http://www.flickr.com/services.

10.In that on the right hand side of the screen, you will have the option called ‘Get An API Key’ Click on that.

11.You will have two types of API Key. One is ‘Apply for Non-Commerical’ and ‘Apply for Commerical’.

12.Choose the one ‘Apply for Commerical API Key’.

13.In that, it will ask you for the ‘Name of the APPlication’, ‘Description of the Application’ and the n accept the Flickr License Agreement. And then click on Apply.

14.After all this, it will show your ‘API Key’ and ‘Shared Secret Key’.

15.Copy that and go to the Step 7 where it is asking you for those details.Paste it over there and the click on the below button on that screen.

16.Next it show the button to ‘Retrieve the Flickr Permissions’ click on that and it will redirect to a website where you have authorize the flickr permission.

17.Once you authorize it,then click on the ‘Apply Permission’ button.It will take few minute to apply your settings and after that you have finished configuring the Flickr Photos to your wordpress.

18.For Adding a Flickr Photos to your Post or Pages. You will have the Flickr icon on the Post or Page.Click on that and add your flickr photos;

Created By
Karthik Sekar