I've poked and prodded at this script without success so far. The API is still returning valid results in my browser when I build the request URL as is done in translate.php, but the somewhere along the line I'm receiving errors such as:
I'll update here when I get deeper into this. Might just rebuild with Ruby or Javascript.