[Snippet] "Real IP"

Posts 1–15 of 35 · Page 1 of 3
[Snippet] "Real IP"
First thing you need to do is create a php file
You can do this simply by opening your favorite document editor (notepad is good enouph)

  • Add this code to your open notepad


Code:
<?php
echo $_SERVER['REMOTE_ADDR'];
?>

  • Save it as myip.php
  • Upload it to a (your) server.


Note:If you don't have a server you can get a free hosting server (php enabled) online, just search your favorite search engine and locate one.
If you don't want to go through the hassle, I have already uploaded it to my server, the information is in the module example displayed below


  • Create a new VB Project.
  • Add a New Module (You can do this by clicking Project --- Add Module in the toolbar)
  • Add this code to the module


Add System.Net Reference From Reference Menu

Code:
Imports System.Net
Imports System.IO
Module Module1


    Public Function ShowIp() As String

        Dim uri_val As New Uri("http://innovatorsworldwide.com/MPGH/ip/myip.php")
        Dim request As HttpWebRequest = HttpWebRequest.Create(uri_val)

        request.Method = WebRequestMethods.Http.Get

       
        Dim resp As HttpWebResponse = request.GetResponse()
        Dim readr As New StreamReader(resp.GetResponseStream())
         Dim myip As String = readr.ReadToEnd()

        resp.Close()

        Return myip
    End Function

End Module
  • Add a Button to the form.
  • Add a Label to the form
  • Add this code to your button click


Code:
Label1.Text = ShowIP()
Clicking the button should now generate your "Real Ip" in the label

Note: You can use ShowIP() pretty much in any control

You can have it displayed via msgbox , textbox, or anything else.

Hope this helps
hmm, i can make an ip taker/ IP ban for update banner with this TY
No Problem
Im making a project already HEHE... "Mad Scientist"
Awesome, Sounds like fun. Enjoy it.
ill post it... hehehe
Ever thought of making Video Tutorials?

That way, if you make it big, you can get up to 10 bucks a week (LOL).
do u mean me?
this is simple code im making...
No Nextgen, he wrote the code
Holy Crap... 10 Dollars a week?...... Count me in..

damn it, Nvm, I have this software/website design firm thingy in upstate NY that I partner in....Man... I was so tempted

It's takes me minutes to make a tut side by side of work (considering I can work from the home office) Videos require more direct consumption of coordination, where as written tuts I can go back and forth between work and tuts and Call Of Duty on my Itouch....
I know you pwn a website: Web Design

I'm just saying that you can make a small amount of money every week by recording yourself doing what you usually do.
LOL!!! Thats Funny!
Quote Originally Posted by mnpeepno2 View Post
LOL!!! Thats Funny!
Which part?
The firm does well, Video tuts, $10 a week, I make that while i'm in the bathroom

Now if someone said, Hey record your work and Ill pay you 25-30 an hour, Ill say...Sure...why not...

Only problem with that though, I would have to stop watching porn, cause then it gets recorded on the tut, and i'm getting yelled at from my wife... cause it was on the local news...


Ok, so now back on topic
2nd part of 2 posts above
Posts 1–15 of 35 · Page 1 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us