I need progress bar in javascript for php cURL
This is my code
$url = 'www.site.com';
$list = array("ext.pdf", "ext_1.pdf", "ext_2.pdf", "ext_3.pdf", "ext_4.pdf");
foreach($list as $lists)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_URL, $url.$lists);
$result = curl_exec($ch);
curl_close($ch);
if (preg_match("/200 OK/", $result)){
echo "<p>$url$lists</p>";
}
else if (preg_match("/401 Unauthorized/", $result)) {
echo "<p>$url$lists</p>";
}
}
Can someone help?