PHP – CURL Authentication

MacBook avec code sur un bureau

To make a curl request with authentication, just add the CURLOPT_USERPWD option $ch curl_init(); curl_setopt ($ch,CURLOPT_URL, url'); curl_setopt ($ch, CURLOPT_USERPWD, "user:pswd"); curl_setopt ($ch,CURLOPT_CONNECTTIMEOUT.5); curl_setopt ($ch,CURLOPT_RETURNTRANSFER,1); $buffer – curl_exec ($ch); curl_close ($ch); if (empty($buffer)) print "Need to recover from this! <>"; } Else print "There was data returned using curl. <>"; print "Buffer content -$buffer." <>"; … Read more

jQuery file Upload – Basic solution with a callback

MacBook avec code sur un bureau

jQuery-File-Upload How to use the basic solution from http://blueimp.github.com/jQuery-File-Upload/ and make it work for all browsers (special dedication to Internet Explorer). The basic version has the advantage of not being overloaded with libraries and above all is much easier to import into an already-created website. Libraries Setting up To begin with, go to the address … Read more