好用的打碼平臺推薦

推薦平臺: http://www.ruokuai.com/json

選擇的緣由是 客服到位,有專業技術解決問題,api文檔以及Demo詳盡。測試了幾個沒有問題windows

官方demoapi

$damaUrl = 'http://api.ruokuai.com/create.json';
$filename = dirname(__FILE__).'/img.png';	//img.jpg是測試用的打碼圖片,4位的字母數字混合碼,windows下的PHP環境這裏須要填寫完整路徑
$ch = curl_init();
$postFields = array('username' => 'XXX',
					'password' => 'XX',
					'typeid' => 3040,	//4位的字母數字混合碼   類型表http://www.ruokuai.com/pricelist.aspx
					'timeout' => 60,	//中文以及選擇題類型須要設置更高的超時時間建議90以上
					'softid' => XX,		//改爲你本身的
					'softkey' => 'XX',	//改爲你本身的
					'image' => '@'.$filename
				   );

curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_URL,$damaUrl);
curl_setopt($ch, CURLOPT_TIMEOUT, 65);	//設置本機的post請求超時時間,若是timeout參數設置60 這裏至少設置65
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);

$result = curl_exec($ch);

curl_close($ch);

var_dump($result);
相關文章
相關標籤/搜索