Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am working a website, which let users download large files. problem with this is website owner says that when multiple user download files at a time, hard drive slows down and affect server performance.
He says to edit website so that website can download from different hard drives, at a time, for example football match from hard drive 1, and cricket match from hard drive 2. which divides loads between hard drives. I am not sure how to implement it, I have searched about it on many websites, but can't decide what to do, can anyone please suggest me how to implement it using FTP
also current website does not work on FTP
It's the era of Cloud Computing. Don't serve your big files directly from your own server. Upload your big files once to a Cloud-based server and let users get them from that server. Let the Cloud-provider worry about disk and network bandwidth. Much more reliable and, these days, really inexpensive.
Most popular specific providers for doing this is "Amazon S3" and "Google Cloud Storage".
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed last year.
Improve this question
I want to list out a bunch of mp3s and allow users to download them. I understand how I can download my own files with PHP, but I don't get how this will translate to other users downloading them when the website is live. Here are some specific questions.
-My understanding of web hosting is you pay for them to hold all the files you need for your website to run. Is this correct? If you have 100+ mp3s would that be pretty expensive?
-My backup is just have soundcloud embeds (they are my own songs) and redirect visitors to there. Any ideas for an alternative to this? It'd be cool if they could download from my site without having to make a soundcloud account.
-Is there a way to to make a download button that just pulls the file from soundcloud?
Thanks.
If you download your own files via PHP from your own PC it will still work the same way when your web page is hosted on a server. When you program in PHP and do your tests, your PC acts as a server to run PHP (as it is a server side programming language). So essentially when you download mp3s while testing the program on your own pc, your pc will act as the client and the host at the same time.
When somebody hosts your website they do it on a server, a server is basically just a computer. It usually has a lot of space for files, so it should not make a difference in cost wether you have 1 mp3 file on there or 100.
As for downloading directly from soundcloud I am not sure if that will work, but this older stackoverflow post might help you. How download track with Soundcloud API?
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
We have one .net application in which there is facility to upload images in given storage location. our application is completely windows based. and what it does is it stores images on given path for example "E:\Images".
On the other hand We are using using PHP application (using smarty framework) to display all our uploaded data. In this case everything working fine except images as the storage location is not within the PHP application directory.
I know with the help of symbolic link we can access the images from another disk. It is also working. But if we change the storage location later on then there will be a problem.
I also know that using base64 way we can access images. But it is taking too much time to load If I have a 30 images for one single record.
Can you please suggest a good way how can I access the images? Or how we can improve our symbolic link way?
PHP can access any area of the disk ifallowed. You may need to configure open_basedir to allow such access.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am developing a blog using Laravel 5.6 and PostgreSQL.
I have made a fully functional blog and have successfully deployed it in Heroku in Free tier.
Initially I have made a photo upload system in which user file uploads are stored in public/storage and filename is stored in a table field in posts table.
But in heroku we can't do this due to their ephemeral filesystem.
Now I neither know how to use or would be able to afford amazon s3 solution.
Don't want to store images in database directly either. Because soon I will be making a complete social networking type app for fun in my college.
As a student what I can think of is to directly upload the image in a MY google drive account public folder instead of file system.
And then retrieve that also.
I googled for a solution, but I didn't find what I am wanting. I have no experience working with APIs before.
Really need your help.
Regards.
You need a Laravel drive connector in order to do this. Best bet is to search on GitHub for "Laravel Google Drive" as there are several and without more information it's difficult to recommend one over another. Another option is to use AWS S3. You get 5GB for free for your first year and it's dirt cheap after that - and there is lots of documentation and support for S3 (see https://laravel.com/docs/5.6/filesystem).
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Let's say I want to implement storage server, which would be used as a place to store files, images, etc. from different websites. Something like S3, but only for my projects.
I thought about some API/Gateway on PHP, which would save files from those websites to appropriate server, but is it a good way? And should I use Webdav or maybe NFS/SMB, which protocol is more secure and fast?
Can you please give me advice how to create my own storage server? Especially I want to hear about appropriate stack for that, thank you.
There are a number of projects for building your own NAS or SAN (I think that is what you're looking for). Look at the FreeNAS project for example. It does require quite a bit of memory though (depending on the size of your storage and the demands you put on it).
When you want to build your own NAS, you will not need very powerful CPU's, unless you want to run apps on the NAS (FreeNAS provides a system for runnning containerized applications on the NAS, using it's storage) but you will need memory and of course plenty of disks, again depending on what your exact requirements are.
However, if you're simply looking for a place to store your own files and they are not extremely large or a huge number of files, then you could simply build a Linux server and push (or pull) the files using SFTP, it only uses OpenSSH and a single port, fully encrypted with minimal overhead.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am trying to create a blog using blogspot. It seems it is not possible to upload anything other than image files to blogspot. I want to upload a PHP file. I managed to upload the file to google sites, but it is coming as downloadable there instead of executing.
Is there a work-around here other than buying my own server space?
Is there a work-around here other than buying my own server space?
Nope. You can upload PHP files to those services all you want, but you'll never have them executed.
Buying your own server space is usually the best way to go.
There are free hosting offers around but I know of none that is any good, except maybe for the Google App Engine that is free up to a (very generous) traffic limit, in combination with Quercus. That, however, is a very specialized solution, going to be a lot of work to even get started with, doesn't support all modules of PHP, and something rather for professional applications.
But you could simply pay some cheap hosting for PHP, and move your stuff to wordpress.
There's hundred of hostings out there for as low as $1.99 a month, and with that you can host as many PHP files as you like.
Alternatively, you could stick to blogspot, and when you want to use PHP, you can just link to your other server (the one hosting PHP).