Skip to content

Sunspark/sain_application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

README

This application is written using vanilla PHP 5.6, with no add-ons. The unit testing is compliant to PHPUnit 5.4.6.

To run the application, install a PHP runtime, and run the application from the command line.

Usage:

$> php main.php <path_to_http_resource>

Description:

Will go to the specified resource, scrape the specified resource for information, and print a JSON object representation, containing the information.

Note:

The DOMDocument class in vanilla PHP seems to disagree with the HTML generated by the test page, specifically to do with the HTML entities, which aren't encoded on the page. This produces a lot of warnings when the class parses the HTML page. These warnings are NOT surpressed in the code, and would warrant a wider discussion with the business as to how HTML entities should be handled/ presented.

The warnings do not interfere with the operation of the script, and should be eliminated by environment settings if desired to be surpressed in a non-dev environment.

About

a short application that scrapes a given url.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published