Results 1 to 13 of 13
  1. #1
    Join Date
    May 2004
    Location
    New York City
    Posts
    94

    Parsing a URL with Brackets

    I'm trying to parse a url with Brackets:
    http://xml.traveltoday.net/xmlhotel.jsp?xml=<HotelRequest%20method="runHotelInfoListRequest">
    <HotelInfoListRequest><City>Springfield</City>
    <StateProvince>MO</StateProvince><Country>US</Country>
    <dataSetRequested>COMPLETE</dataSetRequested>
    </HotelInfoListRequest></HotelRequest>

    with Carp RSS....

    If you copy that URL into a browser it will dislay a feed, butu Carp RSS and PHP isn't working with that link....

    How can I change this type of link and make it parse with a feed?

    Anyone know?
    Searchen Networks Inc.
    www.searchen.com

  2. #2
    Join Date
    Dec 2004
    Location
    Canada
    Posts
    1,082

  3. #3
    Join Date
    May 2004
    Location
    New York City
    Posts
    94
    very interesting... I'm looking at this:
    http://www.4guysfromrolla.com/demos/....UrlEncode.asp

    Can you be more specific on how to use urlencode?
    Searchen Networks Inc.
    www.searchen.com

  4. #4
    Join Date
    May 2004
    Location
    New York City
    Posts
    94
    This is what I've got so far:

    Warning: urlencode() expects exactly 1 parameter, 0 given in /home/floridav/public_html/zhotel-reservations.php on line 73
    Searchen Networks Inc.
    www.searchen.com

  5. #5
    Join Date
    Dec 2004
    Location
    Canada
    Posts
    1,082

  6. #6
    Join Date
    May 2004
    Location
    New York City
    Posts
    94
    What about the rest of the string?

    <HotelInfoListRequest><City>Springfield</City>
    <StateProvince>MO</StateProvince><Country>US</Country>
    <dataSetRequested>COMPLETE</dataSetRequested>
    </HotelInfoListRequest></HotelRequest>

    Would that go in there aswell?
    Searchen Networks Inc.
    www.searchen.com

  7. #7
    Join Date
    Dec 2004
    Location
    Canada
    Posts
    1,082

  8. #8
    Join Date
    May 2004
    Location
    New York City
    Posts
    94

    *

    Thanks a bundle... I'll try this and let you know how I make out....
    Searchen Networks Inc.
    www.searchen.com

  9. #9
    Join Date
    May 2004
    Location
    New York City
    Posts
    94
    ok so check it out, this is what I've got.....

    <?php
    require_once 'carp/carp.php';
    CarpCacheShow('http://www.floridavisiting.com/hotels.php');
    ?>


    Inside hotels.php I have:

    <?php

    $url = 'http://xml.traveltoday.net/xmlhotel.jsp?xml=<HotelRequest%20method="runHotelInfoListRequest">
    <HotelInfoListRequest><City>Springfield</City>
    <StateProvince>MO</StateProvince><Country>US</Country>
    <dataSetRequested>COMPLETE</dataSetRequested>
    </HotelInfoListRequest></HotelRequest>';
    $url = urlencode($url);

    ?>


    How does that look, cause it aint workin?
    Searchen Networks Inc.
    www.searchen.com

  10. #10
    Join Date
    May 2004
    Location
    New York City
    Posts
    94
    I still can't get this damb thing to work, anyone else willing to help me out with this?

    *** Whoever helps me get this working:
    I am willing to give you full rights to the domain name
    http://www.blazingwebhosting.com
    Searchen Networks Inc.
    www.searchen.com

  11. #11
    Join Date
    May 2001
    Location
    Dayton, Ohio
    Posts
    4,962
    Originally posted by clasione
    I still can't get this damb thing to work, anyone else willing to help me out with this?

    Try this for a URL
    Code:
    http://xml.traveltoday.net/xmlhotel.jsp?xml=%3CHotelRequest%20method=%22runHotelInfoListRequest%22%3E%3CHotelInfoListRequest%3E%3CCity%3ESpringfield%3C/City%3E%3CStateProvince%3EMO%3C/StateProvince%3E%3CCountry%3EUS%3C/Country%3E%3CdataSetRequested%3ECOMPLETE%3C/dataSetRequested%3E%3C/HotelInfoListRequest%3E%3C/HotelRequest%3E
    -Mat Sumpter
    Director, Product Engagement
    Penton Media

  12. #12
    Join Date
    May 2004
    Location
    Central Indiana
    Posts
    168
    I really wouldn't pass all that information through a URL. I'd either store it in a cookie or multiple <input type="hidden"> with a POSTed form.

    -- HW
    Zen Interactive
    Paid, and VPS Hosting Plans

  13. #13
    Join Date
    May 2004
    Location
    New York City
    Posts
    94
    http://www.floridavisiting.com/zhotel-reservations.php

    ok, I tryed that long url, didn't work....

    <?php
    require_once 'carp/carp.php';
    CarpCacheShow('http://xml.traveltoday.net/xmlhotel.jsp?xml=%
    3CHotelRequest%20method=%22runHotelInfoListRequest%22%
    3E%3CHotelInfoListRequest%3E%3CCity%3ESpringfield%
    3C/City%3E%3CStateProvince%3EMO%3C/StateProvince%3E%3CCountry%3EUS%3C/Country
    %3E%3CdataSetRequested%3ECOMPLETE%3C/dataSetRequested%3E%3C/HotelInfoListRequest
    %3E%3C/HotelRequest%3E');
    ?>


    you'll notice that on the home page, the feeds are working, so it's just a matter of getting a moe valid url for CARP to use....

    ___
    ps, try and cut that post in half, it stretching this thread all over..
    Last edited by clasione; 05-26-2005 at 04:05 PM.
    Searchen Networks Inc.
    www.searchen.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •