Solved

PHP Gateway Proxy

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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 …

838 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