I am a PHP newbie and trying to add a progress-bar to an existing PHP script using the following method :
$ch=curl_init() or die(\"ERROR|Error:>
Regarding the last comment, said code requires 5.3 because stream_context_create()'s second parameter was added in 5.3. However, replacing that line with the following works in 5.2:
$ctx = stream_context_create();
stream_context_set_params($ctx, array("notification" => "stream_notification_callback"));
And in related news, the stream_notification_callback() documentation within the PHP manual has an example that fully utilizes/creates a progress bar, so check it out.
http://php.net/stream_notification_callback