Get #PhantomJSCloud for #Free
PhantomJSCloud is a online service, where you can emulate a browser action using a REST API. Great stuff, but unfortunately they charge, and if you’re on a low budget, or you intend to scale too much, then you might be put off by the fees.
However, PhantomJS can be downloaded for free, and it can be run from a asp.net page with no extra permissions set in IIS, and you can customise it to your needs, by making your own web based PhantomJS host with a few lines of code, thanks to NReco.PhantomJS
So, step 1
Install-Package NReco.PhantomJS
Then step 2:
var strUrl = Request.QueryString[“url”];
var strArgs = Request.QueryString[“args”];
if (string.IsNullOrEmpty(strUrl) || string.IsNullOrEmpty(strArgs))
{
Response.Write(“url and args are required”);
return;
}
var wc = new WebClient();
var strJS = wc.DownloadString(strUrl);
var phantomJS = new PhantomJS();
phantomJS.OutputReceived += (a, b) =>
{
Response.Write(b.Data);
};
phantomJS.RunScript(strJS, new[] { strArgs });