<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:content="http://purl.org/rss/1.0/modules/content/"
 xmlns:atom="http://www.w3.org/2005/Atom"
>
	<channel>
		<copyright>Copyright 1998 - 2026 DPG Media B.V.</copyright>
		<pubDate>Fri, 22 May 2026 16:38:01 GMT</pubDate>
		<lastBuildDate>Fri, 22 May 2026 16:38:01 GMT</lastBuildDate>
		<description>GoT - list_messages</description>
		<image>
			<link>https://gathering.tweakers.net/</link>
			<title>Gathering of Tweakers</title>
			<url>https://tweakers.net/g/if/logo.gif</url>
		</image>
		<language>nl-nl</language>
		<link>https://gathering.tweakers.net/rss/list_messages/1083586</link>
		<atom:link href="https://gathering.tweakers.net/rss/list_messages/1083586" rel="self" type="application/rss+xml" />
		<title>[php] Chinese google url ophalen, geeft foute resultaten - Softwareontwikkeling - GoT</title>
		<webMaster>gathering@tweakers.net (Administrator)</webMaster>
		<item>
			<title>pim</title>
			<link>https://gathering.tweakers.net/forum/list_message/24520342#24520342</link>
			<description>Vesta, bedankt!!! Het werkt nu!</description>
			<content:encoded><![CDATA[Vesta, bedankt!!! Het werkt nu!]]></content:encoded>
			<dc:creator>pim</dc:creator>
			<guid isPermaLink="false">https://gathering.tweakers.net/forum/list_message/24520342#24520342</guid>
			<pubDate>Wed, 02 Nov 2005 12:26:18 GMT</pubDate>
		</item>
		<item>
			<title>Vesta</title>
			<link>https://gathering.tweakers.net/forum/list_message/24519982#24519982</link>
			<description>PHP:1
2
3
4
&lt;?php
header(&quot;Content-type: text/html; charset=utf-8&quot;);
echo  file_get_contents(&#039;http://www.google.com/search?q=%E6%9C%80%E4%BD%B3%E6%89%8B%E6%9C%BA&amp;ie=utf-8&amp;oe=utf-8&#039;);
?&gt;Twee aanpassingen: een utf-header zodat de client de data goed parst en ik geef in de url mee dat de data in utf-8 is (ie=utf-8&amp;oe=utf-8). Blijkbaar doet je browser dat laatste automatisch en php niet.</description>
			<content:encoded><![CDATA[<div class="code">PHP:<br><table class="phphighlight"><tr><td class="phphighlightline"><pre>1
2
3
4
</pre></td><td class="phphighlightcode"><div><pre><span class="code_cp">&lt;?php</span>
<span class="code_nb">header</span><span class="code_p">(</span><span class="code_s2">&quot;Content-type: text/html; charset=utf-8&quot;</span><span class="code_p">);</span>
<span class="code_k">echo</span>  <span class="code_nb">file_get_contents</span><span class="code_p">(</span><span class="code_s1">&#39;http://www.google.com/search?q=%E6%9C%80%E4%BD%B3%E6%89%8B%E6%9C%BA&amp;ie=utf-8&amp;oe=utf-8&#39;</span><span class="code_p">);</span>
<span class="code_cp">?&gt;</span></pre></div></td></tr></table></div>Twee aanpassingen: een utf-header zodat de client de data goed parst en ik geef in de url mee dat de data in utf-8 is (ie=utf-8&amp;oe=utf-8). Blijkbaar doet je browser dat laatste automatisch en php niet.]]></content:encoded>
			<dc:creator>Vesta</dc:creator>
			<guid isPermaLink="false">https://gathering.tweakers.net/forum/list_message/24519982#24519982</guid>
			<pubDate>Wed, 02 Nov 2005 11:51:22 GMT</pubDate>
		</item>
		<item>
			<title>frickY</title>
			<link>https://gathering.tweakers.net/forum/list_message/24519959#24519959</link>
			<description>Je zal vergeten urlencode() over de query-string te trekken?</description>
			<content:encoded><![CDATA[Je zal vergeten urlencode() over de query-string te trekken?]]></content:encoded>
			<dc:creator>frickY</dc:creator>
			<guid isPermaLink="false">https://gathering.tweakers.net/forum/list_message/24519959#24519959</guid>
			<pubDate>Wed, 02 Nov 2005 11:48:30 GMT</pubDate>
		</item>
		<item>
			<title>Webgnome</title>
			<link>https://gathering.tweakers.net/forum/list_message/24519781#24519781</link>
			<description>char encoding?</description>
			<content:encoded><![CDATA[char encoding?]]></content:encoded>
			<dc:creator>Webgnome</dc:creator>
			<guid isPermaLink="false">https://gathering.tweakers.net/forum/list_message/24519781#24519781</guid>
			<pubDate>Wed, 02 Nov 2005 11:25:54 GMT</pubDate>
		</item>
		<item>
			<title>pim</title>
			<link>https://gathering.tweakers.net/forum/list_message/24519736#24519736</link>
			<description>Ik wist niet dat die functie bestond..
Heb het ff daar mee gedaan maar exact hetzelfde probleem..</description>
			<content:encoded><![CDATA[Ik wist niet dat die functie bestond..<br>
Heb het ff daar mee gedaan maar exact hetzelfde probleem..]]></content:encoded>
			<dc:creator>pim</dc:creator>
			<guid isPermaLink="false">https://gathering.tweakers.net/forum/list_message/24519736#24519736</guid>
			<pubDate>Wed, 02 Nov 2005 11:20:46 GMT</pubDate>
		</item>
		<item>
			<title>Bosmonster</title>
			<link>https://gathering.tweakers.net/forum/list_message/24519679#24519679</link>
			<description>ik weet zo even geen antwoord op je vraag, maar wat ik me wel afvraag is waarom je

PHP:1
implode (&#039;&#039;, file (...))

gebruikt... neem dan file_get_contents(). Die doet exact hetzelfde maar geeft het gewoon als 1 string terug.

(tenzij je een antieke PHP versie (&lt;4.3) gebruikt)</description>
			<content:encoded><![CDATA[ik weet zo even geen antwoord op je vraag, maar wat ik me wel afvraag is waarom je<br>
<br>
<div class="code">PHP:<br><table class="phphighlight"><tr><td class="phphighlightline"><pre>1
</pre></td><td class="phphighlightcode"><div><pre><span class="code_nb">implode</span> <span class="code_p">(</span><span class="code_s1">&#39;&#39;</span><span class="code_p">,</span> <span class="code_nb">file</span> <span class="code_p">(</span><span class="code_o">...</span><span class="code_p">))</span></pre></div></td></tr></table></div><br>
<br>
gebruikt... neem dan file_get_contents(). Die doet exact hetzelfde maar geeft het gewoon als 1 string terug.<br>
<br>
(tenzij je een antieke PHP versie (&lt;4.3) gebruikt)]]></content:encoded>
			<dc:creator>Bosmonster</dc:creator>
			<guid isPermaLink="false">https://gathering.tweakers.net/forum/list_message/24519679#24519679</guid>
			<pubDate>Wed, 02 Nov 2005 11:13:26 GMT</pubDate>
		</item>
		<item>
			<title>pim</title>
			<link>https://gathering.tweakers.net/forum/list_message/24519634#24519634</link>
			<description>Als ik met deze tekens in het Chinees zoek in Google:
最佳手机

Zet google de tekens zelf om, d.m.v. de javascript functie: encodeURIComponent()
naar:
%E6%9C%80%E4%BD%B3%E6%89%8B%E6%9C%BA

Wat deze url geeft:
http://www.google.com/sea...9%8B%E6%9C%BA&amp;btnG=Search

Als ik deze url via mijn browser opvraag, krijg ik netjes de resultaten:




Wanneer ik deze echter zo via php opvraag:

PHP:1
2
3
&lt;?
echo implode(&#039;&#039;,file(&quot;http://www.google.com/search?hl=en&amp;lr=&amp;q=%E6%9C%80%E4%BD%B3%E6%89%8B%E6%9C%BA&amp;btnG=Search&quot;));
?&gt;

krijg ik dit terug:
 

Vreemd want eigenlijk stuur ik helemaal geen rare tekens..

Heeft iemand enig idee waarom ik via php een andere pagina terug krijg als via mijn browser?</description>
			<content:encoded><![CDATA[Als ik met deze tekens in het Chinees zoek in Google:<br>
&#26368;&#20339;&#25163;&#26426;<br>
<br>
Zet google de tekens zelf om, d.m.v. de javascript functie: encodeURIComponent()<br>
naar:<br>
%E6%9C%80%E4%BD%B3%E6%89%8B%E6%9C%BA<br>
<br>
Wat deze url geeft:<br>
<a href="http://www.google.com/search?hl=en&amp;lr=&amp;q=%E6%9C%80%E4%BD%B3%E6%89%8B%E6%9C%BA&amp;btnG=Search" rel="external nofollow" title="http://www.google.com/search?hl=en&amp;lr=&amp;q=%E6%9C%80%E4%BD%B3%E6%89%8B%E6%9C%BA&amp;btnG=Search">http://www.google.com/sea...9%8B%E6%9C%BA&amp;btnG=Search</a><br>
<br>
Als ik deze url via mijn browser opvraag, krijg ik netjes de resultaten:<br>
<br>
<img src="https://tweakers.net/camo/ac7c4b7d4babc52884d8871bd3a43c857a0937de/?url=http%3A%2F%2Fwww.skateboarden-denbosch.nl%2Fpics%2F05-11-02_google-1.gif" class="rml" alt="Afbeeldingslocatie: http://www.skateboarden-denbosch.nl/pics/05-11-02_google-1.gif"><br>
<br>
<br>
Wanneer ik deze echter zo via php opvraag:<br>
<br>
<div class="code">PHP:<br><table class="phphighlight"><tr><td class="phphighlightline"><pre>1
2
3
</pre></td><td class="phphighlightcode"><div><pre><span class="code_cp">&lt;?</span>
<span class="code_k">echo</span> <span class="code_nb">implode</span><span class="code_p">(</span><span class="code_s1">&#39;&#39;</span><span class="code_p">,</span><span class="code_nb">file</span><span class="code_p">(</span><span class="code_s2">&quot;http://www.google.com/search?hl=en&amp;lr=&amp;q=%E6%9C%80%E4%BD%B3%E6%89%8B%E6%9C%BA&amp;btnG=Search&quot;</span><span class="code_p">));</span>
<span class="code_cp">?&gt;</span></pre></div></td></tr></table></div><br>
<br>
krijg ik dit terug:<br>
<img src="https://tweakers.net/camo/ba09b2140a4a980db1db5a9ef0e0db35d1c3a7a9/?url=http%3A%2F%2Fwww.skateboarden-denbosch.nl%2Fpics%2F05-11-02_google-2.gif" class="rml" alt="Afbeeldingslocatie: http://www.skateboarden-denbosch.nl/pics/05-11-02_google-2.gif"> <br>
<br>
Vreemd want eigenlijk stuur ik helemaal geen rare tekens..<br>
<br>
Heeft iemand enig idee waarom ik via php een andere pagina terug krijg als via mijn browser?]]></content:encoded>
			<dc:creator>pim</dc:creator>
			<guid isPermaLink="false">https://gathering.tweakers.net/forum/list_message/24519634#24519634</guid>
			<pubDate>Wed, 02 Nov 2005 11:07:52 GMT</pubDate>
		</item>
	</channel>
</rss>