Oversættelse fra PHP til ASP
Er der nogen som kan oversætte dette PHP script til APS?$user = $_POST[user];
$password = $_POST[password];
$host = "www.geo.dk";
$path = "/dyrelexlogin/login.asp";
$data = "user=$user&password=$password";
$http_response="";
$fp=fsockopen($host, 80);
fputs($fp, "POST $path HTTP/1.1\r\n");
fputs($fp, "Host: $host\r\n");
fputs($fp, "Content-Type: application/x-www-form-urlencoded\r\n");
fputs($fp, "Content-Length: " . strlen($data) . "\r\n");
fputs($fp, "Connection: close\r\n\r\n");
fputs($fp, "$data");
while(!feof($fp)) $http_response.=fgets($fp, 128);
fclose($fp);
list($http_headers, $http_content)=explode("\r\n\r\n", $http_response);
if(ereg("<Access>(.*)</Access>",$http_content,$regs)) {
$_SESSION[access]=$regs[1];
} else {
$_SESSION[access] = fejl;
}
