XML instead of text

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nicos

    XML instead of text

    Hello people,
    i do this on my domain:
    <?php
    header("Content-type: text/xml");
    header("Content-Type: ".$contentType. "; charset=UTF-8");
    readfile("http://www.contra.gr/rss/home?type=lates t");
    ?>

    and i get the XML data from other domain as text. How can i get it as
    XML?

    Thanks,
    Nicos

  • ZeldorBlat

    #2
    Re: XML instead of text


    Nicos wrote:
    Hello people,
    i do this on my domain:
    <?php
    header("Content-type: text/xml");
    header("Content-Type: ".$contentType. "; charset=UTF-8");
    readfile("http://www.contra.gr/rss/home?type=lates t");
    ?>
    >
    and i get the XML data from other domain as text. How can i get it as
    XML?
    >
    Thanks,
    Nicos
    XML is text -- in a specific format. I'm not entirely sure what you're
    asking.

    Comment

    • IchBin

      #3
      Re: XML instead of text

      ZeldorBlat wrote:
      Nicos wrote:
      >Hello people,
      >i do this on my domain:
      ><?php
      > header("Content-type: text/xml");
      > header("Content-Type: ".$contentType. "; charset=UTF-8");
      > readfile("http://www.contra.gr/rss/home?type=lates t");
      >?>
      >>
      >and i get the XML data from other domain as text. How can i get it as
      >XML?
      >>
      >Thanks,
      >Nicos
      >
      XML is text -- in a specific format. I'm not entirely sure what you're
      asking.
      >
      You have to look at the XML parsing classes to parse the file to extract
      the values..

      Thanks in Advance...
      IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
      _______________ _______________ _______________ _______________ ______________

      'If there is one, Knowledge is the "Fountain of Youth"'
      -William E. Taylor, Regular Guy (1952-)

      Comment

      • Nicos

        #4
        Re: XML instead of text


        IchBin wrote:
        ZeldorBlat wrote:
        Nicos wrote:
        Hello people,
        i do this on my domain:
        <?php
        header("Content-type: text/xml");
        header("Content-Type: ".$contentType. "; charset=UTF-8");
        readfile("http://www.contra.gr/rss/home?type=lates t");
        ?>
        >
        and i get the XML data from other domain as text. How can i get it as
        XML?
        >
        Thanks,
        Nicos
        XML is text -- in a specific format. I'm not entirely sure what you're
        asking.
        >
        You have to look at the XML parsing classes to parse the file to extract
        the values..
        >
        Thanks in Advance...
        IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
        _______________ _______________ _______________ _______________ ______________
        >
        'If there is one, Knowledge is the "Fountain of Youth"'
        -William E. Taylor, Regular Guy (1952-)
        Can't i just copy an xml file from another server to mine instead of
        parsing the file?

        Comment

        • Nicos

          #5
          Re: XML instead of text


          ZeldorBlat wrote:
          Nicos wrote:
          Hello people,
          i do this on my domain:
          <?php
          header("Content-type: text/xml");
          header("Content-Type: ".$contentType. "; charset=UTF-8");
          readfile("http://www.contra.gr/rss/home?type=lates t");
          ?>

          and i get the XML data from other domain as text. How can i get it as
          XML?

          Thanks,
          Nicos
          >
          XML is text -- in a specific format. I'm not entirely sure what you're
          asking.
          When i open this file in Internet Explorer or Firfox, it doesn't show
          the xml file as usual. (with +'s and -'s) just a plain uncolored text.

          Comment

          • IchBin

            #6
            Re: XML instead of text

            Nicos wrote:
            IchBin wrote:
            >ZeldorBlat wrote:
            >>Nicos wrote:
            >>>Hello people,
            >>>i do this on my domain:
            >>><?php
            >>> header("Content-type: text/xml");
            >>> header("Content-Type: ".$contentType. "; charset=UTF-8");
            >>> readfile("http://www.contra.gr/rss/home?type=lates t");
            >>>?>
            >>>>
            >>>and i get the XML data from other domain as text. How can i get it as
            >>>XML?
            >>>>
            >>>Thanks,
            >>>Nicos
            >>XML is text -- in a specific format. I'm not entirely sure what you're
            >>asking.
            >>>
            >You have to look at the XML parsing classes to parse the file to extract
            >the values..
            >>
            >Thanks in Advance...
            >IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
            >______________ _______________ _______________ _______________ _______________
            >>
            >'If there is one, Knowledge is the "Fountain of Youth"'
            >-William E. Taylor, Regular Guy (1952-)
            >
            Can't i just copy an xml file from another server to mine instead of
            parsing the file?
            >
            Sorry, then I do not understand the value of this xml file. What is it's
            purpose?

            Thanks in Advance...
            IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
            _______________ _______________ _______________ _______________ ______________

            'If there is one, Knowledge is the "Fountain of Youth"'
            -William E. Taylor, Regular Guy (1952-)

            Comment

            • Tim Hunt

              #7
              Re: XML instead of text


              Nicos wrote:
              ZeldorBlat wrote:
              Nicos wrote:
              Hello people,
              i do this on my domain:
              <?php
              header("Content-type: text/xml");
              header("Content-Type: ".$contentType. "; charset=UTF-8");
              readfile("http://www.contra.gr/rss/home?type=lates t");
              ?>
              >
              and i get the XML data from other domain as text. How can i get it as
              XML?
              >
              Thanks,
              Nicos
              XML is text -- in a specific format. I'm not entirely sure what you're
              asking.
              >
              When i open this file in Internet Explorer or Firfox, it doesn't show
              the xml file as usual. (with +'s and -'s) just a plain uncolored text.
              I get highlighted text with +'s and -'s in both FF and IE

              Tim

              Comment

              • Tim Hunt

                #8
                Re: XML instead of text


                Tim Hunt wrote:
                Nicos wrote:
                ZeldorBlat wrote:
                Nicos wrote:
                Hello people,
                i do this on my domain:
                <?php
                header("Content-type: text/xml");
                header("Content-Type: ".$contentType. "; charset=UTF-8");
                readfile("http://www.contra.gr/rss/home?type=lates t");
                ?>

                and i get the XML data from other domain as text. How can i get it as
                XML?

                Thanks,
                Nicos
                >
                XML is text -- in a specific format. I'm not entirely sure what you're
                asking.
                When i open this file in Internet Explorer or Firfox, it doesn't show
                the xml file as usual. (with +'s and -'s) just a plain uncolored text.
                >
                I get highlighted text with +'s and -'s in both FF and IE
                >
                Tim
                Duh. I was looking at www.contra.gr not your copy

                Try using the same content-type as them, application/xml

                Tim

                Comment

                Working...