Skip to content

Coinbase Api Key Authentication Invalid Token

I might be missing something very obvious but I can’t figure out what is wrong with my request. Has anyone managed to connect to the Coinbase API and could point out my error. Request: <?php /…

How to acces class attributes from another file in PHP

I want to access class attributes from another of my files but I don’t know how. I am creating a class whose goal is to generate a CRUD table with the data passed in the parameters (table name, ID and table fields). I have created the class in the file main.php, but I am also using an external file call…

Use php function in php form

I am new in php, I am solving one task. Create a form with 2 text fields to enter only numbers (treat) and will mean number and power. After pressing the button the result is displayed on the same page, and the result is determined by recursive function in case you forget to enter a number, the number 2 will

How to show parent and child items form array in php

I am new at php. Maybe a simple question.. I want to make parent->child view. I have an array like this: With key id and key parent. How to draw in cycle correct structure? Maybe at first I need to create function for creating the tree ? Answer Cycle through the source array $arr to detect records that hav…

Stripe API Update DRAFT invoice for subscription (PHP)

I am using PHP and have a webhook generated with invoice.created. When the invoice is created, Stripe lets the draft invoice sit there for about an hour which gives us time to edit the invoice or adjust it. I use this time to check the database (via webhook) to see how many referrals this person has in the sy…

Laravel: method parameter bypass

In my laravel (7.x) application, I have a method called _index in different controllers & models with exactly same functionality (fetch the data to display in the grid) and parameters (except 1, that requires an additional parameter called available). So, I created a super method in the base controller, s…

php write csv to file returns blank file

I have some csv data that looks like this: When I try to export this csv to a file like this: I get an empty file, what am I doing wrong here Answer From the Symfony docs: https://symfony.com/doc/current/components/http_foundation.html#request If you just created the file during this same request, the file ma…