Skip to content

Instantly share code, notes, and snippets.

View dw5's full-sized avatar
πŸ‡¨πŸ‡­
Making better tasting swiss cheese for mail

dw5

πŸ‡¨πŸ‡­
Making better tasting swiss cheese for mail
  • ‍
  • 19:59 (UTC +03:00)
  • X @0x8616
View GitHub Profile
@dw5
dw5 / vid.me
Created May 18, 2019 07:20
Post Video to http://vid.me using Tweetbot's custom media upload
<?php
$uploadsDirectory="tmp/";
$uploadFilename = $uploadsDirectory.$_FILES['media']['name'];
move_uploaded_file($_FILES['media']['tmp_name'], $uploadFilename);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, 'https://api.vid.me/video/upload');
$postData = array(
'filedata' => '@'.$uploadFilename,
'description' => $_POST["message"],