GTA26: PEAR HTTP_Request bzw. HTTP_Client als Mozilla Browser ausgeben?

Wie kann man HTTP_Request bzw. HTTP_Client als Mozilla Browser ausgeben?

  1. Hello,

    Wie kann man HTTP_Request bzw. HTTP_Client als Mozilla Browser ausgeben?

    wahrscheinlich, indem man den entsprechenden Header für User-Agent setzt.

    MfG
    Rouven

    --
    -------------------
    sh:| fo:} ch:? rl:( br:& n4:{ ie:| mo:} va:) js:| de:] zu:| fl:( ss:) ls:& (SelfCode)
    I will never understand why Germans feel the need to kill trees  --  Arbeitskollege aus UK zum Thema ob eine Dokumentation elektronisch oder auf Papier ausgeliefert wird
    1. Das bedeutet also dass man
      HTTP_Client::setDefaultHeader(Mozilla/5.0 )
      eingibt und schon ist die sache gegessen?

      1. Hello,

        Das bedeutet also dass man
        HTTP_Client::setDefaultHeader(Mozilla/5.0 )
        eingibt und schon ist die sache gegessen?

        na ja, aber das ist eine sehr schematische Darstellung. Man liest im Manual nach, welche Parameter der Aufruf unterstützt und befüllt sie dann entsprechend - wie bei jeder Funktion halt. Und das Manual spricht nunmal von $name und $value, oder direkt einem assoziativen Array aus $name->$value.

        MfG
        Rouven

        --
        -------------------
        sh:| fo:} ch:? rl:( br:& n4:{ ie:| mo:} va:) js:| de:] zu:| fl:( ss:) ls:& (SelfCode)
        Computer programming is tremendous fun. Like music, it is a skill that derives from an unknown blend of innate talent and constant practice. Like drawing, it can be shaped to a variety of ends: commercial, artistic, and pure entertainment. Programmers have a well-deserved reputation for working long hours but are rarely credited with being driven by creative fevers. Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination, but because their imagination reveals worlds that others cannot see. -- Larry OBrien and Bruce Eckel in Thinking in C#