컬링에 문제가 있습니다. 움라우트를 ASCII 16 진수 (예 : % DF, ü는 % DC)로 데이터를 가져옵니다. 나는 그들을 str_replace()로 변환한다. 독일어 Umlauts (ß, ü, ä, ö). Umlauts (ä, ö, ü, ß)없이 데이터를 보낼 때 말머리로 데이터 (도시)를 보낼 때 오류가 발생합니다 (정확한 값을 기입하십시오).Umlauts를 사용하는 PHP URL의 CURL
모든 것이 정상입니다! 내 코드가 잘못되었거나 말려 있지 않습니다. 나는 또한 껍질로 그것을 시도했다. - 같은 문제!
$this->url = "blah.org/?params=diesdas&city_from=Straßbourg&City_to=München";
$this->ckfile = tempnam("/tmp", "cookie");
$this->ch = curl_init();
curl_setopt($this->ch,CURLOPT_URL, $this->url);
curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($this->ch, CURLOPT_PROXY, "46.4.248.80");
curl_setopt($this->ch, CURLOPT_PROXYPORT, "3128");
curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($this->ch, CURLOPT_COOKIEJAR, $this->ckfile);
echo 'getting cookie file...';
$cookie = curl_exec($this->ch);
if($cookie = false){echo 'couldn\'t get cookie!<br> '.curl_error($this->ch);}else{echo 'got cookie! omnomnom!<br>';}
$this->ch = curl_init("blah.com/sendcookietome");
curl_setopt($this->ch, CURLOPT_COOKIEFILE, $this->ckfile);
curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($this->ch, CURLOPT_PROXY, "46.4.248.80");
curl_setopt($this->ch, CURLOPT_PROXYPORT, "3128");
curl_exec($this->ch);
meeeeeh!
그들은 그럴 필요가 있습니다. 왜 그걸 되돌릴까요? – Wrikken