Olde One Bites Off More than he Can Handle

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • bobs-pcmall
    Staff Sergeant

    • Dec 2006
    • 40

    Olde One Bites Off More than he Can Handle

    Below is a piece of code we've been trying to get to work and haven't been able to yet. Searched extensively several forums and web. G,Y,M and several others.
    Any Help would be greatly appreciated.

    PS: I added the global line in it.

    <?php
    global $SID,$IPAddress,$_SERVER,$UserAgent,$PageURL,$URL;
    $SID="REMOVED_SITE_IDENTIFICATION";
    $IPAddress = urlencode($_SERVER['REMOTE_ADDR']);
    $UserAgent = urlencode($_SERVER['HTTP_USER_AGENT']);
    $PageURL = urlencode($_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING']);
    $URL = "<A href="http://si.REMOVED_SITE_NAME.com/GetData.aspx?SID=".$SID">http://si.REMOVED_SITE_NAME.com/GetData.aspx?SID=".$SID;
    $URL = $URL.'&IPAddress='.$IPAddress;
    $URL = $URL.'&UserAgent='.$UserAgent;
    $URL = $URL.'&PageURL='.$PageURL;
    include($URL);
    ?>
    Bob the Builder
    www.bobs-pcmall.com
    Without Data, you're just another opinion.
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: Olde One Bites Off More than he Can Handle

    Try changing :

    $URL = '<A href=http://si.REMOVED_SITE_NAME.com/GetData.aspx?SID='.$SID.'>http://si.REMOVED_SITE_NAME.com/GetData.aspx?SID='.$SID;

    Also i don't see anywhere the definition of si.REMOVED_SITE_NAME

    Also, in my knowledge, you can't include an absolute URL (http://.....)

    I also don't understand how you can include a file and also link it in the same time ???
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    • bobs-pcmall
      Staff Sergeant

      • Dec 2006
      • 40

      #3
      Re: Olde One Bites Off More than he Can Handle

      Thanks Navaldesign

      Didn't catch the difference at first glance till copy and paste one above the other.
      I'll try that. propably would have helped if I'd showen the error message also.
      Bob the Builder
      www.bobs-pcmall.com
      Without Data, you're just another opinion.

      Comment

      • bobs-pcmall
        Staff Sergeant

        • Dec 2006
        • 40

        #4
        Re: Olde One Bites Off More than he Can Handle

        Is it possible that the post got edited? Because the <A <-- isn't in the code?
        Bob the Builder
        www.bobs-pcmall.com
        Without Data, you're just another opinion.

        Comment

        • navaldesign
          General & Forum Moderator

          • Oct 2005
          • 12080

          #5
          Re: Olde One Bites Off More than he Can Handle

          Yes, it is possible, as the forum editor automatically purses links. You need to go in Advanced, and disable the "Automatically purse links in the text" checkbox.
          The difference is that i used single quotes otherwise the " inside will be intrpreted by php as php double quotes, otherwise you would need to place \ before the non php ".
          Navaldesign
          Logger Lite: Low Cost, Customizable, multifeatured Login script
          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

          Comment

          • bobs-pcmall
            Staff Sergeant

            • Dec 2006
            • 40

            #6
            Re: Olde One Bites Off More than he Can Handle

            <?php
            $SID="XXXXXXXXXXXXXXXXXXXX";
            $IPAddress = urlencode($_SERVER['REMOTE_ADDR']);
            $UserAgent = urlencode($_SERVER['HTTP_USER_AGENT']);
            $PageURL = urlencode($_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING']);
            $URL = "http://si.XXXXXX.com/GetData.aspx?SID=".$SID;
            $URL = $URL.'&IPAddress='.$IPAddress;
            $URL = $URL.'&UserAgent='.$UserAgent;
            $URL = $URL.'&PageURL='.$PageURL;
            include($URL);
            ?>

            error text
            [25-Aug-2007 17:25:10] PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening 'http://si.xxxxxx.com/GetData.aspx?SID=xxxxxxxxxxx&amp;IPAddress=xx.xx.x xx.xxx&amp;UserAgent=Mozilla%2F4.0+%28compatible%3 B+MSIE+7.0%3B+Windows+NT+5.1%3B+YPC+3.2.0%3B+.NET+ CLR+1.1.4322%3B+.NET+CLR+2.0.50727%3B+InfoPath.1%3 B+IEMB3%29&amp;PageURL=%2Ftest_page.php%3F' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxxxx/public_html/test_page.php on line 52
            Bob the Builder
            www.bobs-pcmall.com
            Without Data, you're just another opinion.

            Comment

            • navaldesign
              General & Forum Moderator

              • Oct 2005
              • 12080

              #7
              Re: Olde One Bites Off More than he Can Handle

              Remains the other problem: you can NOT, from what i know, include an absolute URL (http://sitename.......)
              Navaldesign
              Logger Lite: Low Cost, Customizable, multifeatured Login script
              Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
              DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
              Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

              Comment

              • bobs-pcmall
                Staff Sergeant

                • Dec 2006
                • 40

                #8
                Re: Olde One Bites Off More than he Can Handle

                This was a script fron goldencan getdata
                Bob the Builder
                www.bobs-pcmall.com
                Without Data, you're just another opinion.

                Comment

                • bobs-pcmall
                  Staff Sergeant

                  • Dec 2006
                  • 40

                  #9
                  Re: Olde One Bites Off More than he Can Handle

                  the java scripts work fine but aren't SEO
                  Bob the Builder
                  www.bobs-pcmall.com
                  Without Data, you're just another opinion.

                  Comment

                  • bobs-pcmall
                    Staff Sergeant

                    • Dec 2006
                    • 40

                    #10
                    Re: Olde One Bites Off More than he Can Handle

                    The Olde One Found Answer....
                    Last Line is wrong...
                    include($URL);
                    should read as readFile($URL);
                    You were right on the money naveldesign. Many Thanks.
                    Even tho it was an html file also required changing the extension to php..
                    Bob the Builder
                    www.bobs-pcmall.com
                    Without Data, you're just another opinion.

                    Comment

                    Working...
                    X