2012-10-26 79 views

回答

3

使用捲曲:

$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, "http://www.example.com/path/to/form"); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_POST, true); 

$data = array(
    'foo' => 'foo foo foo', 
    'bar' => 'bar bar bar', 
    'baz' => 'baz baz baz' 
); 

curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
$output = curl_exec($ch); 
$info = curl_getinfo($ch); 
curl_close($ch);