php

Sorting a multidimensional array by key and its value PHP

Hello, there is a question about arrays, or rather its sorting. There is a multidimensional array of the form: return array( ... t the entire array so that the array at the very top has arrays with the lowest num parameter What are the options? Thank you

Activating the Bootstrap modal window

How to make sure that when the page is overloaded by triggering a condition in PHP, the window is activated. For example, in ... ; } $res->free(); ?> </tbody> </table> </form>

Send a post request to a third-party site and get a response

Is it really possible to make javascript run at the click of a button, which would send a post request to a third-party site and receive a response? If not, what methods can be used to do this?

Configuring nginx for laravel

Good afternoon, I'm trying to configure laravel for nginx, nothing comes out. Config: server { listen 80; server_name ... change to an IP address with a port - it does not help. Looked with netstat -lnxp, finds the socket - var/run/php5-fpm.sock.

Fatal error

I have a music parser with VK, so, it stopped working, what could be the problem? Fatal error: Uncaught TypeError: Argument ... body; return true; } public function __destruct() { curl_close($this->ch); $this->doc = null; } } ?>

Downloading a file from the server

Blink to organize the file download. What I just did not try, but the browser persistently tries to open the file, and not download.

How to calculate the Content-Length for the POST request header in PHP CURL?

To integrate with the OptiCore Warehouse-Cloud service, you need to execute a POST request ClientOrder_CreateUpdate with XML ... ue to the fact that this value is calculated by it automatically, but how to do it in PHP??? https://yadi.sk/i/oaSYQxLof1pS3w

PHP send a PUT request

How to send this request via PHP CURL PUT. PUT /api/tickets/{id} { "id": 123, "title": "Help me!", "group": "Users", ... iority": "3 high", "article": { "subject": "some subject of update", "body": "some message of update" }, ... }

Sending a curl post request with xml data

There is some XML and a link to a third-party service: $url = 'https://example.com/'; $xml = '<?xml version="1.0" encodin ... exec($ch); curl_close($ch); return $result; } print_r(sendXmlOverPost($url, $xml)); An error is returned, System error!

PHP connection via proxy

Hello everybody! Why doesn't it connect? It works without a proxy. And with a proxy, a blank screen. What is the error? Curl ... //print curl_errno ($ch); //print $result; echo $result; curl_close ($ch); } ?>

SOAP Client PHP

Hello! Until now, I didn't have to send parameters over SOAP. Now there is a need to form such a parameter structure: <wsL ... execution, it writes that the username is not correct. I assume that the request is a curve. Please tell me which way to dig?

How do I access the functions of neighboring models? Laravel

Hello everyone, please tell me how to properly access the functions of neighboring models? initially, I had all the functions ... $endDate); return view('timetable', compact('holidays', 'user', 'countUser', 'parties', 'calculate')); } }

How do I get a direct link to a YouTube video?

Tell me how to get a direct link (or how to send a request via cURL) to a YouTube video. Now I do this, I get meta informatio ... link via meta correctly or how to access YouTube in a different way to get a direct link and info about the video. Thank you.

Setting the UTF-8 encoding for the current MySQL connection [duplicate]

This question has already been answered here: ... same table using PDO, when setting the encoding: $db->exec('SET CHARACTER SET utf8') The fields were returned in UTF-8.

Checking the form before submitting or submitting the form without checking PHP?

I'm learning PHP. I am interested in solving problems using PHP, HTML, and CSS, so please do not offer solutions using JS or ... <title>Успешная регистрация</title> </head> <body> Вы успешно зарегистрировались! </body>

Warning: Invalid argument supplied for foreach()

Hello everyone There is a website on joomla, recently such a thing began to appear: Warning: Invalid argument supplied for fo ... emart/helpers/vmsmallhelper.php on line 17 The virtuemart plugin is used, this warning is displayed in the output of products

How to escape html tags and php?

Good afternoon. Is there any way to escape all html tags except some? Let's leave only , and escape the rest? And how can ? In theory, I know how to do this, but it turns out that only the tag is removed, and the content inside it remains.

Caching images returned by php

This is the situation: I have a php script that checks whether the user is logged in or not and returns images stored on th ... o make requests to the server, but to pull the image from the cache. Tell me what I'm doing wrong... Thank you in advance!!!

PHP, MYSQL UPDATE

Iterating through values in loops does not work for, foreach. More specifically, after deleting a row from a table, update t ... he db enters the total value of the rows after deletion in the update . That is, instead of 1, 2, 3 ..., it writes 2, 2, 2...

Problem with Cyrillic in php

The project is being developed in utf-8 encoding. Faced with the problem of processing strings with Cyrillic characters. Code ... olni I.e. the function does not work for the Cyrillic alphabet. What should I do to get "Add" instead of "Add"in the output?