Best way to syndicate content between sites?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jawanda
    Confirmed User
    • Feb 2003
    • 6040

    #1

    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
    Confirmed User
    • Feb 2003
    • 6040

    #2
    Come on guys, i know someone here has a good solution for me!

    -p

    Comment

    • psili
      Confirmed User
      • Apr 2003
      • 5526

      #3
      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.

      Comment

      • jawanda
        Confirmed User
        • Feb 2003
        • 6040

        #4
        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

        Comment

        • jawanda
          Confirmed User
          • Feb 2003
          • 6040

          #5
          timmmmeh?

          Comment

          • psili
            Confirmed User
            • Apr 2003
            • 5526

            #6
            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.

            Comment

            • FiReC
              Confirmed User
              • Jan 2002
              • 2350

              #7
              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'); ?>
              www.nubilefilms.com | www.nubiles.net | www.anilos.com | tubescript.nubiles.net | icq4162727

              Comment

              • jawanda
                Confirmed User
                • Feb 2003
                • 6040

                #8
                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

                Comment

                • DutchTeenCash
                  I like Dutch Girls
                  • Feb 2003
                  • 21684

                  #9
                  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)?

                  Comment

                  • jawanda
                    Confirmed User
                    • Feb 2003
                    • 6040

                    #10
                    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

                    Comment

                    • jawanda
                      Confirmed User
                      • Feb 2003
                      • 6040

                      #11
                      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

                      Comment

                      • jawanda
                        Confirmed User
                        • Feb 2003
                        • 6040

                        #12
                        Great info here guys, any other suggestions?

                        Thanks again,


                        -Phil

                        Comment

                        • mrkris
                          Confirmed User
                          • May 2005
                          • 2737

                          #13
                          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

                          Comment

                          • jawanda
                            Confirmed User
                            • Feb 2003
                            • 6040

                            #14
                            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

                            Comment

                            • psili
                              Confirmed User
                              • Apr 2003
                              • 5526

                              #15
                              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.

                              Comment

                              • jawanda
                                Confirmed User
                                • Feb 2003
                                • 6040

                                #16
                                holy crap psilli you are the BEST!!! Thank you so much!!!

                                Fuck yeah buddy

                                -P

                                Comment

                                Working...