Solved

PHP Gateway Proxy

Posted on 2011-03-16
2
323 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
Comment Utility
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
Comment Utility
I'm aware of PHPMyProxy, I wanted a simple proxy which I wrote.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
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 …
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now