[webkit-help] change user agent

Nilesh Patil vniles at gmail.com
Mon Sep 19 23:06:04 PDT 2011


If you are using cURL for network connection then following is sample with
which you can change user agent,

// spoofing FireFox 2.0
$useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv: Gecko/20061204 Firefox/";

$ch = curl_init();

// set user agent
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
// set the rest of your cURL options here

You can have your own request header manager which sets various options in
HTTP Header.

Thanks & Regards

On Mon, Sep 19, 2011 at 7:57 PM, Luka Napotnik <luka.napotnik at gmail.com>wrote:

> Hello.
> Is it possible to change the user agent in the HTTP headers (preferably
> using Gtk+ API)?
> Greets,
> Luka
> _______________________________________________
> webkit-help mailing list
> webkit-help at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20110920/3ba92f4d/attachment.html>

More information about the webkit-help mailing list