I don't think your problem is with the API. You need to offer the correct http_referer header. That's almost assuredly how the server is redirecting you. So set your referer header to the page's link and see what happens.
jg On Wed, Sep 25, 2013 at 12:54 PM, Balázs Szántó <szanto90bal...@gmail.com>wrote: > Hello! > > I discovered some strange behaviour about the Google image search. I want > to find a picture of a cat. I type cat in google images, press enter and I > pick this little one: > > http://www.freegreatpicture.com/files/157/1562-cute-little-cat.jpg > > [I just inserted the link of the original image]. When you try to follow > this link at the very first time, it will do two redirects: > > 1. Request URL: > http://www.freegreatpicture.com/files/157/1562-cute-little-cat.jpg > 2. Request URL:http://www.freegreatpicture.com/1562 > 3. Request URL:http://www.freegreatpicture.com/cat/photo-1562 > > The response to the 3. request content types is text/html. Basically it > loads the website where this cute kitty lives. So now the kittens images is > cached, if you would try one more time to hit this URL: > > http://www.freegreatpicture.com/files/157/1562-cute-little-cat.jpg > > It would load the image. Super! But what about when you would try this > from a native client app? I mean I would want to download the image and > show it in a picture box. It wouldn't load the image and you would have no > idea why. It would gave back the text/html content what is not image/jpeg. > > My question is, is anyone met with this problem? Any work around that to > filter out this kinds of urls? > > -- > -- > You received this message because you are subscribed to the Google > Groups "Google AJAX APIs" group. > To post to this group, send email to > google-ajax-search-api@googlegroups.com > To unsubscribe from this group, send email to > google-ajax-search-api+unsubscr...@googlegroups.com > To view this message on the web, visit > > https://groups.google.com/d/msgid/google-ajax-search-api/2cecee01-5467-48d5-81cc-65e82e438473%40googlegroups.com > For more options, visit this group at > http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "Google AJAX APIs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to google-ajax-search-api+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- Jeremy R. Geerdes Generally Cool Guy Des Moines, IA If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church! http://www.debraheightswesleyan.org -- -- You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group. To post to this group, send email to google-ajax-search-api@googlegroups.com To unsubscribe from this group, send email to google-ajax-search-api+unsubscr...@googlegroups.com To view this message on the web, visit https://groups.google.com/d/msgid/google-ajax-search-api/CAF4cwg_uSKOiZoj8U-Qz8Bosrydtpeeg5w%2BJMbrRg8okL5Wwdw%40mail.gmail.com For more options, visit this group at http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-search-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.