Welcome to Dream.In.Code
Become a PHP Expert!

Join 136,923 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,795 people online right now. Registration is fast and FREE... Join Now!




putting header info in php

 
Reply to this topicStart new topic

putting header info in php

samn84
25 Mar, 2008 - 03:41 AM
Post #1

New D.I.C Head
*

Joined: 21 Feb, 2008
Posts: 41

i have a menu page which has 5 links...each link opens an application but the application doesn't run when the user tries to click any of the link and gives an error message that cannot down load so i have put this header info in the menu page like this.

i have placed it in this manner:

CODE


<html>
<head>
<?php
header('Content-type: application/vnd.symbian.install');
header('Content-Disposition: attachment; filename = "Vault-S60-3rd.SIS"');
?>
<title>Demo Applications</title>
</head>



but it dsnt wrk.

so where i shud put the content-type or mime type for any file download from the server.does it have to be on the menu page or in the application itself....the applications are in symbian.

any help wud be appreciated

This post has been edited by samn84: 25 Mar, 2008 - 03:50 AM
User is offlineProfile CardPM
+Quote Post

thehat
RE: Putting Header Info In Php
25 Mar, 2008 - 03:59 AM
Post #2

D.I.C Head
Group Icon

Joined: 28 Feb, 2008
Posts: 217


Dream Kudos: 100
My Contributions
You can't send any header information once you've started outputting page content. Move your header calls to the top of the document and it should be fine.
User is offlineProfile CardPM
+Quote Post

spearfish
RE: Putting Header Info In Php
25 Mar, 2008 - 05:25 AM
Post #3

Monkey in Training
Group Icon

Joined: 10 Mar, 2008
Posts: 746



Thanked: 2 times
Dream Kudos: 225
My Contributions
icon_up.gif

That should do it. Anything, including "<html>" is considered output.
User is offlineProfile CardPM
+Quote Post

samn84
RE: Putting Header Info In Php
26 Mar, 2008 - 12:01 AM
Post #4

New D.I.C Head
*

Joined: 21 Feb, 2008
Posts: 41

i have placed it as the first line on the page still doesn't work.it says installation not supported.
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: Putting Header Info In Php
26 Mar, 2008 - 12:11 AM
Post #5

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 6,495



Thanked: 66 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
QUOTE(samn84 @ 26 Mar, 2008 - 01:01 AM) *

i have placed it as the first line on the page still doesn't work.it says installation not supported.

Can you please paste the updated code as well as a copy of the error?
User is online!Profile CardPM
+Quote Post

samn84
RE: Putting Header Info In Php
26 Mar, 2008 - 01:23 AM
Post #6

New D.I.C Head
*

Joined: 21 Feb, 2008
Posts: 41

CODE

<?php
header('Content-type: application/vnd.symbian.install');
header('Content-Disposition: attachment; filename = "Vault-S60-2nd.SIS"');
//header('location:Vault-S60-3rd.SIS');
header('Content-Transfer-Encoding: binary');

?>
<html>
<head>
<title>Demo Applications</title>
</head>
<body>

<table border="0" cellspacing="15" cellpading="15" width="100%" align="center">
<br><br>
<tr>
<td rowspan=6 valign='top' width=20%>
        <img src="logo.jpg"></td>
<TD align="left"><FONT FACE=timesnewroman SIZE="5" color="#00008b"><b><u>Demo Applications</u><br><br></b></FONT></TD>
</tr>

<tr>
        <TD>&nbsp;<A HREF="Vault-S60-2nd.SIS"><FONT FACE=timesnewroman SIZE=3>2nd Edition</FONT></A></TD>
</tr>
</body>
</html>


basically when i run this application on the mobile, it shud install the application named Vault-S60-2nd.SIS............but when i try to download it from the mobile, it says unable to download Vault-S60-2nd.SIS
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: Putting Header Info In Php
26 Mar, 2008 - 01:26 AM
Post #7

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 6,495



Thanked: 66 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
& this file, filename = "Vault-S60-2nd.SIS" is set with the correct permissions for it to be viewed & accessed externally? Can you test it within the local network?
User is online!Profile CardPM
+Quote Post

samn84
RE: Putting Header Info In Php
26 Mar, 2008 - 01:37 AM
Post #8

New D.I.C Head
*

Joined: 21 Feb, 2008
Posts: 41

yes it works on the browser but dsnt show up on the cell phone
User is offlineProfile CardPM
+Quote Post

samn84
RE: Putting Header Info In Php
27 Mar, 2008 - 12:28 AM
Post #9

New D.I.C Head
*

Joined: 21 Feb, 2008
Posts: 41

see its a symbian file thats already made and run fine......i wna install it on a phone with symbian 3rd edition...........but the fing is that on the phone when i click on the link it say download of filename.SIS is not supportd..........i jz wna know if there is somthing wrong with the php headers............or are they ok so that i move on to some new fing.

there was this .CAB symbian file also,but it runs fine on the phone but the .SIS symbian file doesnot run on the phone giving an error message that i mentioned above!!!!


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/3/08 10:16PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month