Something like curl but with javascript as well?

I’m looking for a something like curl, a way for your php code to behave like a browser, to do things which browsers do, but with javascript. Any suggestions? Thanks.

Mmmh… Well there are Javascript interpreters for PHP, but I’d have to wonder why you need to do this…