<?php
$url = "http://dev.qinshuguo.gugehx.myugg.us:250/cart/alipay/notify/4";
$headers = array("Content-Type" => "application/x-www-form-urlencoded");
$data = array (
"key1" => "value1",
"key2" => "value2",
"key3" => "value3",
);
$response = drupal_http_request($url, $headers, "POST", http_build_query($data, "", "&"));
?>
If you’re trying to send binary data to a servlet (images, documents, …), the ‘Content-Type’ header needs to be set to ‘multipart/form-data’. Be ware that binary data can only be submitted using POST!
星期一, 03/07/2011 - 11:09 — 杨超