Last active
June 24, 2016 03:58
-
-
Save fredrike/c16f5d5903c2e3e521f5a0a4bf1f4d26 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$id = "889307941125736_999866820069847"; | |
$file= "889307941125736_2015-10-16T23_889307941125736_999866820069847#1466641440.779.json"; | |
$file= $argv[1]; | |
preg_match("/.*_(.*_.*)#.*/", $file, $output_array); | |
$id = trim($output_array[1]); | |
$out = array(); | |
$out[$id] = ['id'=> $id, 'status'=> 'done','exec_time' => 0, 'type'=> 'post']; | |
$out[$id]['data'] = file_get_contents($file); | |
print json_encode($out); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment