LsvMky
LsvMky

Reputation: 1

How can I access content of a website client side?

I've set up my own whatsmyip type site that returns a simple string of the callers external IP.

But I can't figure out how to get the queried text into an asp control for use.

I can load it up in an iframe and see it on the page, but accessing it and using it is blocked for built in security reasons.

I can get it working server side with ~WebClient.DownloadString("Whatsmyip.com"). But I need the client's IP, not the web servers.

Thanks!

Upvotes: 0

Views: 147

Answers (1)

Lester
Lester

Reputation: 4413

Do you have to use whatsmyip.com? You can also get a users ip address through HttpContext.Request.UserHostAddress.

Upvotes: 2

Related Questions