Results 1 to 9 of 9

Thread: Display IP address

                  
   
  1. #1
    Advance Entrepreneur Array
    Join Date
    Jan 2010
    Location
    Anuradhapura, Sri Lanka
    Posts
    171
    Post Thanks / Like
    Rep Power
    3

    Default Display IP address







    I am going to design a website. I want to display the IP address of visitors on the web page. But I do not know how to display IP address of the visitors using asp. Can any one help me to display IP address of the visitors on the webpage of visitors?

  2. #2
    Junior Entrepreneur Array
    Join Date
    Feb 2010
    Posts
    29
    Post Thanks / Like
    Rep Power
    0

    Default And here some more







    Display your visitors IP address on your Website or Blog using a php script.

    Step 1. Create a new.txt document on your desktop

    Step 2. Copy the following code into the new.txt document

    <?php
    $img_number = imagecreate(180,20);
    $backcolor = imagecolorallocate($img_number,70,73,80);
    $textcolor = imagecolorallocate($img_number,255,255,255);
    imagefill($img_number,0,0,$backcolor);
    $number = " Your IP Address $_SERVER[REMOTE_ADDR]";
    Imagestring($img_number,2,2,2,$number,$textcolor);
    header("Content-type: image/jpeg");
    imagejpeg($img_number);
    ?>

    Step 3. Rename the new.txt document ip.php and upload it to the root of your website

    Step 4. Log into your WordPress administration panel and locate a template file where you would like to display the visitors IP address. I use a sidebar text widget

    Step 5. Copy the following code into your template replacing the address with your website address

    <img src="http://yoursite.com/ip.php">

    To change the colors, edit backcolor and textcolor img_number RGB numeric values
    To change the font size, edit the imagestring numeric values

    That's all there is to it,
    Enjoy!

  3. #3
    Junior Entrepreneur Array
    Join Date
    Feb 2010
    Posts
    12
    Post Thanks / Like
    Rep Power
    0

    Default







    Useful script thanks for this .. I like to study deeply & clearly about OOP concept in PHP so pls give me a better solution ..

  4. #4
    Moderator Array vengad11's Avatar
    Join Date
    Jan 2010
    Location
    LK
    Posts
    217
    Post Thanks / Like
    Blog Entries
    4
    Rep Power
    3
    Follow vengad11 On Twitter Add vengad11 on Facebook

    Default







    Of course, you can use this php code with any of your website source code.. i thing we can show something more such as OS details,browser,etc..
    Member of Lankaentrepreneur

  5. #5
    Junior Entrepreneur Array
    Join Date
    Mar 2011
    Posts
    5
    Post Thanks / Like
    Rep Power
    0

    Default







    Wow Nice share ! It looks nice when somebody will come on our website and they can automatically see their IP-address on our website. Thanks for sharing this codes.
    This things will attract more users to our websites.

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

  6. #6
    Junior Entrepreneur Array
    Join Date
    May 2011
    Posts
    5
    Country: United States
    Post Thanks / Like
    Rep Power
    0

    Default







    This is nice information and also thanks for sharing with us. But this script is use in PHP language. I also have some other script that is use in asp.net.
    System.Web.HttpContext.Current.Request.UserHostAdd ress;
    I am always use this script in my application and also store the value in my database.

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

  7. #7
    Junior Entrepreneur Array
    Join Date
    Dec 2011
    Posts
    5
    Country: United States
    Post Thanks / Like
    Rep Power
    0

    Default







    I think first of all to understand PC does not have a single IP address. There can be different. When you know which IP address, you are the specific filters that you can modify and convert it to a function of the value returned in the strIPAddresses procedure.

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

  8. #8
    Junior Entrepreneur Array
    Join Date
    Dec 2011
    Posts
    5
    Country: Afghanistan
    Post Thanks / Like
    Rep Power
    0

    Default







    This page was generated after required, including PHP code in the top of the page to create a start time and another part of the code at the bottom, creating a stop time. To find the page generation time minus the echo from another and the HTML page is a simple question.

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

  9. #9
    Junior Entrepreneur Array
    Join Date
    Mar 2012
    Posts
    6
    Country: United States
    Post Thanks / Like
    Rep Power
    0

    Default







    You can write following code for display ip address.
    $ip= $_SERVER['PHP_SELF'];
    echo $ip;

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. The program to display any cheat pages
    By jonhn888 in forum Search Engine Optimization
    Replies: 1
    Last Post: 03-01-2012, 04:59 PM
  2. What is Display resolution
    By rhdcnmu in forum Tech Discussions
    Replies: 0
    Last Post: 01-04-2012, 05:48 PM
  3. Dynamic IP Address
    By Qfjapipa in forum Domains & Web Hosting
    Replies: 0
    Last Post: 09-05-2011, 01:44 AM
  4. How to change address in Yahoo Site Explorer
    By anummohtishm in forum Yahoo!
    Replies: 0
    Last Post: 05-27-2011, 11:15 AM
  5. Classified & display advertising 101
    By vengad11 in forum Articles
    Replies: 0
    Last Post: 01-05-2011, 01:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
website stat