Dobrý den,
mám opravdu monstrózní update a potřeboval bych řádně nastavit timeouty - padá mi to na 500...
set_time_limit(999999);
$subpublisher = "";
$xml = new XMLReader();
$database = new PDO("mysql:host=localhost;dbname=ads", "root", "fdfasdfasdsdfs");
$database->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$ch = curl_init("https://tango.admeta.com/api/CRMHTTPService/CRMHTTPService.svc/subpublishers?name=&zipcode=&street=&city=");
curl_setopt($ch, CURLOPT_MUTE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERPWD, "dsfdfsdf");
$xml->xml(curl_exec($ch)) or die("Error: Cannot read subpublishers");
curl_close($ch);
while ($xml->read())
{
if ($xml->name == "name")
{
$xml->read();
if ($xml->depth == 3)
$subpublisher = $xml->value;
else
{
$statement = $database->prepare("UPDATE `source` SET `subpublisher` = :subpublisher WHERE `website` = :website");
$statement->bindParam(":subpublisher", $subpublisher);
$statement->bindParam(":website", $xml->value);
$statement->execute();
}
$xml->read();
}
}
Děkuji.