Set correct headers with PHP to make mobile browsers download it

Closed

Hello everybody!

I am trying to make an android default browser download an image ( [url removed, login to view] )

I looked through the internet and got several places saying that this solution would definitely work, but it doesn't. (to test - select an animation, click "Generate preloader", then the "download now" button.

These are the headers I am setting:

header("Pragma: public"); // required

header("Expires: 0");

header("Cache-Control: must-revalidate, post-check=0, pre-check=0");

header("Cache-Control: private",false); // required for certain browsers

header('Content-type:application/octet-stream' );

header("Content-Disposition: attachment; filename="[url removed, login to view]"" );

header("Content-Transfer-Encoding: binary");

Note that when the "Download now" button is clicked what I do is set the src attribute in Iframe to the php script that generates the loading animation with the headers above. Script is in PHP

So I need the image starting download when the "download now" button is clicked in android default browser along with all other popular browsers both on computer and mobile devices. The solution with just changing headers will be prioritized.

PLEASE, don't bid if you can't do it :)

Skills: Android, PHP

See more: what is cache on android, what can you do with php, to make animation, default browser android, control computer with android, click button gif, browsers for android, android internet browser, android default browser, android browsers, 55 in binary, make mobile, loading gif, mobile php script download, mobile script download, control attribute, php post binary, image download test, content disposition, gif android, mobile iframe, iframe application, loading cache, image encoding, http post headers

Project ID: #5044444

6 freelancers are bidding on average $108 for this job

srinichal

I am willing to discuss and deliver the project as I am an expert coder on the freelancer website .

$210 USD in 6 days
(87 Reviews)
7.0
tlchung

skilled developer here, have done over 500+ project for my clients, i can do the fix for you, let start now.

$20 USD in 1 day
(107 Reviews)
6.8
Valentina1993

Hello, I am Valentina Padurean working in a Mobile Application Development Company i.e. Meyashi Infosoft. * Client repetition ratio is more than 85% because of Quality Solution. * Fast turn around time. * P More

$103 USD in 3 days
(6 Reviews)
4.8
eComOS

Hello preloadersnet, I have gone through your outsourced requirement "Set correct headers with PHP to make mobile browsers download it" and have analyzed that I have right credentials (Android, PHP) to execute your More

$103 USD in 0 days
(40 Reviews)
4.7
mrnewict

Hi, I'm an expert about PHP. I have read your project and confident that can handle it. Please contact me if you need help. Hope can work with you. Best regards, Mr New

$55 USD in 0 days
(13 Reviews)
4.7
DeathLine

Can we talk more about this project, I think I understand what you want, you want to download an image when any browsers are opened on user's phone

$249 USD in 7 days
(10 Reviews)
4.3
rosestudios

Hi I may not be chosen for this project but I'm much eager to offer you other stuff. I have done a Promo Video Template that you can use to promote your business, website or product. Sample: http://goo.gl/XvJ0JT More

$13 USD in 3 days
(0 Reviews)
0.0