Skip to content
Advertisement

Telegram sendPhoto with multipart/form-data not working?

Hi I am trying to send an image. The documentation states that I can send a file using multipart/form-data. Here is my code: In both cases, I get this response: Other download methods (by ID and by link) work. Can anyone please point me in the right direction? Answer Using the php-telegram-bot library, sendPhoto can be used like so: The

How to delete file in my database Laravel

How do I delete files in the database, because when I click delete the data in the folder is deleted, but the data in the file_rekap tables don’t want to be deleted, but the ones in the rekap table are deleted RekapController: Model rekap and file_rekap and script in my rekap_blade How ti fix it ? Answer If you want

Google Oauth request results in invalid grant error

We have an app with offline access_type token. Yesterday all queries were broken, because authorization failed resulted in a 400 Bad Request response: { “error”: “invalid_grant”, “error_description”: “Bad Request” }). We use SDK Google Ads API Client Library for PHP for any queries to API. Code example: App is in production in google cloud console. What have we already done:

Easy way to avoid string addition in php

This question is an extension of the question asked here – Easy way to avoid string addition in C#. I am looking for similar method to achieve in PHP. Problem: I have couple of string variables that sometimes have text and other times have integers in them. How do I add these variables when they are integers? Example: I know

PHP mail successful with empty to parameter

I am learning PHP and from what I understand the mail function has a to parameter that needs to comply with a certain string format – php doc. I have read that if I parse an empty string then the mail function will return false (not 1). However, when I try this the mail function never fails. Is there something

Advertisement