I am Having problems with validating this code. Please help

Discussion in 'PHP' started by Andy_ameed, Apr 7, 2010.

  1. #1
    <?php
    $olderror_reporting =error_reporting(0);
    include ("http://rssfeedreader.com/rss3/rss.php?url=http%3A%2F%2Fwww.miadhu.com%2Ffeed&newpage=1&chead=&atl=&desc=&owncss=1&eleminate=&auth=&dts=&width=300&max=10&tlen=0&rnd=1&bt=3&bs=Double&nmb=&ntb=&naf=&nst=&nwd=0&nht=0&dlen=0&lstyle=-1&lc=Blue&bg=White&bc=Gray&spc=&ims=&tc=&ts=11&tfont=Verdana,+Arial,+Sans-serif&rf=".$HTTP_SERVER_VARS['SERVER_NAME'].$HTTP_SERVER_VARS['PHP_SELF']."&phpout=1");
    error_reporting($olderror_reporting);
    ?>
    Code (markup):
    Im placing it in a HTML page with these characters

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    how can I validate this? W3.org is showing over 100 errors..

    Thanks
     
    Andy_ameed, Apr 7, 2010 IP
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    this is either the directory under your include is not existing or the directory has restrictions / other included data
     
    bartolay13, Apr 7, 2010 IP
  3. javaongsan

    javaongsan Well-Known Member

    Messages:
    1,054
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #3
    You have encoded url in include like http%3A%2F%2F you need to replace that
     
    javaongsan, Apr 7, 2010 IP
  4. Andy_ameed

    Andy_ameed Active Member

    Messages:
    129
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #4
    Please give me an Idea how i Can do this..
     
    Andy_ameed, Apr 7, 2010 IP
  5. Cloud Computing Forum

    Cloud Computing Forum Guest

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    urlencode( 'http://www.URLTOENCODE' );
     
    Cloud Computing Forum, Apr 7, 2010 IP
  6. javaongsan

    javaongsan Well-Known Member

    Messages:
    1,054
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #6
    change the include to this
    include ("http://rssfeedreader.com/rss3/rss.php?url=http://www.miadhu.com/feed&newpage=1&chead=&atl=&desc=&owncss=1&eleminate=&auth=&dts=&width=300&max=10&tlen=0&rnd=1&bt=3&bs=Double&nmb=&ntb=&naf=&nst=&nwd=0&nht=0&dlen=0&lstyle=-1&lc=Blue&bg=White&bc=Gray&spc=&ims=&tc=&ts=11&tfont=Verdana,+Arial,+Sans-serif&rf=".$HTTP_SERVER_VARS['SERVER_NAME'].$HTTP_SERVER_VARS['PHP_SELF']."&phpout=1");
    Code (markup):
    if its still not working display the inlcude url using echo and paste it in your web browser and see what error it throws up
     
    javaongsan, Apr 7, 2010 IP
  7. Cloud Computing Forum

    Cloud Computing Forum Guest

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You might need to turn on that PHP directive which allows external URL includes.

    allow_url_include = 1
    allow_url_fopen = 1

    in you php.ini
     
    Cloud Computing Forum, Apr 8, 2010 IP