Skip to content

Commit

Permalink
Отменил верификацию ssl для формы ГИБДД
Browse files Browse the repository at this point in the history
  • Loading branch information
vlasovilya committed May 29, 2014
1 parent 9cb3c0e commit cd65405
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions protected/controllers/HolesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ public function actionGetGibddCaptcha($sid){
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_MAXREDIRS, 100 );
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_COOKIEFILE, Yii::app()->user->uploadDir.'/'."gibddru_cookie.txt");

if (($answer = curl_exec($ch)) === false) {
Expand Down Expand Up @@ -823,6 +824,7 @@ public function actionSendToGibddru($ajax=false, $many=false)
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_REFERER, 'http://www.gibdd.ru/letter/?reg='.$model->f_gai_regkod);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
Expand Down
2 changes: 2 additions & 0 deletions protected/models/HoleRequestForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ public function RequestGibddru($pdfBinary, $gibdd)
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, Yii::app()->user->uploadDir.'/'."gibddru_cookie.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, Yii::app()->user->uploadDir.'/'."gibddru_cookie.txt");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, array(
//'photo' => '@' . $_SERVER['DOCUMENT_ROOT'].$model->PictureFolder.'original/'.$model->picture
));
Expand Down Expand Up @@ -197,6 +198,7 @@ public function RequestGibddru($pdfBinary, $gibdd)
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_MAXREDIRS, 100 );
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_COOKIEFILE, Yii::app()->user->uploadDir.'/'."gibddru_cookie.txt");

if (($leter = curl_exec($ch)) === false) {
Expand Down

0 comments on commit cd65405

Please sign in to comment.