ilovepdf / iloveimg-php Goto Github PK
View Code? Open in Web Editor NEWiLoveIMG Api - PHP Library (https://developer.iloveimg.com)
iLoveIMG Api - PHP Library (https://developer.iloveimg.com)
There is no tag with this commit: 3ddd914
I cant download latest version from composer
help please
Exception
operation aborted by callback
Hi,
Using the iloveimg-php library I encounter :
1 PHP error that I've corrected in the file iloveimg-php/src/ImageTask.php :
In function toBrowser()
header("Content-Type:application/pdf")
header("content-type:application/pdf")
header("Content-Disposition:attachment; filename=\"" . $this->outputFileName . "\"");
header("content-disposition:attachment; filename=\"" . $this->outputFileName . "\"");
header("Content-Type: application/zip);
header("content-type: application/zip);
header("Content-Disposition: attachment; filename=\"" . $this->outputFileName . "\"");
header("content-disposition:attachment; filename=\"" . $this->outputFileName . "\"");
header("Content-Length: " . $size);
header("lontent-length: " . $size);
In function downloadFile($task)
if(preg_match("/filename\*\=utf-8\'\'([\W\w]+)/", $response->headers['Content-Disposition'], $matchesUtf)) {
if(preg_match("/filename\*\=utf-8\'\'([\W\w]+)/", $response->headers['content-disposition'], $matchesUtf)) {
preg_math('/ .*filename=\"([\W\w]+)\"/', $response->headers['Content-Disposition'], $matches);
preg_math('/ .*filename=\"([\W\w]+)\"/', $response->headers['content-disposition'], $matches);
1 PHP warning in the file iloveimg-php/src/Exceptions/ExtendedExceptions.php :
__construct($message, $code = 0, Exception $previous = null, $response)
: the function is no longer correct, you can't have a parameter without a default value ($response) after parameters that have a default value.Is it possible you to update your library to fix this error and this warning please ? Thanks !
I got this message:
Exception: SSL certificate problem: certificate has expired in /app/vendor/ilovepdf/iloveimg-php/src/Request/Request.php:399
Stack trace:
/app/vendor/ilovepdf/iloveimg-php/src/Request/Request.php(156): Iloveimg\Request\Request::send('GET', 'https://api.ilo...', 'v=php.1.0.2', Array, NULL, NULL)
#1 /app/vendor/ilovepdf/iloveimg-php/src/Iloveimg.php(183): Iloveimg\Request\Request::get('https://api.ilo...', Array, 'v=php.1.0.2')
#2 /app/vendor/ilovepdf/iloveimg-php/src/ImageTask.php(74): Iloveimg\Iloveimg->sendRequest('get', 'start/resizeima...', 'v=php.1.0.2')
#3 /app/vendor/ilovepdf/iloveimg-php/src/ImageTask.php(66): Iloveimg\ImageTask->start()
#4 /app/vendor/ilovepdf/iloveimg-php/src/ResizeImageTask.php(56): Iloveimg\ImageTask->__construct('project_public_...', 'secret_key_4537...', true)
#5 /app/vendor/ilovepdf/iloveimg-php/src/Iloveimg.php(221): Iloveimg\ResizeImageTask->__construct('project_public_...', 'secret_key_4537...', true)
#6 /app/common/useCases/Image/ImageResizeService.php(148): Iloveimg\Iloveimg->newTask('resize')
On app/vendor/ilovepdf/iloveimg-php/src/Request/Request.php(397)
is written next:
if(strpos($error,'SSL certificate problem')){
throw new \Exception($error.' Try using method verifySsl to false: "$iloveimg->verifySsl(false)"');
}
But this exception is not catched
I add
$iloveimg->verifySsl(false)
to my code, and it helped
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.