Konventer PHP til ASP
Hejjeg har en lille opgave
er der nogen der kan hjælpe mig med at konventer dett php script til ASP?
<?php
/*
* Written By: René Ibsen
* Date: 2012/03/21
*
*
*/
/************************************CONFIG****************************************/
//SETTINGS//
//This code is something you set in the APP so random people cant use it.
$ACCESSKEY="InsusaScan";
/************************************CONFIG****************************************/
//these are just in case setting headers forcing it to always expire and the content type to CSV
header('Cache-Control: no-cache, must-revalidate');
header('Content-type: text/csv');
error_log(print_r($_POST,TRUE));
if( isset($_POST['export']) && isset($_POST['key']) ){ //checks ifthe tag post is there and if its been a proper form post
if($_POST['key']==$ACCESSKEY){ ///validate the ACCESS key
$export=urldecode($_POST['export']);
$outstream = fopen('./export'.date("YmdHis").'.txt', 'w');
fputs($outstream, $export);
fclose($outstream);
echo $export; //writes out csv data back to the client
} else {
header("HTTP/1.0 400 Bad Request");
echo "Bad Request"; //reports if the code is bad
}
} else {
header("HTTP/1.0 400 Bad Request");
echo "Bad Request";
}
?>