Changeset 9
- Timestamp:
- 04/10/07 23:35:36 (2 years ago)
- Files:
-
- trunk/submit_audio.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/submit_audio.php
r8 r9 19 19 global $upload_url; 20 20 21 set_time_limit(1800); // run for 30 minutes, max 22 21 23 $session_dir = $argv[1]; 22 24 $session_id = basename($session_dir); … … 25 27 if (count($argv) != 2) crash(1,"usage: submit_audio.php /path/to/audio/dir/to/submit"); 26 28 29 exec("rm -f my_cookies.txt"); 27 30 if (tar_gz($session_dir,$tar_gz_path) !== 0) crash(6,"ERROR: tar failed"); 28 31 … … 107 110 'content' => 'automated submission; see .tgz for details', 108 111 'contentType' => 'text', 112 '__storageId_action' => 'upload', 109 113 'storageId' => "@$tar_gz_path", 110 114 'subscribe' => '1', … … 119 123 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 120 124 curl_setopt($ch, CURLOPT_URL, $url); 125 curl_setopt($ch, CURLOPT_VERBOSE, 1); 121 126 curl_setopt($ch, CURLOPT_POST, 1); 122 curl_setopt($ch, CURLOPT_UPLOAD, 1);123 127 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_a); 124 128 $result = curl_exec($ch);