How do I "forward" a page unmodified?

This is a discussion on How do I "forward" a page unmodified? within the PHP Language forums, part of the PHP Programming Forums category; I have an ASP site that generates PDFs which is on my Intranet and inaccessible to customers. I have customers ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-16-2008
Philluminati
 
Posts: n/a
Default How do I "forward" a page unmodified?

I have an ASP site that generates PDFs which is on my Intranet and
inaccessible to customers.

I have customers connected to a PHP website which is publicly
accessible. I would like my PHP website to read the generated PHP and
return the result - which writes a PDF to screen.

Here's a diagram of what I am trying to achieve:

Customer posts data to my PHP website
PHP Website opens a URL on the ASP website
ASP website replies by sending a PDF back
My PHP site shows the PDF file exactly as it should be and doesn't
give away the invoked parameters.
Reply With Quote
  #2 (permalink)  
Old 06-16-2008
Captain Paralytic
 
Posts: n/a
Default Re: How do I "forward" a page unmodified?

On 16 Jun, 12:22, Philluminati <Phillip.Ross.Tay...@gmail.com> wrote:
> I have an ASP site that generates PDFs which is on my Intranet and
> inaccessible to customers.
>
> I have customers connected to a PHP website which is publicly
> accessible. I would like my PHP website to read the generated PHP

What is this "generated PHP"?

> and
> return the result - which writes a PDF to screen.

What are you using to "write the PDF to the screen"?
Reply With Quote
  #3 (permalink)  
Old 06-16-2008
Alexey Kulentsov
 
Posts: n/a
Default Re: How do I "forward" a page unmodified?

> Customer posts data to my PHP website
> PHP Website opens a URL on the ASP website
> ASP website replies by sending a PDF back
> My PHP site shows the PDF file exactly as it should be and doesn't
> give away the invoked parameters.


<?php

// check parameters and access level...

// if all is o.k.

header('Content-type: application/pdf');
readfile($localPdfToUrl);

?>
Reply With Quote
  #4 (permalink)  
Old 06-16-2008
Jerry Stuckle
 
Posts: n/a
Default Re: How do I "forward" a page unmodified?

Philluminati wrote:
> I have an ASP site that generates PDFs which is on my Intranet and
> inaccessible to customers.
>
> I have customers connected to a PHP website which is publicly
> accessible. I would like my PHP website to read the generated PHP and
> return the result - which writes a PDF to screen.
>
> Here's a diagram of what I am trying to achieve:
>
> Customer posts data to my PHP website
> PHP Website opens a URL on the ASP website
> ASP website replies by sending a PDF back
> My PHP site shows the PDF file exactly as it should be and doesn't
> give away the invoked parameters.
>


How are you opening a URL to the ASP website? If you're using a
header('Location:...') call or similar, no - the browser will be doing
the opening. If you're using something like readfile(), the browser
won't see the URL.

In the latter case, set the appropriate content in the header and send
the file. But you can't guarantee it will be displayed in the user's
browser - all you can do is recommend it. The user still has ultimate
control over what happens with the file.

Also, if you don't what what's on your ASP site to be available from the
internet, don't make it open to the internet. Do NOT depend on hiding
urls to provide any security.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Reply With Quote
  #5 (permalink)  
Old 06-16-2008
Philluminati
 
Posts: n/a
Default Re: How do I "forward" a page unmodified?

On Jun 16, 1:14 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Philluminati wrote:
> > I have an ASP site that generates PDFs which is on my Intranet and
> > inaccessible to customers.

>
> > I have customers connected to a PHP website which is publicly
> > accessible. I would like my PHP website to read the generated PHP and
> > return the result - which writes a PDF to screen.

>
> > Here's a diagram of what I am trying to achieve:

>
> > Customer posts data to my PHP website
> > PHP Website opens a URL on the ASP website
> > ASP website replies by sending a PDF back
> > My PHP site shows the PDF file exactly as it should be and doesn't
> > give away the invoked parameters.

>
> How are you opening a URL to the ASP website? If you're using a
> header('Location:...') call or similar, no - the browser will be doing
> the opening. If you're using something like readfile(), the browser
> won't see the URL.
>
> In the latter case, set the appropriate content in the header and send
> the file. But you can't guarantee it will be displayed in the user's
> browser - all you can do is recommend it. The user still has ultimate
> control over what happens with the file.
>
> Also, if you don't what what's on your ASP site to be available from the
> internet, don't make it open to the internet. Do NOT depend on hiding
> urls to provide any security.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================


Thanks for the input guys. Alexley's example has worked perfectly!!!
Thank you so much. Thanks to the Captain and Jerry too for taking the
time to right.

You see I don't really know much PHP so I didn't even know where to
begin but now I've already finished :-)

Thanks guys.

Phill
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:19 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0