Re: Encoding Question for getting pages

From: Date: Mon, 11 Oct 2004 14:49:43 +0000
Subject: Re: Encoding Question for getting pages
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-199172@lists.php.net to get a copy of this message
* and then Matt M. declared.... > > Mozilla%2F4.0%20%28compatible%3B%20MSIE%206.0%3B%20Windows%20NT%205.1%0A > > > > that one is using rawurlencode() but it's just as bad with urlencode - > > How *should* I be doing this? > > is this how you tried to do it? > > $userAgent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"; > curl_setopt($ch, CURLOPT_USERAGENT, $userAgent); Yep, but like this: $userAgent = urlencode("Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"); curl_setopt($ch, CURLOPT_USERAGENT, $userAgent); -- Nick W

« previous php.general (#199172) next »