Hi there
I am trying to code a WAP page that checks your pic code with the db upon reaching the page, it returns a name of a file that needs to be downloaded. At the moment the code just does a url foreward to that piece of content, but it would be very easy for people to get other content with out pins if they have done that just once.
I have found code that fixes that problem, the problem is, it works fine in a normal browser, but as soon as I use the code for wap it doesn't.
header("Content-Type: image/gif; name=$filename");
header("Content-Disposition: attachment; filename=$filename");
header("Pragma: no-cache");
header("Expires: 0");
$url .= $filename;
$fpUrl=fopen("$url","r");
while(!feof($fpUrl)) {
print fread($fpUrl,1024);
flush();
}
fclose($fpUrl);
The problem lies in this. When useing "Content-Type: image/gif" it saves the image onto the phone fine, but the name of the image is the name of the PHP file and not $filename.
Like I said, this seems to work fine with normal browsers.
Thanks in advance guys
Garth Michel