![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,372
|
Tip for javascript people: parsing xml/rss feeds without php
I been wanting to parse feeds on a static only site, but usally you have to use a php file to do it, I just realized Google has a feed parsing api, which turns a xml/rss feed into a json object.
Thought I would pass it along. You basically take https://ajax.googleapis.com/ajax/ser...main.com/feed/ it turns the feed into a json object. I put up a jsfiddle demo which grabs the google trends. Code:
$(function() { $.getJSON('https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://www.google.com/trends/hottrends/atom/feed?pn=p1&num=-1&callback=?&alt=json-in-script', function(data) { $.each(data.responseData.feed.entries, function(i, item) { var title = item['title']; $('#trends').append(title + '<br/>'); }); }); }); Hope someone can use this ;)
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: May 2005
Location: UK
Posts: 1,201
|
I tend to use the google playground to see what things look like quickly
http://code.google.com/apis/ajax/pla...eeds#load_feed |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
|
thanks, will use it .
__________________
SSD Cloud Server, VPS Server, Simple Cloud Hosting | DigitalOcean
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Aug 2002
Location: Calif. USA
Posts: 140
|
Thank you fris. I will also be using this.
>>>Winners WIN because they NEVER GIVE UP!<<< |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Feb 2006
Location: Miami, FL
Posts: 1,556
|
Wow.,,, The Grinch is being giving.
__________________
I spammed in threads! |
![]() |
![]() ![]() ![]() ![]() ![]() |