Frage

I could not find any matching method in sfTestFunctional or sfBrowser to set the UserAgent string. Maybe it's not possible because it goes through php-cli?

War es hilfreich?

Lösung

$browser->setHttpHeader('User-Agent', 'some custom string')->get('your url') This sets the user agent for the next request, so maybe you want to extend the sfBrowser object to provide the HTTP headers on every request

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top