Skip to content
Advertisement

Tag: php

Deprecated: Implicit conversion from float to int loses precision

I am playing around with getting hours and minutes out of seconds, and we all see the many many questions that are similar to this, but I am not sure what solution is the best This is the code, which gives me: I understand the error, thats not the issue, the issue is how to solve it. I have tried

Grabbing specific elements inside DIV from external page

I need to scrap the following elements inside each one of these div’s class=”product-grid-item” (page contains several of them), but in fact I have no clue how to do it… so, I need help not to pull my hair out. 1 – The link and image inside the div: class=”product-element-top2; <a href=”https://…this_link” class=”product-image-link”> (just need the link) <img width=”300″ height=”300″

Create domain ‘example.com’ failed Powerdns API

I always getting the same error (Create domain ‘example.com’ failed) (or any domain) when trying to create new DNS zone with Powerdns API call. My request: Similar api call to get a list of DNS zones is working. GET request work properly but not POST. Can anyone help, please? My pdns.conf file is: Maybe i have to change something in

Copy folder tree-recursively with depth control

I want to copy a whole folders/files tree from one location to another, but for a particular depth I want to perform a transliteration of the destination folder from one language to another. So for /src/depth1/depth2/depth3/depth4/file I want to transliterate all depth3 folders to another language before copying them over to the destination path. So I found this little, robust

Does Laravel 8 require PHP 8.1?

So.. I developed a project with Laravel 9, then I had to upload it to my client’s server by FTP ( which was slow and painful ) to find out only afterwards that my client’s server PHP version could not go over 8.0. I tried to open the project live link ( to where I uploaded ) and the composer

Can you return another instance of the same class from the constructor function (Singleton Pattern)?

I just came across an answer to another question, https://stackoverflow.com/a/32954854/1682790 In that answer, they use the following: But everything else I’ve seen seems to contradict this section of code, namely that in PHP a constructor always returns the object that’s been instantiated, and ignores the return statement altogether. If that’s actually the case, then this isn’t actually creating a singleton,

How to avoid SoapClient PHP to decode base64 response result?

Am using SoapClient (PHP) to retrieve data from a remote webservice. And I am able to communicate perfectly with this webservice. The request am sending is supposed to retrieve base64 encoded image data. It turned out that SoapClient automatically decode base64 response and the result looks like this: My question is how prevent this automatic decoding by SoapClient. My REST

Advertisement