Is there a way to execute curl from Javascript? Thanks.
Nope. You'll need to look at using Ajax/XMLHttpRequest instead. http://en.wikipedia.org/wiki/Ajax_%28programming%29