Sometimes curl function will work in local xaamp but it will not work in PA server
mostly this is because of curl settings inside the server.for this add the attributes int the provisioning attribute tab. External provisioning will work in this case.