PHP Curl post, mit nicht-englischen Zeichen
Ich habe ein kleines problem mit php curl post.
Ich versuche zu veröffentlichen einige türkische Zeichen in einem forum, aber nicht geschrieben, wie es sein sollte.
Dies ist, wie ich den text speichern:
fwrite($DS,"\xEF\xBB\xBF"); fwrite($DS, $row['template']); fclose($DS);
und Buchung:
$this->curl = curl_init(); curl_setopt ( $this->curl, CURLOPT_URL, $this->vb_url . 'newthread.php?' . $url_vars ); curl_setopt ( $this->curl, CURLOPT_POST, true ); curl_setopt ( $this->curl, CURLOPT_POSTFIELDS, $post_fields ); curl_setopt ( $this->curl, CURLOPT_RETURNTRANSFER, true ); curl_setopt ( $this->curl, CURLOPT_CONNECTTIMEOUT,20); curl_setopt ( $this->curl, CURLOPT_TIMEOUT,10); curl_setopt ( $this->curl, CURLOPT_HEADER, true ); curl_setopt ( $this->curl, CURLOPT_FOLLOWLOCATION, 0); curl_setopt ( $this->curl, CURLOPT_COOKIE, $this->cookie_name ); curl_setopt ( $this->curl, CURLOPT_COOKIEJAR, $this->cookie_name ); curl_setopt ( $this->curl, CURLOPT_COOKIEFILE, $this->cookie_name ); curl_setopt ( $this->curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1'); $result = curl_exec ( $this->curl );
dies ist, wie es sein sollte:
`Bölüm resimleri, dizi ve indirme altyazı linkine aşağıdan ulaşabilirsiniz.`dies ist, wie es geschrieben ist:
`Bölüm resimleri, dizi ve indirme altyazı linkine aşağıdan ulaşabilirsiniz.`Dank
- Sind Sie ein spammer?
- spammer? wie Sie diese Schlussfolgerung? gerade gebeten, weil ich Hilfe auf eine php-Funktion?
Du musst angemeldet sein, um einen Kommentar abzugeben.
Vom http://php.net/manual/es/function.curl-setopt.php
Versuchen Sie, hinzufügen:
application/x-www-form-urlencoded
vorgeschlagen von @spencercwapplication/x-www-form-urlencoded
statttext/xml
.$post_fields
variable enthaltensecuritytoken
Eintrag?url_encode()
auf dem Formular post-Variablen. Also, versuchen Sie entfernen die neuecurl_setopt
und verwendenurl_encode
auf jedes der Felder, aus denen sich Ihre$post_fields
variable.Fest mit