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.