求PHP代码翻译asp.net
<?php$process = curl_init('http://v0.api.');
/// 上传请求
curl_setopt($process, CURLOPT_PUT, 1);
curl_setopt($process, CURLOPT_USERPWD, "demouser:demopass");
curl_setopt($process, CURLOPT_HEADER, 0);
curl_setopt($process, CURLOPT_TIMEOUT, 60);
$datas = fopen("{$file_path}",'r');
fseek($datas, 0, SEEK_END);
$file_length = ftell($datas);
fseek($datas, 0);
/// 设置图片的内容
curl_setopt($process, CURLOPT_INFILE, $datas);
/// 设置图片的长度
curl_setopt($process, CURLOPT_INFILESIZE, $file_length);
/// 设置图片的裁剪参数:从左上角开始,裁剪一张55px宽,40px高的图片
curl_setopt($process, CURLOPT_HTTPHEADER, array('x-gmkerl-crop: 0,0,55,40'));
/// 执行并返回结果,正常的话将返回true
var_dump(curl_exec($process));
/// 获取http状态码,正常的话将返回200
var_dump(curl_getinfo($process, CURLINFO_HTTP_CODE));
/// 关闭资源
curl_close($process);
fclose($datas);
?>