Could you point what is the better strategy to download a e-book file from a PHP site directly to a smartphone?

Hi Experts!

Could you point what is the better strategy to download a e-book file from a PHP site directly to a smartphone and make it someway be opened ?

The files are very large beggining from 50MB...

(Acctually the site downloads fine in PC)

Thanks in advance!
Eduardo FuerteDeveloper and AnalystAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Eduardo FuerteDeveloper and AnalystAuthor Commented:
Thanks Dave!

If needed I can say the site I'm talking:

Secretaria de Agricultura e do Abastecimento do Estado de São Paulo - Brasil
(Department of Agriculture and Agro Suppey from  the State of São Paulo  - Brazil)
0
Kyle AbrahamsSenior .Net DeveloperCommented:
are the ebooks pdf or epub?  Can you post your PHP surrounding the files?
0
Eduardo FuerteDeveloper and AnalystAuthor Commented:
The e-books the department is distributing is like those:

img001
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Eduardo FuerteDeveloper and AnalystAuthor Commented:
And here is the PHP code that surrounds:

    if ($epub == true)
      {
          $arquivo = base_url("xxxxx/xxxx/e_pub/$e_pub");
          $this->load->helper('download');
          $arquivo = basename($arquivo);
      
          // EF 2015: Growing memory limit just to that operation and obtaining acryual PHP.ini value 

           $limite_anterior = ini_set( 'memory_limit', '1024M' );

          $filename = base_url('xxxxxx/xxxxx/e_pub/' . $arquivo);

          
          $data = file_get_contents(base_url('arquivos/cesans/e_pub/' . $arquivo));

         // Codeigniter function 
          force_download($arquivo, $data);
                    
          // Back to PHP.ini memory limit
          ini_set( 'memory_limit', $limite_anterior );
          
          
      } else
      {
          redirect(base_url("$arquivo"));
      }

Open in new window

0
Dave BaldwinFixer of ProblemsCommented:
The question for devices other than computers is... Do they have an ePub reader and do they have the memory available to store the documents?  I don't know since I don't have any of the devices.
0
Eduardo FuerteDeveloper and AnalystAuthor Commented:
They are trying to download in na iPhone 5-S  16GB to do the task.

I really don't know how it  works too.

Until now I've only downloaded  e-books from Google Play  in smartphones with no concern about the mecanisms.

Something like that: download e-books from a PHP site in a smartphone (using the smartphone browser)  sounds  unusual.  First of all:  is it possible?

Something must be done in addition?
0
Dave BaldwinFixer of ProblemsCommented:
As far as I know, if they are running a browser like Safari, it should be able to download any public link on a web site.  I don't know if an iPhone will open an ePub correctly or not.
0
Kyle AbrahamsSenior .Net DeveloperCommented:
It looks like you need another app (iboooks)
http://appadvice.com/appnn/2011/04/epub-files-open-ibooks-app
0
Eduardo FuerteDeveloper and AnalystAuthor Commented:
Not only an Apple smartphone/ PC have to download the e-book.

The PHP site must permit downloads of e-books in any kind of PC(s)  and  any kind of smartphone...
a challenge.

After downloaded, every device must have what is necessary to open the e-book.
0
Dave BaldwinFixer of ProblemsCommented:
The PHP site must permit downloads of e-books in any kind of PC(s)  and  any kind of smartphone...
The PHP site doesn't care, it's just a link that downloads a file.  It's up to the user of the device to have the proper software to open and read the ePubs.  That is Not something you can do or force them to do.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Eduardo FuerteDeveloper and AnalystAuthor Commented:
Dave

You are completelly right.

After correct the download routine the PHP site download the e-book pretty well!

Very good to see the e-book opened in the smartphone.

Thank you for your consideration in clear my intentions when  this question started, too.
0
Dave BaldwinFixer of ProblemsCommented:
You're welcome, glad to help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.