Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-03-2011, 08:13 PM   PM User | #1
badj4s
New to the CF scene

 
Join Date: Apr 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
badj4s is an unknown quantity at this point
Thumbs down fetching image from rss

Okay, I am trying to grab an image from a Twitter RSS feed

Example of a feed feed: http://search.twitter.com/search.atom?lang=nl&q=twitter


In this feed there is an image:
<link type="image/png" href="http://a1.twimg.com/profile_images/1277933331/Harld_2-2_normal.jpg" rel="image"/>

I am trying to fetch the image and display it. I currently don't have a clue how to do it. someone that can point me in the right direction?

Cheers

Kevin
badj4s is offline   Reply With Quote
Old 04-03-2011, 08:51 PM   PM User | #2
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,045
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
That's a feed that is constantly changing ...
You'll have no way to know where the photo is.
By now, it's gone?

Look at your example feed and see if that image is still there.


.
mlseim is offline   Reply With Quote
Old 04-04-2011, 11:47 AM   PM User | #3
badj4s
New to the CF scene

 
Join Date: Apr 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
badj4s is an unknown quantity at this point
Quote:
Originally Posted by mlseim View Post
That's a feed that is constantly changing ...
You'll have no way to know where the photo is.
By now, it's gone?

Look at your example feed and see if that image is still there.


.
True, the point is that I want to fetch the changing image. I am looking for a way to extract whatever is set to rel="image"

A bit of background:

I am using Wordpress in combination with feedwordpress to syndicate a few Twitter RSS feeds. I am looking for a way to fetch the image of the "author" of the tweet, and set it as the author image for a Wordpress author.
badj4s is offline   Reply With Quote
Old 04-04-2011, 12:27 PM   PM User | #4
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,045
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
How many do you need to fetch?
The latest 10 of them? And you only need the image?


.
mlseim is offline   Reply With Quote
Old 04-04-2011, 01:28 PM   PM User | #5
badj4s
New to the CF scene

 
Join Date: Apr 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
badj4s is an unknown quantity at this point
Quote:
Originally Posted by mlseim View Post
How many do you need to fetch?
The latest 10 of them? And you only need the image?


.
Latest 10 would be good yeah! and yes, only the image is required
badj4s is offline   Reply With Quote
Old 04-04-2011, 02:11 PM   PM User | #6
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,045
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
They have a problem with their XML - not well formed.

The <link> tag is left unclosed.

I'm not sure how to get around that ... will get back to you on this later.
Unless someone else knows how to parse it. I can't get it work yet.

EDIT:
<link> is a self-closing tag.
I'm still stumped why I can't parse it ... still looking for a solution.



.

Last edited by mlseim; 04-04-2011 at 02:25 PM..
mlseim is offline   Reply With Quote
Reply

Bookmarks

Tags
image, rss

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:29 PM.


Advertisement
Log in to turn off these ads.