zounar / php-proxy Goto Github PK
View Code? Open in Web Editor NEWSimple PHP proxy script
License: The Unlicense
Simple PHP proxy script
License: The Unlicense
For which php version is it made?
I can see references to _GET in the code, but only in the debug area.
In the curl_init call there is no mention of the GET parameters.
In my situation, I want to proxy also GET calls.
I have a hardcoded targetURL, so I don't have an issue reusing the QUERY_STRING as it is.
I try to use this proxy to work around CORS issues.
The objective is to implement a "facade" for a given "service". so the facade should set cookies just as "service" does. Eventually a user should be able to use "facade" instead of "service".
If User logs in to "service" the cookies from "service" should be delivered in any subsequent call.
So if user logs in to "service" via "facade" the "service"-cookies should be set in the browser (thereby appearing as "facade" cookies). In a subsequent call the "facade" cookies should be forwarded to "service".
"facade" and "service" of course run on different servers. I have no access to the installation of "service".
How could I achieve this?
delete pls
This is a really nice module, thanks for providing it! As a complete noob I will apologize in advance. I'm curious how I can use this as a browser? I'm able to curl proxy.php like in the example, but all I get is TEXT to my shell. Even if I save the response to a variable, then what?
Thanks for this great script!
I don't like changing Proxy.php for settings, for example if I want to hardcode the TARGET_URL.
See attached Pull Request.
not install package with composer
Great script, thanks for sharing!
Using your example:
$request = curl_init('https://xxxxxxxx.net/prox/Proxy.php');
curl_setopt($request, CURLOPT_HTTPHEADER, array(
'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0',
'Proxy-Auth: Bj5pnZEX6DkcG6Nz6AjDUT1bvcGRVhRaXDuKDX9CjsAc7',
'Proxy-Target-URL: https://www.github.com'
));
curl_exec($request);
Once the GitHub page loads into browser, all the URL's in their menu become something like https://xxxxxxxx.net/enterprise and that of course is a 404.
Is there any way to use the loaded site with all remote links working?
How do I make this accessible by https? It wants to connect without security.
hi,you code is very good,i just want ask can it replace all the url about one site just like www.a.com/*,"*"can be abc or ...
thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.