Solved

PHP Gateway Proxy

Posted on 2011-03-16
2
328 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

749 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