FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Generating "download" pages
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Generating "download" pages [message #186414 is a reply to message #186411] Sat, 19 July 2014 20:18 Go to previous messageGo to previous message
Christoph Michael Bec is currently offline  Christoph Michael Bec
Messages: 207
Registered: June 2013
Karma:
Senior Member
Lew Pitcher wrote:

So, given that I'd like two things to happen (the web page to refresh /and/
> a file to download) on one HTTP request (ideally, a POST), what sort of
> processing do I need to do in PHP?

As Thomas had already pointed out (no pun intended), this has nothing to
do with PHP in a strict sense, but is an HTTP issue.

> Or, /can/ I do this at all?

I still don't think that it is possible via HTTP only.

> Obviously,
> some web pages /do/ this sort of thing, so it must be possible, but /how/
> they do it is the question I can't answer.

Please post an URL to such a ressource. Maybe others can answer how
they are doing it.

One solution relying on client side ECMAScript support would be to add
the following script element to the document (e.g. at the bottom of the
body element):

<script>window.location = "file-to-download.ext"</script>

--
Christoph M. Becker
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Resolved: Generating "download" pages
Next Topic: Your opinion on which technologies to use when building web applications
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 12:24:14 GMT 2024

Total time taken to generate the page: 0.04109 seconds