Announcement

Collapse
No announcement yet.

Adding PHP Code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding PHP Code

    How do I get the following PHP code to show when I publish?


    <?php
    $SID="364d8dc3-af06-4bb5-acce-b1ac9641df93";
    $IPAddress = urlencode($_SERVER['REMOTE_ADDR']);
    $UserAgent = urlencode($_SERVER['HTTP_USER_AGENT']);
    $Host=urlencode($_SERVER['HTTP_HOST']);
    $PageURL=urlencode($_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING']);
    $URL="http://si.goldencan.com/GetData.aspx?ver=2.0&SID=".$SID;
    $URL=$URL.'&Host='.$Host;
    $URL = $URL.'&PageURL='.$PageURL;
    $URL = $URL.'&IPAddress='.$IPAddress;
    $URL = $URL.'&UserAgent='.$UserAgent;
    include($URL);
    ?>

    I've tried the following

    * Inserting the PHP code into a html box
    * file extension is set to php
    * increasing the size of the html box

  • #2
    Re: Adding PHP Code

    right click on the page and chose page properties and change it to php instead of html

    Karen

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    02036089024 / United Kingdom
    291916438 / Australia

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)


    Comment


    • #3
      Re: Adding PHP Code

      out of curiosity what is the script for?

      Travlinman

      AguycanBeach.com
      Aguycanbeachhostel
      Comunidad Aguycan Beach

      A great must do for all beginners by Lincslady

      Comment


      • #4
        Re: Adding PHP Code

        Originally posted by travlinman View Post
        out of curiosity what is the script for?
        By the looks of it some type of 3rd party stats software.

        Register/Login Script
        Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

        Comment


        • #5
          Re: Adding PHP Code

          But I doubt you can include a URL in a VH account. The URL wrappers are disabled in most cases for security reasons.
          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


          • #6
            Re: Adding PHP Code

            The php code is for an affiliate product feed thru GoldenCan

            Comment


            • #7
              Re: Adding PHP Code

              I have tried changing the page properties to php under General/file extension

              Comment


              • #8
                Re: Adding PHP Code

                Originally posted by bbullock View Post
                I have tried changing the page properties to php under General/file extension
                And what is happening when you publish the page and load it in your browser? Is it giving an error of some sort?

                Register/Login Script
                Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

                Comment


                • #9
                  Re: Adding PHP Code

                  the page is blank

                  Comment


                  • #10
                    Re: Adding PHP Code

                    Try this code and let me know what happens

                    <?php
                    error_reporting(E_ALL);
                    $SID="364d8dc3-af06-4bb5-acce-b1ac9641df93";
                    $IPAddress = urlencode($_SERVER['REMOTE_ADDR']);
                    $UserAgent = urlencode($_SERVER['HTTP_USER_AGENT']);
                    $Host=urlencode($_SERVER['HTTP_HOST']);
                    $PageURL=urlencode($_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING']);
                    $URL="http://si.goldencan.com/GetData.aspx?ver=2.0&SID=".$SID;
                    $URL=$URL.'&Host='.$Host;
                    $URL = $URL.'&PageURL='.$PageURL;
                    $URL = $URL.'&IPAddress='.$IPAddress;
                    $URL = $URL.'&UserAgent='.$UserAgent;
                    include($URL);
                    ?>

                    Register/Login Script
                    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

                    Comment


                    • #11
                      Re: Adding PHP Code

                      go to http://www.thecoupondad.com/internetcouponsphp.php

                      Comment


                      • #12
                        Re: Adding PHP Code

                        Hmm, all of the page html is not being transfered, it stops at an opening <div> tag, I assume where the php code was inserted.

                        Try just uploading a php file with only the code in it. That is not just adding it to a BV file and publishing, just use notepad or something, copy and paste the code into it, save as a .php, and upload that file.

                        Register/Login Script
                        Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

                        Comment


                        • #13
                          Re: Adding PHP Code

                          Originally posted by navaldesign View Post
                          But I doubt you can include a URL in a VH account. The URL wrappers are disabled in most cases for security reasons.

                          Please re read NAVALS post.. most likely this is disabled and will not happen on voda servers.

                          Karen

                          VodaHost

                          Your Website People!
                          1-302-283-3777 North America / International
                          02036089024 / United Kingdom
                          291916438 / Australia

                          ------------------------

                          Top 3 Best Sellers

                          Web Hosting - Unlimited disk space & bandwidth.

                          Reseller Hosting - Start your own web hosting business.

                          Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)


                          Comment


                          • #14
                            Re: Adding PHP Code

                            It should still be displaying some sort of error or notice saying that it is disabled. Just trying to find out the symptoms in order to diagnose the problem.

                            Register/Login Script
                            Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

                            Comment

                            Working...
                            X