|
1 year ago | |
---|---|---|
src | 1 year ago | |
web | 1 year ago | |
.env.dist | 1 year ago | |
.gitignore | 1 year ago | |
README.md | 1 year ago | |
composer.json | 1 year ago |
Retrieves information as JSON from a web page using j0k3r/graby
and fusonic/opengraph
.
Requirements:
$ git clone https://gitnet.fr/deblan/apipage.git
$ cd apipage
$ composer install
$ cp .env.dist .env
If you use Apache2 or Nginx, serve web/
as document root and web/index.php
as router.
To prevent security issue, fill your domain name into .env
.
In a development environment, you can run the built in PHP web server:
$ php -S 127.0.0.1:8080 -t web web/index.php
Browse http://127.0.0.1:8080/do/{parser}?url={url}
where:
parser
is graby
or opengraph
url
is the page that you want to parse