PHP code example of ideneal / openload

1. Go to this page and download the library: Download ideneal/openload 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/ */

    

ideneal / openload example snippets




deneal\OpenLoad\OpenLoadClient;

$openload = new OpenLoadClient('apiLogin', 'apiKey');

$accountInfo = $openload->getAccountInfo();
echo $accountInfo->getEmail(); //[email protected]



deneal\OpenLoad\OpenLoadClient;

$openload = new OpenLoadClient('apiLogin', 'apiKey');

$fileInfo = $openload->getFileInfo('72fA-_Lq8Ak');
$ticket   = $openload->getTicket($fileInfo);

// ...
// After read the captcha response from $ticket->getCaptcha()->getUrl()

$downloadLink = $openload->getDownloadLink($ticket, $captchaResponse);



deneal\OpenLoad\OpenLoadClient;

$openload = new OpenLoadClient('apiLogin', 'apiKey');

$openload->uploadFile('/home/user/Pictures/image.jpg');



deneal\OpenLoad\OpenLoadClient;

$openload = new OpenLoadClient('apiLogin', 'apiKey');

$files = $openLoad->searchFiles('video.mp4', null, true);



deneal\OpenLoad\OpenLoadClient;

$openload = new OpenLoadClient('apiLogin', 'apiKey');

$folders = $openLoad->searchFolders('movies', null, true);