cakyus / phantom-repl

Phantom REPL lets you program PhantomJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phantom REPL

Phantom REPL lets you program PhantomJS from the inside.

How to use

Start server

$ phantomjs server.js

PhantomJS is now listening for connections on the default port 4242.

Send request

$ wget -O - \
  --post-data='{"jsonrpc":"2.0","method":"page.content","params":{"url":"https://www.google.com"}}' \
  http://127.0.0.1:4242

Ask PhantomJS to print the content of https://www.google.com.

$ wget -O - --post-data='{"jsonrpc": "2.0", "method": "phantom.exit"}' http://127.0.0.1:4242/

Ask PhantomJS to quit.

About

Phantom REPL lets you program PhantomJS

License:GNU General Public License v2.0


Languages

Language:PHP 56.1%Language:JavaScript 43.9%