Click here to Skip to main content
14,843,569 members
Please Sign up or sign in to vote.
1.16/5 (4 votes)
See more:
Hi All


PHP
<?php

$domainname = $_GET['domain'];

list($resp, $info) = nicir_whois($domainname);


function nicir_whois($domainname) {
$server = 'whois.nic.ir';
$fp = @fsockopen($server, 43, $errno, $errstr, 10);
if ($fp) {
    @fputs($fp, $domainname . '
');
    @socket_set_timeout($fp, 10);
    while (!@feof($fp)) {
        $data .= @ fread($fp, 4096);
    }
    @fclose($fp);

    $out = nl2br($data);
}

if( strpos($out, "no entries found") === false ) {
    return array( false , $out );
} else {
    return array( true , $out );
}
}

?>



This is my PHP code i need to convert this part to c#. Anybody suggest me. Is there any online conversion tool available Or any equivalent c# code is also is much appreciable
Posted
Updated 1-Feb-21 5:21am
Comments
Peter Leow 24-Dec-13 10:12am
   
No tool. Faster to rewrite.

1 solution

I suggest you to Code Rewrite[^]. Anyway check this blog post
.NET Code Conversion - Convert your code - PHP to .NET[^]
   
Comments
Sergey Alexandrovich Kryukov 24-Dec-13 11:13am
   
Fair enough, a 5.
—SA
CPallini 15-Sep-14 7:45am
   
5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900