1. Go to this page and download the library: Download clox/hicurl library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
clox / hicurl example snippets
$hicurl=new Hicurl();
$google=$hicurl->loadSingle('www.google.com');
The $google-variable will now hold an associative array looking like:
[
'content'=>page-content
,'headers'=>all the received headers
,'error'=>false for success, otherwise a description of the error
]
//set a history output filepath. This setting will be used for subsequent load-calls and will make them save data to that file.
$hicurl->settings(['history'=>'history/myHistoryFile']);
//load a couple pages. they will be saved to myHistoryFile
$hicurl->loadSingle("www.google.com");
$hicurl->loadSingle("www.facebook.com");
//When we are done writing to the file we need to "compile it".
//This puts it in a closed state, and also compresses it.
//This is the state it is sent to the client in.
$hicurl->compileHistory();
Hicurl::serveHistory('history/myHistoryFile');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.