ERP adlı üyeden alıntı: mesajı görüntüle
Çok teşekkür ederim.
bunu deneyin hocam aynı hatayı verirse CURLOPT_POSTFIELDS kısmında bir hata var demektir.
Kod kısaca <arama> değerini 10 bin 10 bin artırarak request gönderiyor.
<?php
$arama = 0;
$verisayisi = 110000;
 for ($i = 0; $i <= $verisayisi/10000; $i++) {
$curl = curl_init();
  
curl_setopt_array($curl,array(
  CURLOPT_URL => 'http://192.168.1.1/ws/servis.asmx',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <arama xmlns="http://tempuri.org/">
      <firmakod>API kodum</firmakod>
      <idno>0</idno>
      <arama>'.($arama > 0 ? $arama : "").'</arama>
    </arama>
  </soap:Body>
</soap:Envelope>',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: text/xml'
  ),
));
  
$response = curl_exec($curl);
  
curl_close($curl);
echo $response;
$arama=$arama+10000;
 
}