I only have a few domains left, and they all have active code on them. One site that I've maintained is called Jimazon and it processes the Flickr Photo site.

Flickr has been around for a long time and it's where I store my Photo Sets, for a charge of about $60 a year. Jimazon is also capable of showing Trending and Recent photos across the huge Flickr database.

I just got an email from Flickr telling all of it's developers that as of April their API (Application Program Interface) now requires a “User-Agent” header. Yea, Huh?, that's what I said.

So I went to ChatGPT and asked the wise entity in the sky how to do it. It showed me nicely, with a code example, then I loaded up the twelve Jimazon PHP functions that access the Flickr API, and added two lines of code to each one. The $user_agent variable is simply "Jimazon", followed by the name of the function.

For example: $user_agent = "Jimazon/getphotos";.

Then I dropped down to the Curl code that grabs the data off the Flickr servers and added a USERAGENT option which looks like this:

function curl_get($URL) {

$tout = 5000;

$c = curl_init();

curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($c, CURLOPT_URL, $URL);

curl_setopt($c, CURLOPT_CONNECTTIMEOUT,$tout);

curl_setopt($c, CURLOPT_USERAGENT, $user_agent);

$contents = curl_exec($c);


if ($contents) return $contents;

else return FALSE;


I'm going to make the code changes now, assuming that the addition of a USERAGENT will not break Flickrs API before they implement the requirement, and work just fine after they do.

I really hope Flickr had a good reason to do this, because looking at their developers board, many folks are confused and pissed. I'm putting this post on that board and I'm hoping the Flickr engineers will tell me if this is right, or wrong...

Update: It's a good thing I have no life (although I did my laundry this morning). Flickr faced too much outrage over this addition and they have changed their mind, no USERAGENT required :-) Oh well, it was fun to challenge my brain and succeed.

I fixed my app, per their requirements, in a couple of hours. Not everyone was capable of doing that, apperently.