J
J
Jony13372016-11-08 16:30:44
PHP
Jony1337, 2016-11-08 16:30:44

Why is this php code executing for a very very long time?

There is such a code

error_reporting(E_ALL);
ini_set('display_errors', 'on');
  $url = 'http://www.appline.ro/place';
$post['sa'] = 'pic';
$post['nume'] = 'zbs';
$post['sa'] = 'pic';
$post['sex'] = 'masculin';

$headers = array("Content-Type:multipart/form-data"); // работает и без этого

$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,  TRUE); // работает и без этого
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); // работает и без этого
$data = curl_exec($ch);
echo $data;

Minutes 3 pages loaded and why so long?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2016-11-08
@Jony1337

Yesterday I spent half an evening on solving the mister's problem, chewed everything up, gave out a working code, and here it is again.
Yes, change your hosting eventually. I understand that there is a problem in it. The code is ok.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question