Announcement

Collapse
No announcement yet.

PHP Code for IP address from visitor is not seen. How to change the ini.php

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

  • PHP Code for IP address from visitor is not seen. How to change the ini.php

    I use the following code to obtain the IP ADDRESS of the visitors. It worked fine until five days ago when Vodahost changed the IP for my domain.
    How do I set the register_globals = OFF in the ini.php ?
    The PHP code I use is this:

    <?php
    // if register_globals_is set to off en ini.php, se aplica este formato
    //$Ip=$_SERVER['REMOTE_ADDR'];

    $Ip=@$REMOTE_ADDR;
    echo "<font color='red'>";
    echo $Ip;
    //echo int()$Ip;
    ?>
    Victor
    My Website

  • #2
    Re: PHP Code for IP address from visitor is not seen. How to change the ini.php

    Add this in your start of page:

    <?php
    $IP_address = $_SERVER['REMOTE_ADDR'];
    ?>


    Now, ad in your BV page the text

    your IP address is: '.$IP_address.' . Include the single quotes as I have posted them.

    Format it as you like: font, size, color etc.
    Right click it, select HTML and add the following codes

    In the Before Tag:

    <?php
    echo '

    in the After Tag:

    ';
    ?>

    Of course the page must be published as .php
    Please note that any text formatting you do MUST be unique for the part '.$IP_address.'
    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


    • #3
      Re: PHP Code for IP address from visitor is not seen. How to change the ini.php

      As you read on my threat, I have identical solution. My question is: How do I change the ini.php to registere_global = OFF in order to be seen.
      Victor
      My Website

      Comment


      • #4
        Re: PHP Code for IP address from visitor is not seen. How to change the ini.php

        THANKS. Now I see the difference !!
        With $IP_address = $_SERVER['REMOTE_ADDR']; there is no need to set registered_globals = OFF

        That would be necessary if the php code would be $Ip=@$REMOTE_ADDR;
        Victor
        My Website

        Comment


        • #5
          Re: PHP Code for IP address from visitor is not seen. How to change the ini.php

          On the contrary, your code assumes that register_globals SHOULD be ON.
          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

          Working...
          X