I suppose you could use the build in FTP stack of arduino: http://playground.arduino.cc/Code/FTP
By far the easiest method of writing stuff to the wl-500gp

Otherwise you could make a php script which is able to handle http post request and using a web client http://arduino.cc/en/Tutorial/WebClient

For setup on the wl-500gp use the wengi tutorial: http://wl500g.info/showthread.php?10...leg-s-firmware
it'll allow you to set up some basic package system so you may install a server and php system.
I wrote an tutorial for lighttpd php and mysql: http://wl500g.info/showthread.php?20...d-Eaccelerator
which will be able to run almost any php script you'd like.

for simple php stuff the httpd-php package should be more than adequate.

but to be honest, I'm not sure you should go for a router for your first linux experience.
Maybe get a raspberry pi, it's probably a lot easier to start with