0
我一直在尋找解決方案,爲我的問題這麼長一段時間。 但我只是找不到任何解決方案,我不知道究竟要搜索什麼。PHP Post請求內容包含原始數據
我會在這裏解釋我的問題。 目前我有這個PHP腳本完美的工作,併發送一個成功的請求,並收到迴應。
<?php
$url = 'http://example.nl/index.php';
$data = array('url' => 'http://www.myip.nl/', 'verkort' => 'Verkort URL');
// use key 'http' even if you send the request to https://...
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
var_dump($result);
?>
但我真的需要發送請求,內容如下幫助:
見截圖:http://i.imgur.com/VgedJes.png
我需要添加3頭,我不知道如何告訴字段/值是空的,你可以在屏幕截圖中看到。 我只是無法弄清楚如何做到這一點。
我真的很感激,如果有人能幫助我這個!