Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Sep 2009
    Posts
    4
    Member #
    19843
    I have various affiliate agreements. Many of these offer xml feeds. i can get these working on my lap top version of the sites but am unable to get it working when i upload to the web. obviously I am missing something. anyone able to help?

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    You'll have to be more specific.

    Who is your webhost, and show us a website ... where it's supposed to appear.

    You'll be using PHP to display the feed, taken directly off the other sites(s),
    so we'll need a URL for one or more of those feeds too.

    Do you know much about PHP?
    Can you use "index.php" instead of "index.html", or do you know how to use .htaccess?

    I think we need more information.


  4. #3
    Junior Member
    Join Date
    Sep 2009
    Posts
    4
    Member #
    19843
    Hi, thanks very much for your interest.
    the test page is at:
    http://samuiselect.bizland.com/testxml.htm
    this works fine on the desktop but not on line.
    the hosting site is:
    http://www.bizland.com
    the original data comes from:
    http://www.r24.org

    the rest of your mail is close to Greek for me! all self taught and lacking I regret@!

    regards,
    Derrick
    Quote Originally Posted by mlseim
    You'll have to be more specific.

    Who is your webhost, and show us a website ... where it's supposed to appear.

    You'll be using PHP to display the feed, taken directly off the other sites(s),
    so we'll need a URL for one or more of those feeds too.

    Do you know much about PHP?
    Can you use "index.php" instead of "index.html", or do you know how to use .htaccess?

    I think we need more information.

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    Derrick ...

    So the information you need can only be gotten if you log into their website?

    Is there any information I can see without logging in?
    Example, a website that offers an RSS feed.

    If a login is required to see the RSS feed (XML file), then you can't do
    what you're trying to do. I mention the log-in, because I don't see
    any RSS feeds on this site: www.r24.org


  6. #5
    Junior Member
    Join Date
    Sep 2009
    Posts
    4
    Member #
    19843
    Hi again,
    on the R24 page there are examples of what are used:
    Implementation via XML:
    There are currently 3 xml feeds available:
    http://th.R24.org/xmlR24.php (hotel records with geo.loc.)
    http://th.R24.org/xmlR24db.php (available regions and provinces)
    http://th.R24.org/xmlR24review.php (hotel reviews)
    loading an XML hotel list:
    example xml source at "http://th.R24.org/xmlR24.php?p=PARTNER&r=bangkok&l=silom&s=name"

    Notes: this link is a XML feed. Parameters, see: http://th.R24.org/xmlR24.php
    For details, please check the source code of this document.
    all that is different after logging in is generating the different data and then pastng that onto my site.
    you can see from the source view on my samui-select page the code used.
    there is no instruction regarding an RSS feed anf there is no more than what is given above.

    regards,
    Derrick

  7. #6
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    Derrick ...

    There are a couple of ways to do this using PHP.

    If you view your XML data, you'll see that the data is made up of many tags.
    A PHP script opens that XML file and parses those tags.
    Below is an example script you can try.

    Here's the deal though ...
    The script can output the data using any format you want, and you select
    which tags to display. You may want to use a CSS stylesheet, tables, whatever.
    The possibilities are endless, and my example is like the very basic.
    You'll need to do some work to expand on using the data you need for your page.

    I set the display count to 10 in my example:
    Here is what the script does ... a working example of the script below:
    http://www.qbotz.com/hotel.php

    Your page might be called "index.php"?
    The place where the feed is displayed would be called
    by adding this line to your "index.php" file:
    <?php include("hotel_1.php")?>

    You copy and paste this script, and call it "hotel_1.php",
    and save it in the same directory as your "index.php" file.
    PHP Code:
    <?php

    // This is the XML file URL
    $feed_url "http://th.r24.org/xmlR24.php?p=PARTNER&r=bangkok&l=silom&s=name";

    // SET UP XML OBJECT.
    // If your webhost only allows PHP CURL method,
    // then you will have to let us know, as the coding
    // is completely different.
    $xml=simplexml_load_file($feed_url); 

    // How many items to display from the RSS Feed ...
    $count 10

    // Loop through all hotel tags
    foreach ($xml->hotel as $item) {

    if(
    $count 0){

    // Display them however you want, even if it
    // means using a CSS style sheet.  No limit to how
    // the information can be displayed.
    echo"
    Region: 
    {$item->region}<br />
    Hotel Tag: 
    {$item->hoteltag}<br />
    Address: 
    {$item->hoteladr}<br />
    Hotel Link: <a href='
    {$item->hotellink}'> ... more</a><br />
    <hr>
    <br /><br />
    "
    ;   

    }  
    $count--;  
    }
    ?>


  8. #7
    Junior Member
    Join Date
    Sep 2009
    Posts
    4
    Member #
    19843
    Hi again,

    thank you for your reply and the interest you have shown in sharing your knowledge.
    I apologise for the delay. I am currently on the road.

    I am not sure if my skill set will be able to cope with that information but I will certainly have a go.
    I will report back when i have had a chance to experiment.

    thanks again.

    Derrick.

    There are a couple of ways to do this using PHP.

    If you view your XML data, you'll see that the data is made up of many tags.
    A PHP script opens that XML file and parses those tags.
    Below is an example script you can try.

    Here's the deal though ...
    The script can output the data using any format you want, and you select
    which tags to display. You may want to use a CSS stylesheet, tables, whatever.
    The possibilities are endless, and my example is like the very basic.
    You'll need to do some work to expand on using the data you need for your page.

    I set the display count to 10 in my example:
    Here is what the script does ... a working example of the script below:
    http://www.qbotz.com/hotel.php

    Your page might be called "index.php"?
    The place where the feed is displayed would be called
    by adding this line to your "index.php" file:
    <?php include("hotel_1.php")?>

    You copy and paste this script, and call it "hotel_1.php",
    and save it in the same directory as your "index.php" file.
    PHP Code:
    <?php
     
    // This is the XML file URL
    $feed_url "http://th.r24.org/xmlR24.php?p=PARTNER&r=bangkok&l=silom&s=name";
     
    // SET UP XML OBJECT.
    // If your webhost only allows PHP CURL method,
    // then you will have to let us know, as the coding
    // is completely different.
    $xml=simplexml_load_file($feed_url); 
     
    // How many items to display from the RSS Feed ...
    $count 10
     
    // Loop through all hotel tags
    foreach ($xml->hotel as $item) {
     
    if(
    $count 0){
     
    // Display them however you want, even if it
    // means using a CSS style sheet. No limit to how
    // the information can be displayed.
    echo"
    Region: 
    {$item->region}<br />
    Hotel Tag: 
    {$item->hoteltag}<br />
    Address: 
    {$item->hoteladr}<br />
    Hotel Link: <a href='
    {$item->hotellink}'> ... more</a><br />
    <hr>
    <br /><br />
    "

     

    $count--; 
    }
    ?>
    [/quote]

  9. #8
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    FYI - A little background on the technology.

    The term to describe the technology you're trying to use is XML RPC (Remote Procedure Call), or more broadly, an XML API (Application Programmer's Interface).

    It's not intended to be displayed directly in a website, but instead to be used by programmers to display data from an external source, as per mlseim's example.

    This is definitely a more advanced aspect of web development. You should familiarize yourself with the basic functionalities of XML-RPC before proceeding, and decide on a back-end to use in order to retrieve and parse the data you're requesting.

    The provider may actually have code snippets (examples) on their website explaining how to interface with their API.

  10. #9
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    I wasn't sure if he knew what an API was.
    If an API is available, that would be a good thing.

    Some of these forum posts are hard to answer.
    I wish there was a profile section that a user could fill out.
    What languages they know, what scripts they've used (experience type stuff).
    At a glance, we would be able to know where to start the dialog.



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:13 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com