title: How to password protect zip in php?
body: <p>I am able to create zip file using ziparchive lib in php. Is there any way I can specify a password for the zip files that I create? Is there any other custom library that can do the same?</p>
  
  <p>My php is running in safe mode and my hosting provider does not allow me to change it. So I'm not able to do shell_exec() function. Is there any other way around it by using any other library? I checked the <strong>DotNetZip</strong> Library, but it says it supports only <strong>.net</strong> based languages and in windows, nothing related with php is mentioned. Also I'm using a linux server.</p>
  
  <p>The application is that I have a few xml files that are dynamically generated and need to be zipped and my clients will download it. But I need to put a password so that even though anyone intercepts it, they won't be able to open it.</p>
  
  <p>Or is there any alternative way?</p>