Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 3:57 PM   #1
Scott Brown
 
Scott Brown's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default File download script problem/Headers

That didn't work. I thought about a header("Location: nextpage.html");
But I don't know how to make it run after the file downloads.

Scott

<burgermeister01@insightbb.com> wrote in message
news:RTiVa.3081$YN5.2390@sccrnsc01...
All you have to do is put the html after the php. The header function won't
work if you use it after any output has started. Hope that helps.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.504 / Virus Database: 302 - Release Date: 7/24/03


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Advertisements
Old 07-01-2007, 3:57 PM   #2
burgermeister01@insightbb.com
 
burgermeister01@insightbb.com's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default File download script problem/Headers

Hmm, thats weird. Maybe you should try putting the html inside the script.
See if that works. I'll try to help you, but its kind of like the blind
leading the blind hehe.
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 3:57 PM   #3
Marius Mathiesen
 
Marius Mathiesen's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default File download script problem/Headers

Scott Brown wrote:
> That didn't work. I thought about a header("Location: nextpage.html");
> But I don't know how to make it run after the file downloads.


A Very Basic Introduction To HTTP:
- Headers identify the contents about to be sent. Therefore, you have to
send the headers first - to the browser can determine how to handle it
- After the headers are sent, the contents are sent

So trying to use the command Header("Location: ...") after sending
content is no use. PHP rightfully doesn't let you do this, as it (best
case) would produce strange behaviour from the browser.

So if you want something to happen after the content is sent to the
browser, you're stuck with a couple of options:
- Either write some client side logic (JavaScript's
document.location.replace(anotherURL) would do the trick if you're in HTML
- Or send another header. You could try using the following command
somewhere in your headers:
Header("Refresh","<time_to_wait_before_reloading_p age>,url=<enter_another_url_here");

This would instruct the browser to "reload" the page after n seconds,
and to use the URL supplied when "reloading". So what happens is, first
the file is downloaded, then after n seconds, the browser sends a
request to the URL you supplied.

HTH,

--
Marius

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: , , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Download Rater Script? WeeNeR PHP 3 07-01-2007 3:53 PM
Looking for a way to generate an HTML file download page... Jay Vance PHP 6 07-01-2007 3:40 PM
File upload problem Fishter PHP 8 07-01-2007 3:39 PM
new file problem CoolSnake37 Graphics in general 6 06-11-2007 11:08 PM
Webpage script problem. eric Website Coding 1 08-04-2006 8:15 PM


Featured Websites




All times are GMT +1. The time now is 11:56 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98