I'm using the following URL to search eBay:
http://open.api.ebay.com/shopping?callname=FindPopularItems&version=849&siteid=3&appid=app_id_removed8&MaxEntries=100&ItemSort=EndTime&ItemType=FixedPriceItem&IncludeSelector=SearchDetails&responseencoding=XML&QueryKeywords=breaking+bad&HideDuplicateItems=true&outputSelector=PictureURLLarge&descriptionSearch=false
It works, but the gallery images it returns are so small.
e.g.
http://thumbs1.ebaystatic.com/pict/2311096735168080_1.jpg
How can i make it return large images?
I've read this: eBay API - How to get large item pictures?
Which suggested I add &outputSelector=PictureURLLarge&descriptionSearch=false but I just get the same response.
FPI is an old API call and doesn't support a lot of the parameters that newer API calls allow, such as an output selector, item sorting, description search, etc.
To get larger images, you may need to use a simple brute force find/replace on the thumbnail URLs.
If you search/replace "8080_" with "4040_" or "9696_" you'll get larger images. Try it right now in your browser with any eBay item# and it should work.
See "eBay API Gallery Image Resizing" on my eBay tech tips site for more info on this.
Related
I am building a "Reddit" like site.
The User can post an URL from which I want to get the correct image with PHP.
What I would need is a script which sites like Facebook or Tumblr use to fetch the Images.
I saw already scripts which get the images by getting the HTML Content and searching for "img" tags.
Are there any better methods/scripts available?
Maybe even scripts which will order the images by the size: The bigger the image the more important it is.
Thanks for answers
You may want to check out PHPQuery, it will allow you easily iterate through all images on a given website. You can then work out the areas of each image and sort them accordingly.
It depends a bit for what you're looking for and what the image is that the user would like to have with his post. To give you an example: I once wrote a method that searches for a logo of a company on the company's website. To do so, I searched for, indeed, the img-tags using simple_html_dom and filtered those tags on the existence of logo in the alt-tag. The results are displayed to the user to select the right image; it could be that you find multiple images fitting your purpose.
I would indeed, as you proposed, have a look at the size and skip small images (e.g. smaller dan lets say 50 px).
I am trying to build a server side application (PHP) which can download photos that has been shared with me in Google +, but I couldn't find a method in Google+ PHP Client Library for this. I tried to get it through PicasaWeb API, but the Album 'Photos from posts' is not listed when trying to get the list of all albums.
Please suggest some way to do this.
Fetch the posts themselves. In there will be the URLs for the photos that you can then fetch to get the actual images.
Note that there are "resize" tags in the image URL path so if you see something like .../s2048/... or .../w497-h373/... then that will instruct G+ to give you a smaller version (which greatly reduces bandwidth and latency over requesting the full-size image and scaling it locally). Just remove that component of the path to get the full-size image.
I'm trying to get a thumbnail of flickr pictures in PHP.
All I saw was this in their API:
http://www.flickr.com/services/api/misc.urls.html
Which is a overkill. In instagr.am/twitpic and others I found a very easy way of doing so (just adding to the url the request).
Is there an option with flickr I'm missing?
If you have the URL to the Flickr image, all you have to do is modify the suffix to get a different size of the photo. For example:
http://farm1.staticflickr.com/2/1418878_1e92283336_m.jpg
This URL loads the medium sized photo. If we simply change the _m to _t, we would get the thumbnail:
http://farm1.staticflickr.com/2/1418878_1e92283336_t.jpg
You can also use s for small, z for medium, and b for large.
You could just use a PHP wrapper around Flickr API and keep it simple - http://phpflickr.com/
You can parse the photo's ID out of the URL and get the thumbnail URL via flickr.photos.getSizes. This is likely how Twitpic/Instagram handle it.
For future readers, flickr doesn't support the simple functionality that other photo sharing services does. So the answer to my question is you can't.
If you know the username of the flickr user you can try to use this small bot. It uses the feed to retrieve the last images of the user, so it works only on the last images... I hope it will help you.
I'm trying to integrate the Flickr API with Jquery Gallerific. If you're familiar with Gallerific you know photos in the Gallery can have a caption. I'm trying to pull photos from a specific set from a user using flickr.photosets.getPhotos to get thumbnails. However, with this method it's not possible to get description for each thumbnail, only for the set so I'm having to run flickr.photos.getInfo for each photo in the set, which works but is pretty much useless as a page takes 10+ seconds to load. Does anyone know how to obtain flickr photos from a set with the individual description for each photo? I've looked through the API but can't seem to find anything.
Thanks in advance!
Never actually used the Flickr API but what about just loading the thumbnails initially, then using JSONP (or a custom "proxy" of sorts) to query photo information asynchronously after the page has loaded. Or, better yet, when the user actually hovers over an image.
I am using a bespoke JQuery/PHP script which parses a Flickr feed using SimpliePie and outputs an image gallery.
I have instructed my client to upload there images into their flickr account.
The images are showing but the feed seems to be limiting to 20 images, however, there are 40 images in the stream.
I have checked the API and there doesn't seem to be any paramaters to change this.
Has anyone come across this before, can anyone help me tweak the feed so that it pulls all the images in the photostream?
Here is the Flickr Stream and feed...
http://www.flickr.com/photos/44280289#N04/
http://api.flickr.com/services/feeds/photos_public.gne?id=44280289#N04&lang=en-us&format=rss_200
It appears that they do limit it to the initial 20 photos on flickr
http://www.flickr.com/help/website/
Why do I only see 20 items in RSS
feeds?
Flickr only shows the latest 20 items
in a feed. Because of this, the first
time you connect to a feed you will
only see the most recent items. But if
your RSS reader saves items (as most
do) you will see more than 20 as the
items build up over time.
But you could potentially use the flickr api, particularly http://www.flickr.com/services/api/flickr.photosets.getPhotos.html
Which allows you to get more (You will need to get an API key however)
Edit:
Though I have not personally used it I have read/heard good things about http://phpflickr.com/ which is a flickr api wrapper for php 4 and 5
Edit 2:
Unfortunately I can not comment on your comment but if you take a look at this link from the flickr code blog
http://code.flickr.com/blog/2008/08/25/api-responses-as-feeds/
Some API responses can been provided as feeds so you could try using "&format=feed-rss_200" not sure if it includes getPhotos yet though.
It seems like you want to use the photosets.getPhotos api call. It will give you a maximum of 500 photos.
Here is an example which gives you the url of the photo in url_o
http://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&extras=url_o&photoset_id=72157622766901612&api_key=[YOUR APIKEY HERE]
You need an api key to make it work.
You can also get the output as JSON directly by adding &format=json to the url.