![]() |
![]() |
![]() |
||||
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 |
Confirmed User
Join Date: Feb 2003
Posts: 6,040
|
Best way to syndicate content between sites?
Hey guys, easy straightforward question.
I need to be able to control a small amount of content on a 3rd party website, but they'd prefer not to give me full access to their servers .. so what's the best way to syndicate this content? Virtual Include? Php? is there something easier that I'm not thinking of? any advise greatly appreciate. thanks, -Phil |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Feb 2003
Posts: 6,040
|
Come on guys, i know someone here has a good solution for me!
![]() -p |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
|
What type of content and how is it formatted on the client end?
Can you just create an XML schema and let them pull it from your servers?
__________________
Your post count means nothing. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Confirmed User
Join Date: Feb 2003
Posts: 6,040
|
Quote:
Basically some text links and a few small pics that need to rotate weekly. I need to look into xml, that sounds like a good option but I don't even know where to start with it. Edit: On the client end it becomes part of the normal html-based page layout. Any tips? Thanks! -Phil |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Feb 2003
Posts: 6,040
|
timmmmeh?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
|
The only reason I was thinking XML as pretty much any scripting language could grab it from a remote server and parse it however they want - much like how RSS is such a big hit since it's just XML.
Code:
<?xml version="1.0"?> <content> <item> <link>http://somewhere.com</link> <text>text for the hyperlink</text> <img width="100" height="120">http://somewhere.com/img.jpg</img> </item> <item> <link>http://somewhere.com</link> <text>text for the hyperlink</text> <img width="100" height="120">http://somewhere.com/img.jpg</img> </item> <item> <link>http://somewhere.com</link> <text>text for the hyperlink</text> <img width="100" height="120">http://somewhere.com/img.jpg</img> </item> ....... </content> Basically, if you remove the data from the presentation (html), the end user has free reign on how they can display it. Then again, it takes added knowledge to be able to parse it in the first place.
__________________
Your post count means nothing. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Confirmed User
Industry Role:
Join Date: Jan 2002
Location: Land o Nubiles
Posts: 2,350
|
Quote:
__________________
www.nubilefilms.com | www.nubiles.net | www.anilos.com | tubescript.nubiles.net | icq4162727 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Feb 2003
Posts: 6,040
|
Quote:
At first i was just thinking of using a virtual include which i think would be easier, but i just read that virtual includes don't work cross-domain. anyone know if that's true? I gues i just need to try it lol .. Thanks again !! -Phil |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
I like Dutch Girls
Join Date: Feb 2003
Location: dutchteencash.com
Posts: 21,684
|
yeah in include maybe an iframe, so many options, you could treat it like a plugin
__________________
![]() ICQ 16 91 547 - SKYPE dutchteencash bob AT dutchteencash DOT com ... did you see our newest Sweet Natural Girl Priscilla (18)? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Confirmed User
Join Date: Feb 2003
Posts: 6,040
|
Quote:
Thanks, -Phil |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
Confirmed User
Join Date: Feb 2003
Posts: 6,040
|
Quote:
Ahh I forgot about iframes, that is another good option although id prefer to use a regular (non php) include if possible. ![]() Thanks! -P |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Join Date: Feb 2003
Posts: 6,040
|
Great info here guys, any other suggestions?
Thanks again, -Phil |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: May 2005
Posts: 2,737
|
i like rss:
require_once 'XML/RSS.php; $rss =& new XML_RSS('http://some_domain_here/rss'); $rss->parse(); print_r($rss->getItems()); |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
Confirmed User
Join Date: Feb 2003
Posts: 6,040
|
Quote:
![]() I of course have some studying to do, but I can see what you're trying to show me here ![]() -Phil |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Confirmed User
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
|
I got bored and hacked a javascript solution together from some web tutorials. No need for PHP or anything.
"sample.xml" file that could be stored on a remote server: Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <content> <item> <link>http://www.yahoo.com/</link> <text>This links to yahoo.com</text> <image>http://us.a1.yimg.com/us.yimg.com/i/ww/beta/y3.gif</image> </item> <item> <link>http://www.google.com</link> <text>Google is good.</text> <image>http://www.google.com/intl/en/images/logo.gif</image> </item> </content> [html] <html> <head> <title>XML Parser</title> <script language="JavaScript"> var xmlhttp; var output = ""; function loadXMLDoc(url) { // code for Mozilla, etc. if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest() xmlhttp.onreadystatechange=xmlhttpChange xmlhttp.open("GET",url,true) xmlhttp.send(null) } // code for IE else if (window.ActiveXObject) { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP") if (xmlhttp) { xmlhttp.onreadystatechange=xmlhttpChange xmlhttp.open("GET",url,true) xmlhttp.send() } } } function xmlhttpChange() { // if xmlhttp shows "loaded" if (xmlhttp.readyStatehahahaha4) { // if "OK" if (xmlhttp.statushahahaha200) { xmlObj = xmlhttp.responseXML; parseXML(xmlObj); } else { alert("Problem retrieving XML data") } } } function parseXML(xmlObj) { items = xmlObj.getElementsByTagName("item"); for(i=0;i<items.length;i++) { link = items[i].getElementsByTagName("link")[0].firstChild.nodeValue; text = items[i].getElementsByTagName("text")[0].firstChild.nodeValue; image = items[i].getElementsByTagName("image")[0].firstChild.nodeValue; output += "<p><a href=\"" + link + "\">" + "<img src=\""+image+"\" align=left>" + text + "</a></p><hr/>"; } document.getElementById("targetText").innerHTML = output; } </script> </head> <body onLoad="loadXMLDoc('sample.xml')"> <p>Output from xml document:</p> <div id="targetText"> <!-- output goes here --> </div> </body> [/html]
__________________
Your post count means nothing. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Confirmed User
Join Date: Feb 2003
Posts: 6,040
|
holy crap psilli you are the BEST!!! Thank you so much!!!
![]() Fuck yeah buddy ![]() -P |
![]() |
![]() ![]() ![]() ![]() ![]() |