Git Product home page Git Product logo

Comments (24)

Athlon1600 avatar Athlon1600 commented on August 30, 2024

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.

TheMetaPirate avatar TheMetaPirate commented on August 30, 2024

I've already tried that

pic1

onbfmqa

ez0hwiy

from php-proxy-app.

Athlon1600 avatar Athlon1600 commented on August 30, 2024

So even with that, when you go to youtube.com, it still redirects you to m.youtube.com?

from php-proxy-app.

TheMetaPirate avatar TheMetaPirate commented on August 30, 2024

Yes, and as I saw too, the iPads user-agent was in the test page.

from php-proxy-app.

Athlon1600 avatar Athlon1600 commented on August 30, 2024

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.

TheMetaPirate avatar TheMetaPirate commented on August 30, 2024

Nop, it's still says the same. I think it's not curl enough, get it xD.

from php-proxy-app.

Athlon1600 avatar Athlon1600 commented on August 30, 2024

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.

TheMetaPirate avatar TheMetaPirate commented on August 30, 2024

Yes,I'll PM you with the data

from php-proxy-app.

TheMetaPirate avatar TheMetaPirate commented on August 30, 2024

Sorry, I don't seem to find a way to PM, may you give me a email address?

from php-proxy-app.

Athlon1600 avatar Athlon1600 commented on August 30, 2024

[email protected]

from php-proxy-app.

TheMetaPirate avatar TheMetaPirate commented on August 30, 2024

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.

Athlon1600 avatar Athlon1600 commented on August 30, 2024

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.

TheMetaPirate avatar TheMetaPirate commented on August 30, 2024

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.

Athlon1600 avatar Athlon1600 commented on August 30, 2024

Many more things will be implemented as soon as I finish school which will be in about 2 weeks.

from php-proxy-app.

TheMetaPirate avatar TheMetaPirate commented on August 30, 2024

Hmm... Adding that line just stops the proxy from loading a web page.

from php-proxy-app.

Athlon1600 avatar Athlon1600 commented on August 30, 2024

Is it still not working for you?

from php-proxy-app.

TheMetaPirate avatar TheMetaPirate commented on August 30, 2024

Nop, and I just rebooted and my SD Card got corrupt.

from php-proxy-app.

Athlon1600 avatar Athlon1600 commented on August 30, 2024

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.

TheMetaPirate avatar TheMetaPirate commented on August 30, 2024

My SD got corrupted, so the system doesn't boot anymore, I'll be setting everything up again later.

from php-proxy-app.

TheMetaPirate avatar TheMetaPirate commented on August 30, 2024

ok,got it to work now. my ip is 83.59.79.21, same pass same port

from php-proxy-app.

TheMetaPirate avatar TheMetaPirate commented on August 30, 2024

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.

Athlon1600 avatar Athlon1600 commented on August 30, 2024

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.

TheMetaPirate avatar TheMetaPirate commented on August 30, 2024

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.

Athlon1600 avatar Athlon1600 commented on August 30, 2024

What does http://whatsmyuseragent.com/ page say now?

from php-proxy-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.