Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8079143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:00:57+00:00 2026-06-05T16:00:57+00:00

I wrote a Flickr search engine that makes a call to either a public

  • 0

I wrote a Flickr search engine that makes a call to either a public feed or a FlickrApi depending on a selected drop down box.
examples of the JSONP function calls that are returned:

a) jsonFlickrApi({"photos":{"page":1, "pages":201, "perpage":100, "total":"20042", "photo":[{"id":"5101738723"...

b) jsonFlickrFeed({ "title": "Recent Uploads tagged red","link": "http://www.flickr.com/photos/tags/red/","description": "", ....

the strange thing is that in my local install (xampp) both work fine and i get images back BUT when i host the exact same code on the above domain then the jsonFlickrApi doesn’t work. What i notice (by looking at Firebug) is that for the jsonFlickrApi the response Header says Connection close

Also, Firebug doesn’t show me a Response tab when i submit a request to the jsonFlickrApi

here is the code:

function makeCall(uri)
{
    xmlhttp = new XMLHttpRequest();
    xmlhttp.onreadystatechange = callback;
    xmlhttp.open("GET", "jsonget.php?url="+uri, true);
    xmlhttp.send();
}

function jsonFlickrApi(response)
{ 
  var data= response.photos.photo ;
  var output = "";
  output += "<img src=http://farm" + data[4].farm + ".static.flickr.com/" + data[1].server + "/" + data[4].id + "_" + data[4].secret + ".jpg>";
  document.getElementById("cell-0").innerHTML = output ;
}

//Public Feed
function jsonFlickrFeed(response)
{
  var data= response.items[0].media.m ;
  alert(data);
  var output = "";
  output += "<img src=" + data+ ">";
  document.getElementById("cell-0").innerHTML = output ;
}

function callback()
{
    //console.log("Ready State: " + xmlhttp.readyState + "\nStatus" + xmlhttp.status);
    if(xmlhttp.readyState==4 && xmlhttp.status==200)
    {
                var jsonResponse = xmlhttp.responseText; 
        jsonResponse = eval(jsonResponse);
    }
}

examples of calls:

a)

http://flickr.com/services/rest/?method=flickr.photos.search&api_key=75564008a468bf8a284dc94bbd176dd8&tags=red&content_type=1&is_getty=true&text=red&format=json&timestamp=1339189838017

b)

http://api.flickr.com/services/feeds/photos_public.gne?tags=red&format=json&timestamp=1339190039407

Question: why does my connection close? why is it working on localhost and not on the actual domain?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:00:59+00:00Added an answer on June 5, 2026 at 4:00 pm

    Looking at the HTTP response headers of

    http://flickr.com/services/rest/?method=flickr.photos.search&api_key=75564008a468bf8a284dc94bbd176dd8&tags=red&content_type=1&is_getty=true&text=red&format=json&timestamp=1339189838017

    I get a 302 with location

    http://www.flickr.com/services/rest/?method=flickr.photos.search&api_key=75564008a468bf8a284dc94bbd176dd8&tags=red&content_type=1&is_getty=true&text=red&format=json&timestamp=1339189838017

    So, what flicker wants to tell you is “use http://www.flicker.com instead of flicker.com!”. With this URL I get content.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Wrote a small app that accesses a bunch of search websites and puts the
I wrote some script in a site. The script makes a new spreadsheet and
I wrote a PHP script that retrieves values from a MySQL Query. I used
I wrote a function that draws out a slice of a pizza based on
I have an application that pulls a list of the top places on flickr
I've designed a nifty little website that uses phpflickr (the PHP Flickr API) to
Wrote a login custom dialogbox static LoginDialog loginDialog; public static bool ShowLoginDialog() { result
Wrote a simple program that calls ls, then passes each line through regexp filtering
Wrote a quick Java proggy to spawn 10 threads with each priority and calculate
I wrote a symfony task to fill a database of sample data. Here's a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.