Very easy way to make an php file and export data on throwing the data to this url.
Please copy and paste below file to the server and send data variables to this path.

Like i have uploaded it as export.php

Send the two variable csv_header and csv_output as comma saperaed string and new line must be defined by \n

$csv_header= ‘ID,NAME,AGE’;


$csv_output .=’1,Mark,25′.’\n’;

$csv_output .=’1,Jackob,24′.’\n’;

$csv_output .=’1,Prince,26′.’\n’;

<form action=””>

<input type=”hidden” name=”csv_header” value=”<?php echo $csv_header ?> “/>

<input type=”hidden” name=”csv_output” value=”<?php echo $csv_header ?> “/>

<input type=”submit”  value=”export”/>