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-15-2005, 09:31 AM   #1
jawanda
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
jawanda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2005, 09:35 AM   #2
jawanda
Confirmed User
 
Join Date: Feb 2003
Posts: 6,040
Come on guys, i know someone here has a good solution for me!

-p
jawanda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2005, 09:37 AM   #3
psili
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.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2005, 09:40 AM   #4
jawanda
Confirmed User
 
Join Date: Feb 2003
Posts: 6,040
Quote:
Originally Posted by psili
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?

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
jawanda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2005, 09:45 AM   #5
jawanda
Confirmed User
 
Join Date: Feb 2003
Posts: 6,040
timmmmeh?
jawanda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2005, 09:48 AM   #6
psili
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>
Let's say you somehow dymanically create the above XML file. Any remote server can grab it when they want, parse it (using any number of parsers; i.e. tons of free PHP tutorials for parsing) into the HTML formatting they need.

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.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2005, 10:07 AM   #7
FiReC
Confirmed User
 
Industry Role:
Join Date: Jan 2002
Location: Land o Nubiles
Posts: 2,350
Quote:
Originally Posted by jawanda
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
If you want full control of the look and feel of your section on the page, why not just do a remote include like you mentioned. Create an html page on your server and have them include it with <? include('http://www.yourserver.com/pageonyourserver.html'); ?>
FiReC is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2005, 10:09 AM   #8
jawanda
Confirmed User
 
Join Date: Feb 2003
Posts: 6,040
Quote:
Originally Posted by psili
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>
Let's say you somehow dymanically create the above XML file. Any remote server can grab it when they want, parse it (using any number of parsers; i.e. tons of free PHP tutorials for parsing) into the HTML formatting they need.

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.
Cool psilli thanks for the info!

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
jawanda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2005, 10:10 AM   #9
DutchTeenCash
I like Dutch Girls
 
DutchTeenCash's Avatar
 
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
DutchTeenCash is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2005, 10:10 AM   #10
jawanda
Confirmed User
 
Join Date: Feb 2003
Posts: 6,040
Quote:
Originally Posted by FiReC
If you want full control of the look and feel of your section on the page, why not just do a remote include like you mentioned. Create an html page on your server and have them include it with <? include('http://www.yourserver.com/pageonyourserver.html'); ?>
Does the "client" webpage need to be .php in order for that to work?

Thanks,

-Phil
jawanda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2005, 10:11 AM   #11
jawanda
Confirmed User
 
Join Date: Feb 2003
Posts: 6,040
Quote:
Originally Posted by thinkx
yeah in include maybe an iframe, so many options, you could treat it like a plugin

Ahh I forgot about iframes, that is another good option although id prefer to use a regular (non php) include if possible.



Thanks!

-P
jawanda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2005, 10:34 AM   #12
jawanda
Confirmed User
 
Join Date: Feb 2003
Posts: 6,040
Great info here guys, any other suggestions?

Thanks again,


-Phil
jawanda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2005, 10:40 AM   #13
mrkris
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());
__________________

PHP-MySQL-Rails | ICQ: 342500546
mrkris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2005, 11:08 AM   #14
jawanda
Confirmed User
 
Join Date: Feb 2003
Posts: 6,040
Quote:
Originally Posted by mrkris
i like rss:

require_once 'XML/RSS.php;
$rss =& new XML_RSS('http://some_domain_here/rss');
$rss->parse();
print_r($rss->getItems());
Awesome!

I of course have some studying to do, but I can see what you're trying to show me here

-Phil
jawanda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2005, 11:46 AM   #15
psili
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>
And the following is an html page that will parse that XML file into HTML and place it where you want in an html page:

[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.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2005, 10:56 PM   #16
jawanda
Confirmed User
 
Join Date: Feb 2003
Posts: 6,040
holy crap psilli you are the BEST!!! Thank you so much!!!

Fuck yeah buddy

-P
jawanda 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.