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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 09-20-2013, 10:29 AM   #1
fris
Too lazy to set a custom title
 
fris's Avatar
 
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/>');
        });
    });
});
http://jsfiddle.net/7YDLP/

Hope someone can use this ;)
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-20-2013, 12:57 PM   #2
livexxx
Confirmed User
 
livexxx's Avatar
 
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
__________________
http://www.webcamalerts.com for auto tweets for web cam operators
livexxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2013, 01:04 AM   #3
freecartoonporn
Confirmed User
 
freecartoonporn's Avatar
 
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
thanks, will use it .
freecartoonporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2013, 04:12 PM   #4
SDSimon
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!<<<
SDSimon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-22-2013, 09:24 AM   #5
SeanLEE
Confirmed User
 
SeanLEE's Avatar
 
Join Date: Feb 2006
Location: Miami, FL
Posts: 1,556
Wow.,,, The Grinch is being giving.
__________________
I spammed in threads!
SeanLEE is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.