我正在尝试将数据存储在 vtiger 潜在客户模块中。我可以通过 file_get_contents() 发送变量,但它不起作用。这是我的代码
$moduleName = $_POST['moduleName'];
$company = $_POST['company'];
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$website = $_POST['website'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$city = $_POST['city'];
$state = $_POST['state'];
$code = $_POST['code'];
$post = http_build_query(array(
"firstname" => "$firstname",
"lastname" => "$lastname",
"website"=>"$website",
"phone"=>"$phone",
"email"=>"$email",
"city"=>"$city",
"state"=>"$state",
"code"=>"$code",
"moduleName" => "$moduleName",
"company " => "$company",
));
$context = stream_context_create(array("http"=>array(
"method" => "POST",
"header" => "Content-Type: application/x-www-form-urlencoded\r\n" .
"Content-Length: ". strlen($post) . "\r\n",
"content" => $post,
)));
$page = file_get_contents("http://vtiger.com/modules/Webforms/post.php", false, $context);
请帮我。