SunQuest
           WAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreWAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old November 9th, 2004, 06:25 AM
mveljko mveljko is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 3 mveljko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 40 m 36 sec
Reputation Power: 0
Lightbulb How to preserve the file name when downloading pic & midi

Hi everybody,

Below is a code that delivers (in this case) a picture to user. Let's name it download.php. When I run this program in IE, the file is named as it should be (somepicture.gif) and saves to a disk. But the problem is when I try to save it to my mobile phone via WAP site.
An image (or midi) is successfuly received and viewed on my phone screen, but I cannot save it under its original name. It's saved as download.php and afterwards, when I disconnect, my phone does not recognize it as an image.
I know that this also depends of the type of mobile phone. Some phones manage to save the image, but looses the file name also.

So, the question is: How can I preserve file name when downloading picture to my phone? Is it possible?


THE CODE:

<?php
$filename='somepicture.gif';
$size=5478;
$requested_file = '/app/wap/download/'.$filename;
if (file_exists($requested_file)) {
header('Content-Type: image/gif');
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Content-Disposition: attachment; filename="'.$filename.'"');
header('Content-Length: '.$size);
readfile($requested_file);
}
exit();
?>



THANX!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreWAP Programming > How to preserve the file name when downloading pic & midi


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway