ASP.NET equivalent of this PHP code

Posted by moiz217 on Stack Overflow See other posts from Stack Overflow or by moiz217
Published on 2010-04-13T23:57:43Z Indexed on 2010/04/14 0:03 UTC
Read the original article Hit count: 169

Filed under:
|
|
|
|

Please provide asp.net equivalent of this php code.

 $ip = $_REQUEST['ip']?$_REQUEST['ip']:$_SERVER["REMOTE_ADDR"];
 $client = new SoapClient(null, array(
  'location' => "http://www.itistimed.com/soap/whois-city.php",
  'uri'      => "http://www.itistimed.com/soap/req"));
 $data = $client->ipToCountryCity($ip);
 var_dump($data);

Will display something like:

array(7) { 

["status"]=> int(1) ["status_text"]=> string(7) "Success" ["country"]=> string(2) "US" ["city"]=> string(13) "Mountain View" ["state"]=> string(2) "CA" ["zip"]=> string(5) "94043" ["org"]=> string(11) "Google Inc."}

thanks.

© Stack Overflow or respective owner

Related posts about php

Related posts about ASP.NET