I have this php function I want to use but as my knowledge of php is restricted to changing small bits in wordpress templates I have no idea how to use it... 
Basically I need to convert one set of coordinates from a (slightly) obscure coordinate system to lat/long (WGS84). What do I need to do with this function to allow me to do this (I assume input a text/excel file with x and y coords and output to another text/excel file with lat/long)?
http://www.god-object.com/2009/10/23/convert-rijksdriehoekscordinaten-to-latitudelongitude/
$x and $y are the locations I need to input the coordinates I assume but other than that I have no idea how it works.
To run it I assume I'd be able to upload it to my host, with the corresponding coordinate file, and then start it on there?
Thanks.
EDIT: No idea why it shows like that in the php section, it's displayed properly in the link.

Basically I need to convert one set of coordinates from a (slightly) obscure coordinate system to lat/long (WGS84). What do I need to do with this function to allow me to do this (I assume input a text/excel file with x and y coords and output to another text/excel file with lat/long)?
PHP:
function rd2wgs ($x, $y) { // Calculate WGS84 coördinates $dX = ($x - 155000) * pow(10, - 5); $dY = ($y - 463000) * pow(10, - 5); $SomN = (3235.65389 * $dY) + (- 32.58297 * pow($dX, 2)) + (- 0.2475 * pow($dY, 2)) + (- 0.84978 * pow($dX, 2) * $dY) + (- 0.0655 * pow($dY, 3)) + (- 0.01709 * pow($dX, 2) * pow($dY, 2)) + (- 0.00738 * $dX) + (0.0053 * pow($dX, 4)) + (- 0.00039 * $dX ^ 2 * pow($dY, 3)) + (0.00033 * pow( $dX, 4) * $dY) + (- 0.00012 * $dX * $dY); $SomE = (5260.52916 * $dX) + (105.94684 * $dX * $dY) + (2.45656 * $dX * pow($dY, 2)) + (- 0.81885 * pow( $dX, 3)) + (0.05594 * $dX * pow($dY, 3)) + (- 0.05607 * pow( $dX, 3) * $dY) + (0.01199 * $dY) + (- 0.00256 * pow($dX, 3) * pow( $dY, 2)) + (0.00128 * $dX * pow($dY, 4)) + (0.00022 * pow($dY, 2)) + (- 0.00022 * pow( $dX, 2)) + (0.00026 * pow($dX, 5)); $Latitude = 52.15517 + ($SomN / 3600); $Longitude = 5.387206 + ($SomE / 3600); return array( 'latitude' => $Latitude , 'longitude' => $Longitude); }
$x and $y are the locations I need to input the coordinates I assume but other than that I have no idea how it works.

To run it I assume I'd be able to upload it to my host, with the corresponding coordinate file, and then start it on there?
Thanks.

EDIT: No idea why it shows like that in the php section, it's displayed properly in the link.