Solved

PHP Gateway Proxy

Posted on 2011-03-16
2
325 Views
Last Modified: 2013-12-25
Hi

I want a PHP script which I'll rewrite all requests to index.php and this index.php will grab all things from appended URL from another host and display result to user.

I mean:

index.php?q=hello/hello.gif

q=hello/hello.gif will be written by htaccess

Now index.php will get

http://www.hiddensite.com/hello/hello.gif

will read data and display it to user. User will not understand all of this data coming from remote host.

I want it to support cookies and display cookies and set cookies I get from remote host in users browser. Any idea about this code?

Thanks from now
0
Comment
Question by:CSecurity
2 Comments
 
LVL 7

Accepted Solution

by:
Swafnil earned 500 total points
ID: 35206221
Creating a proxy is quite a bit of work, especially cookies will cause a lot of troubles (because the proxy needs to store a sent cookie and needs to forward it on any request again). I haven't taken a closer look at it but maybe the Open Source project "phpMyProxy" can help:

http://www.phpmyproxy.com/

Good luck!
0
 
LVL 17

Author Closing Comment

by:CSecurity
ID: 35813863
I'm aware of PHPMyProxy, I wanted a simple proxy which I wrote.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question