Solved

PHP Gateway Proxy

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
help with PowerShell script for registry permissions 8 47
Amazon Redshift 2 25
get domain with php 7 19
Intermittent Error on Page Loading 4 10
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 …
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

919 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

23 Experts available now in Live!

Get 1:1 Help Now