MOD EDIT: Posts moved into new thread; please don't clutter the stickied 'Parse Error' thread with other unrelated errors/issues.

bradgrafelman;10990576 wrote:

@: What's wrong is that all of the '>' characters (with the exception of those inside of strings or part of the PHP opening/closing tags) have been converted into an HTML entity '>' for whatever reason.

EDIT: Woops, looks like there was also one '<' that got converted as well.

Thanks very much, just got that. The error I'm getting now is ...

Warning: DOMDocument::load() [domdocument.load]: URL file-access is disabled in the server configuration in /home/theloun2/public_html/feed.php on line 5

Warning: DOMDocument::load(http://feeds.feedburner.com/TheLoungeCrusadesFacebookWall) [domdocument.load]: failed to open stream: no suitable wrapper could be found in /home/theloun2/public_html/feed.php on line 5

Warning: DOMDocument::load() [domdocument.load]: I/O warning : failed to load external entity "http://feeds.feedburner.com/TheLoungeCrusadesFacebookWall" in /home/theloun2/public_html/feed.php on line 5

Can you help with this please?

Thanks very much for your help!!!

    stfagos;10990580 wrote:

    ...
    Warning: DOMDocument::load() [domdocument.load]: URL file-access is disabled in the server configuration in /home/theloun2/public_html/feed.php on line 5
    ...

    Either change your server PHP config to all URL access (allow_url_fopen) or else use the cURL functions to grab the remote content, instead.

      NogDog;10990587 wrote:

      Either change your server PHP config to all URL access (allow_url_fopen) or else use the cURL functions to grab the remote content, instead.

      Thank you. I've heard about cURL. Is it easy to use - does it just require changing some code?

        "Easy" is relative. It takes more PHP code than a simple file_get_contents(), but it's certainly not rocket science, either. At its most basic, you're looking at something like this (taken from http://www.tuxradar.com/practicalphp/15/10/2:

        <?php
            $curl = curl_init();
            curl_setopt ($curl, CURLOPT_URL, "http://www.php.net");
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        
        $result = curl_exec ($curl);
        curl_close ($curl);
        print $result;
        ?> 
        
          NogDog;10990591 wrote:

          "Easy" is relative. It takes more PHP code than a simple file_get_contents(), but it's certainly not rocket science, either. At its most basic, you're looking at something like this (taken from http://www.tuxradar.com/practicalphp/15/10/2:

          <?php
              $curl = curl_init();
              curl_setopt ($curl, CURLOPT_URL, "http://www.php.net");
              curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
          
          $result = curl_exec ($curl);
          curl_close ($curl);
          print $result;
          ?> 
          

          Thank you very much. I tested it, but the problem is, I'm looking to create a facebook feed for my band to parse to my website, and it doesn't seem that curl can separate the elements like DOMDocument was able to do.

            No but you can take the data received from curl and turn it into a DOMDocument (basically you're fetching data with cURL instead of file_get_contents())

              Derokorian;10990593 wrote:

              No but you can take the data received from curl and turn it into a DOMDocument (basically you're fetching data with cURL instead of file_get_contents())

              Ahhh, I get you! Thanks, I'll test it out. Sorry for being a nuisance!

                It's worked! Thanks so much! Now to sort out the formatting....:-)
                Thanks a lot for your help!

                  Write a Reply...