Comments (24)
You can fool YouTube by changing your User-Agent to some desktop browser. Open up config.php and edit this part:
$config['curl'] = array(
//CURLOPT_INTERFACE => '123.123.123.13',
//CURLOPT_USERAGENT => 'Firefox 5000'
);
Uncomment the user agent part and change it to something like "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0"
from php-proxy-app.
I've already tried that
from php-proxy-app.
So even with that, when you go to youtube.com, it still redirects you to m.youtube.com?
from php-proxy-app.
Yes, and as I saw too, the iPads user-agent was in the test page.
from php-proxy-app.
I'm not understanding this. So is the CURLOPT_USERAGENT option ignored? What if you set it to "dfgdfgdfgdfgdf". Would you still get Mozilla Apple..?
from php-proxy-app.
Nop, it's still says the same. I think it's not curl enough, get it xD.
from php-proxy-app.
lol okay. Maybe it's an outdated version otherwise I don't know why that is not working. Is it possible for you to give me access to your server so I could do some debugging from there?
from php-proxy-app.
Yes,I'll PM you with the data
from php-proxy-app.
Sorry, I don't seem to find a way to PM, may you give me a email address?
from php-proxy-app.
from php-proxy-app.
I sended you the details, don't get mad if the connection is slow, it's far away from the router, it should be stable enough
Night
from php-proxy-app.
Oh never mind your server, I just tested custom curl options on my own server and it didn't work either. Here is the problem: CURLOPT_USERAGENT is being overwritten by CURLOPT_HTTPHEADER option that stores user-agent header and others. You cannot override this option from config.php.
Ideally, setting CURLOPT_USERAGENT to something would overwrite whatever user-agent CURLOPT_HTTPHEADER was holding, but apparently this is not how php-curl works. I might send this suggestion to PHP people, to see if it makes sense to change it.
Right now you can only change your user-agent through plugins. Edit php-proxy-app/plugins/TestPlugin.php by adding this line:
$event['request']->headers->set('user-agent', 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0');
inside onBeforeRequest method. I just tested it and it works.
from php-proxy-app.
Oh ok, one question ,will you be implementing different user agents to be chosen with the proxy?
that would actually solve some problems in the future
btw, I'll be applying the code tomorrow and I'll tell you. Good Night from here
from php-proxy-app.
Many more things will be implemented as soon as I finish school which will be in about 2 weeks.
from php-proxy-app.
Hmm... Adding that line just stops the proxy from loading a web page.
from php-proxy-app.
Is it still not working for you?
from php-proxy-app.
Nop, and I just rebooted and my SD Card got corrupt.
from php-proxy-app.
You must have changed something else besides that line I gave you. Your proxy: http://proxy.e-education.hk/ is not working right now, so I can't check what's happening.
from php-proxy-app.
My SD got corrupted, so the system doesn't boot anymore, I'll be setting everything up again later.
from php-proxy-app.
ok,got it to work now. my ip is 83.59.79.21, same pass same port
from php-proxy-app.
I'm running this proxy again at my server. But your solution for changing the user agent doesn't seem to work anymore. And I don't find a solution. Would be nice if you would help me again
from php-proxy-app.
How does it not work anymore? Can you give me a link to your site and explain about what you're expecting and what you're not getting?
from php-proxy-app.
I'm expecting it to force a user agent when the proxy fetches the page. The old solution, adding $event['request']->headers->set('user-agent', 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0');
Does not seem to work anymore
from php-proxy-app.
What does http://whatsmyuseragent.com/ page say now?
from php-proxy-app.
Related Issues (20)
- i use it to proxy mp4 file,but just play a minute,browser show network error
- Getting error when trying to visit this site HOT 1
- can I use soap2day.to
- Advantages when compared to Glype?
- Range support? HOT 1
- I am unable to add plugins
- Using this for a shoutcast proxy is there a way to forward the Ip of the original user?
- new php proxy app demo links
- Form action location append
- client on windows
- The Script Doesn't Handle Pages with charset=gbk
- Project appears to be abandoned, use at your own risk ! HOT 1
- Javascript disabled after One-Click Install
- Modify heads proxy sends // Sync UserAgent HOT 1
- Log requests to a file HOT 2
- Stable PHP version? HOT 1
- How to Deny Access to Specific URL in htaccess? based on IP
- damn tis rtrd just left this repo to die srsly how to u even start it
- graphical issues
- Everything is broked
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-proxy-app.