Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require "vendor/autoload.php";
- use am\internet\HttpHelper;
- //use html2text\html2text;
- class LeLouvre{
- //const BASE_URL = "https://collections.louvre.fr/en/recherche?typology[0]=3"
- const BASE_URL = "https://collections.louvre.fr/en/recherche?";
- private $mHttp; //cliente de HTTP - fará pedidos ao site do museu
- public function __construct(){
- //$this->mHttp = new \am\internet\HttpHelper();
- $this->mHttp = new HttpHelper();
- }//__construct
- const TYPOLOGY_PAINTINGS = 1;
- const TYPOLOGY_SCULPTURES = 3;
- public function getUrlForTypology(
- int $pTypology = self::TYPOLOGY_PAINTINGS,
- int $pPageNumber = 1
- ){
- $ret = self::BASE_URL."typology[$pTypology]&page=$pPageNumber";
- return $ret;
- }//getUrlForTypology
- }//LeLouvre
- define ("CLOUD", false);
- $o = new LeLouvre();
- echo $o->getUrlForTypology();
Advertisement
Add Comment
Please, Sign In to add comment