The Best Translation Service for Apps, Websites & E-commercphp
one_sky-rubycss
本身也寫了php的腳本去測試 oneSky 提供的api, 下載功能測試不成功…應該是oneSky的bug.html
1: <?php
2:
3: $secret_key = "FZugx8StWxm8h2kffiLNeAY9Ah9btPVY";
4: $platform_id = "10523";
5: $url = "http://api.oneskyapp.com/2/";
6: $timestamp = time();
7:
8: $params = array(
9: "api-key" => "Fg53fOm1cz0jrbpxj1borZoS7nUq3Ffy",
10: "timestamp" => $timestamp,
11: "dev-hash" => md5($timestamp . $secret_key),
12: "platform-id" => $platform_id
13: );
14:
15: function request($url,$params,$flag='get',$post_data=array()) {
16: $url .= '?' . http_build_query($params);
17: $ch = curl_init();
18:
19: curl_setopt($ch, CURLOPT_URL, $url);
20: curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
21:
22: if ($flag == "post") {
23: curl_setopt($ch, CURLOPT_POST, true);
24: !empty($post_data) and curl_setopt($ch, CURLOPT_POSTFIELDS,$post_data );
25: }
26:
27: $result = curl_exec($ch);
28: curl_close($ch);
29:
30: echo $result;
31: }
32: $api = "string/output";
33: $config = array (
34: "locale" => "zh_TW"
35: );
36: request($url . $api,array_merge($params,$config));
37:
38: //文件上傳
39: $api = "string/upload";
40: $post_data = array (
41: "file" => "@" . getcwd() . "/share.php",
42: "format" => "PHP",
43: "callback-url" => "127.0.0.1"
44: );
45: request($url . $api, $params, "post",$post_data);
46:
47: //文件下載
48: $api = "string/download";
49: $config = array (
50: "locale" => "zh_TW",
51: "format" => "PHP"
52: );
53:
54: request($url . $api,array_merge($params,$config));
55: ?>
另外,將gvim升級到了gvim74,64位的.linux
要支持 command-T,須要安裝 Ruby 2.0.0-p247 (x64) 和 DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe, gcc也要64位的,測試了很久..git
要將 C:\devkit\mingw\bin 添加系統路徑…github
有時候就想,乾脆換到了linux系統算了. 反正平時作的工做基本是ssh 到 Debian再工做..vim