Revision: 13173
Updated Code
at April 13, 2009 12:31 by lzyy
Updated Code
<?php $url = 'http://www.myheritage.cn/FP/Company/tryFaceRecognition.php';//target url $fields['file'] = '@'.'C:\Users\lzyy\Desktop\3431821560_5e18c02221.jpg'; $fields['lang'] = 'ZH'; $fields['morph'] = '1'; $fields['popup'] = 'PJSLVMMT'; $fields['loadMethod'] = 'myFiles'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url ); curl_setopt($ch, CURLOPT_POST, 1 ); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields ); //curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_REFERER, "http://www.myheritage.cn/"); curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);//get redirect content curl_exec( $ch ); //$rs = curl_exec($ch); if ($error = curl_error($ch) ) { die($error); } curl_close($ch); //print_r(htmlspecialchars($rs)); echo 'ok'; ?>
Revision: 13172
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at April 13, 2009 12:18 by lzyy
Initial Code
<?php $url = 'http://www.myheritage.cn/FP/Company/tryFaceRecognition.php';//target url $fields['file'] = '@'.'C:\Users\lzyy\Desktop\3431821560_5e18c02221.jpg'; $fields['lang'] = 'ZH'; $fields['morph'] = '1'; $fields['popup'] = 'PJSLVMMT'; $fields['loadMethod'] = 'myFiles'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url ); curl_setopt($ch, CURLOPT_POST, 1 ); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields ); //curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//获å–返回值 curl_setopt ($ch, CURLOPT_REFERER, "http://www.myheritage.cn/"); curl_exec( $ch ); //$rs = curl_exec($ch); if ($error = curl_error($ch) ) { die($error); } curl_close($ch); //print_r(htmlspecialchars($rs)); echo 'ok'; ?>
Initial URL
Initial Description
Initial Title
curlä¸Šä¼ æ–‡ä»¶å¹¶èŽ·å¾—è·³è½¬çš„å†…å®¹
Initial Tags
curl
Initial Language
PHP