Skip to content

Instantly share code, notes, and snippets.

View ishukshin's full-sized avatar

ishukshin ishukshin

View GitHub Profile
@ishukshin
ishukshin / gist:af235850ecc8cfce61a6
Last active September 15, 2015 20:30 — forked from antixrist/gist:faf300eb04c1aeca9137
VK API: Parse json Args to array.
/**
* For check: https://vk.com/dev/execute
*/
// var myList = Args.list;
// var listSeparator = Args.listSeparator;
// var listItemsType = Args.listItemsType;
var myList = "123456,789012,345678,901234,567890";
<?php
$fileName = $_FILES['afile']['name'];
$fileType = $_FILES['afile']['type'];
$fileContent = file_get_contents($_FILES['afile']['tmp_name']);
$dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent);
$json = json_encode(array(
'name' => $fileName,
'type' => $fileType,
'dataUrl' => $dataUrl,