如何序列化以下代码并使上面的静态变量监听先前的表单输入?
如何使用以下内容发布多表单数据,请帮助。
<?php
$dest = 'phonenumber';
$user = 'username';
$pass = 'passowrd';
$ch = curl_init("http://hlr.routotelecom.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "number=$dest&user=$user&pass=$pass");
curl_setopt($ch, CURLOPT_POSTFIELDS, array('field1=value&field2=value2'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch); curl_close($ch);
echo print_r(json_decode($output), 1);
?>