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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |
|
|||
|
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"? |
|
|||
|
> 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); ?> |
|
|||
|
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 ================== |
|
|||
|
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 |