Get Link of an entry from Atom

a6ghost

New Member
I have this twitter feed. I am trying to parse the link to the original tweet. Its the first \[code\]entry\[/code\] in \[code\]feed\[/code\]. I want to fetch the url \[code\]http://twitter.com/shiplu/statuses/220057421899505664\[/code\] inside \[code\]href\[/code\] attribute of first \[code\]link\[/code\] element.I have used this xpath \[code\]/feed/entry[0]/link[@rel = "alternate" and @type = "text/html"]\[/code\]But it returns empty string. Code looks like this, \[code\]$link = $xml->xpath('/feed/entry[0]/link[@rel = "alternate" and @type = "text/html"]');\[/code\]I think I am almost there. Could anyone correct me what I am doing wrong here.
 
Back
Top