Eduardo Fuerte
asked on
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!
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!
are the ebooks pdf or epub? Can you post your PHP surrounding the files?
ASKER
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"));
}
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.
ASKER
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?
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?
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.
It looks like you need another app (iboooks)
http://appadvice.com/appnn/2011/04/epub-files-open-ibooks-app
http://appadvice.com/appnn/2011/04/epub-files-open-ibooks-app
ASKER
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
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.
You're welcome, glad to help.
ASKER
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)