Jump to content

[SOLVED] php on mobile phones


Northern Flame

Recommended Posts

im trying to make a ringtone website but im have trouble

getting the ringtones to the phones LOL,

im not to familiar with the way phones read

the coding on websites, and when i tried to make

a php script that forces the download when clicked on,

it didnt work! it works on my computer, but my phone

just gives me an error message. Im starting to think

its because phones dont accept PHP or something

but i dont know.

the link tag looks like this:

 

<a href="download.php?name=ringtone.mp3&path=/mp3/ringtone.mp3">Ringtone</a>

 

I dont know, maybe i did something wrong with the tag, and the PHP script I used to force the download is:


<?php

//get variables
$saveName = stripslashes($_GET["name"]);
$savePath = stripslashes($_GET["path"]);

//send headers to initiate a binary download
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=$saveName");
header("Content-Transfer-Encoding: binary");

//set file length so browser can calculate download time
header("Content-length: " . filesize($savePath));

//read file
readfile($savePath);

?>

 

Anyone know if phones accept PHP or if I just messed up the script?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.