雅虎新闻|| BBC新闻|| CNN新闻|| 美元指数|| 中国期货指数|| 股票指数|| 黄金|| 外汇|| 英汉互译|| 昭放工具
163邮箱|| 126邮箱|| 新浪邮箱|| 企业邮箱|| 21cn邮箱|| tom邮箱|| 搜狐邮箱|| hotmail邮箱|| msn邮箱|| qq邮箱

用户登录

设为主页| 淘宝铺| 加入收藏|
您的IP:18.226.200.93您的操作系统:Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
个人便签
知识库
用drupal_http_request()提交表单

<?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 — 杨超