|
-
October 12th, 2006, 06:18 AM
#1
Redirect question
Hello,
I have quite weird question.
Is it possible to redirect from a binary page to some other page.
Source page has Content-type: image/gif.
Image is readed using binary fopen() and fread() and then outputed on the screen using echo... Problem is that after showing the image some next steps should be done, but script "stops" on this point... 
Is there any way to solve this? Sorry, if it's very lame question...
WML/PHP4 combination is used. So, meta tags, Javascript can't be used...
PHP's header("Location: ...") function doesn't work also... 
Webserver is IIS.
Thanks in advance!
-
October 12th, 2006, 07:39 AM
#2
Re: Redirect question
So you are trying to redirect a page that is only showing an image? Is it just the path to the image such as ... http://www.domain.com/path/image.gif?
Can you possible provide some code with what you are using?
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
October 13th, 2006, 06:15 AM
#3
Re: Redirect question
Yes, I'm trying to redirect from a page, which shows only image.
Here is the code, I'm using:
...
ob_end_clean();
if (connection_status() != 0) return FALSE;
header("Content-Type: image/gif");
header("Content-Length: " . (string)(filesize($name)));
header("Content-Disposition: inline; filename=" . $name);
header("Content-Transfer-Encoding: binary\r\n");
$bBreak = false;
$content = "";
if ($file = fopen($name, 'rb')) {
while(!feof($file) and (connection_status() == 0)) {
$content = fread($file, 1024 * 8);
echo $content;
flush();
if($content === FALSE) {
$bBreak = true;
break;
}
}
fclose($file);
}
if((connection_status() == 0) and !connection_aborted() and !$bBreak)
return TRUE;
else
return FALSE;
...
Some of the code was skipped.
If you have some hint, I'll be very thankful.
-
October 13th, 2006, 07:33 AM
#4
Re: Redirect question
 Originally Posted by Korax
WML/PHP4 combination is used. So, meta tags, Javascript can't be used...
PHP's header("Location: ...") function doesn't work also... 
Well, that pretty much puts you down to nothing. Since PHP is used, is there a reason why you are not echoing a JavaScript redirect?
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
October 16th, 2006, 06:30 AM
#5
Re: Redirect question
 Originally Posted by peejavery
Well, that pretty much puts you down to nothing. Since PHP is used, is there a reason why you are not echoing a JavaScript redirect?
Because WML doesn't support Javascript.
-
October 16th, 2006, 10:25 AM
#6
Re: Redirect question
 Originally Posted by Korax
Because WML doesn't support Javascript. 
But you can redirect using HTML as well. Can't you echo HTML?
HTML Code:
<meta http-equiv="Refresh" content="5;url=http://www.google.com">
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
October 17th, 2006, 01:27 PM
#7
Re: Redirect question
Well, I repeat one more time. The page is done in WML, not in HTML and meta tags can't be used... I wrote it in the first message of this thread.
 Originally Posted by peejavery
But you can redirect using HTML as well. Can't you echo HTML?
HTML Code:
<meta http-equiv="Refresh" content="5;url=http://www.google.com">
-
October 17th, 2006, 03:24 PM
#8
Re: Redirect question
 Originally Posted by Korax
Well, I repeat one more time. The page is done in WML, not in HTML and meta tags can't be used... I wrote it in the first message of this thread.
If META tags cannot be used, why are they part of WML?
WML META tag
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
October 17th, 2006, 09:37 PM
#9
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|