Skip to content

Instantly share code, notes, and snippets.

View pgooood's full-sized avatar
😊
waves

Pavel Khoroshkov pgooood

😊
waves
View GitHub Profile
@hmic
hmic / httpPostData.php
Last active September 24, 2021 08:38
PHP post data and file - multipart-form-data
<?php
/*
* use like:
* httpPostDataFile(
* 'https://www.google.com/search', // the url to post to, optionally including get parameters like: ?this=that&here=there
* [
* 'q' => 'php http upload file', // post data like: <input name="q" value="php http upload file" />
* ...
* ], [
* 'image' => [ // the input name used like: <input name="image" type="file" />