cesardpaz
5/19/2019 - 6:18 AM

Iniciar Hquery

Forma basica: 


$url = '';
$doc = hQuery::fromUrl($url, ['Accept' => 'text/html,application/xhtml+xml;q=0.9,*/*;q=0.8' , 'user_agent' => 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36']);




Forma Avanzada

$http_context = stream_context_create([
    'http' => [
    'method' => 'GET',
    'user_agent' => 'GoogleBot/1.0 +url',
    'header' => [],
]]);

$doc = hQuery::fromFile( $url, false, $http_context );