Skip to content

Instantly share code, notes, and snippets.

Avatar

Harrison Henri dos Santos Nascimento harrisonhenri

  • Alelo
  • Bahia, Brazil
View GitHub Profile
@komyg
komyg / k8s-cheat-sheet.md
Last active Dec 28, 2020
Kubernetes Cheat Sheet
View k8s-cheat-sheet.md
@maxivak
maxivak / __upload_file.md
Last active Aug 4, 2022
PHP upload file with curl (multipart/form-data)
View __upload_file.md

We want to upload file to a server with POST HTTP request. We will use curl functions.


// data fields for POST request
$fields = array("f1"=>"value1", "another_field2"=>"anothervalue");

// files to upload
$filenames = array("/tmp/1.jpg", "/tmp/2.png");