Hello Again,
Can you please tell how to create a serverside self extracting zip file. I really need this for my project.
Thank you in advance and I am really grateful for all your helps.
Hello Again,
Can you please tell how to create a serverside self extracting zip file. I really need this for my project.
Thank you in advance and I am really grateful for all your helps.
you'll need to call an external program that can do that. Which would of course have to be operating system dependent.
And no, you're (on any server worth the effort invested in its security) won't have permission to execute that created executable file on the server.
Creating zip files in php is easy. Creating a self-extractor, well that's something else. I don't think php can do this. You may be able to write a self-extractor program, but rather you than me :)
Hello guys, thanks for your responses, this is what I've got so far "<?php system('unzip filename.zip'); ?>
" upon accessing this code, it will extract filename.zip to the server it resides in. Rather than self extract, I need to look for another way to make it act like a self extraction or what ever way round.
The the dilema is I'm trying to extract from and into a remote server, I know this is somehow possible, but I don't know how. Thanks in advance and I'm really grateful for every help possible.
You can, perhaps write a function to display/run files after extraction using something like
an include or similar, but you will need to check permissions on the server. It's one thing to get it working on your dev machine where you have all permissions but as pointed out by jwenting, another thing entirely on a server where you don't.
TonyG, that sounds great, I will be most grateful if you can share a typical code that does that. Thanks in advance.
Never done it before, but the easiest way I found with a bit of 'googling' was to open the extracted archive in an iframe.
<iframe width=100% height=100% src='unzipped/filename/index.php'> </iframe>
Worked for me.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.