Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the initiate browser in PHP like ROR?

Ruby provides us methotds to initiate browser, open url in that browser and parse the page contents browser = Watir::Browser.new(:firefox) browser.goto("http://example.com") browser.wait results = browser.text parsed_results = JSON.parse(results) Can we do such a thing in PHP? If yes then how it is possible?

user-image
Question added by Muhammad Usman Usman , Software Enginner , Five Rivers Technologies
Date Posted: 2013/08/01

* hitting a URL and getting it's content (php): $data = file_get_contents('http://api.somesite.com'); sources: http://php.net/manual/en/function.file-get-contents.php source: http://stackoverflow.com/questions/5971398/php-get-contents-of-a-page * opens a new browser window (javascript) : "window.open(URL,name,specs,replace)" source: http://www.w3schools.com/jsref/met_win_open.asp * parsing a JSON string (php): $feed = json_decode($json); sources: http://php.net/manual/en/function.json-decode.php sources: http://stackoverflow.com/questions/7889738/json-parsing-with-php

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.