回答編集履歴
2
typo
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
$ch = curl_init();
|
20
20
|
|
21
|
-
$curl_data = ["hoge=>123,"fuga"=>"test"];
|
21
|
+
$curl_data = ["hoge"=>123,"fuga"=>"test"];
|
22
22
|
|
23
23
|
curl_setopt_array($ch, [
|
24
24
|
|
1
ちょうせい
test
CHANGED
@@ -3,3 +3,39 @@
|
|
3
3
|
curl_setopt($ch, CURLOPT_POST,true);
|
4
4
|
|
5
5
|
```
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
# 全体的に
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
```PHP
|
14
|
+
|
15
|
+
<?PHP
|
16
|
+
|
17
|
+
$url="http:・・・";
|
18
|
+
|
19
|
+
$ch = curl_init();
|
20
|
+
|
21
|
+
$curl_data = ["hoge=>123,"fuga"=>"test"];
|
22
|
+
|
23
|
+
curl_setopt_array($ch, [
|
24
|
+
|
25
|
+
CURLOPT_URL => $url,
|
26
|
+
|
27
|
+
CURLOPT_POST => true,
|
28
|
+
|
29
|
+
CURLOPT_POSTFIELDS => $curl_data,
|
30
|
+
|
31
|
+
]);
|
32
|
+
|
33
|
+
$str = curl_exec($ch);
|
34
|
+
|
35
|
+
var_dump($str);
|
36
|
+
|
37
|
+
curl_close($ch);
|
38
|
+
|
39
|
+
?>
|
40
|
+
|
41
|
+
```
|