Finally! The answer was this :
$url = utf8_encode('http://www.norid.no/domenenavnbaser/ace/?action=Convert&name=bl åbær.no'); And it all finally works, :) -- Kim Steinhaug --------------------------------------------------------------- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. --------------------------------------------------------------- "Stig Venaas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Tue, Dec 16, 2003 at 07:30:09PM +0100, Kim Steinhaug wrote: > > To solve this problem you need a norwegian keyboard so I > > Nah, you can just cut and paste (: > > > might aswell type the whole question in norwegian, sorry gyez! > > > > --------------------------------------------------------------- > > > > Jeg har støtt på noen problemer når det gjelder å konvertere > > domenenavn mot Norids egen ACE konverter. Jeg har prøvd > > med både POST metoder og GET metoder men resultatet blir > > uansett det samme. > > > > Jeg sender en henvendelse til Norids side, og ønsker å parse > > resultatet, problemet er bare at Norids side nekter å godta selve > > bokstavene æøå av en eller annen grunn. En metode er eks. > > > > <? > > $page > > ='http://www.norid.no/domenenavnbaser/ace/?action=Convert&name=blåbær.no'; > > $fd=fopen($page,"r"); > > while ($line=fgets($fd,1000)) { > > echo $line; } fclose ($fd); > > ?> > > > > Som du ser på det som kommer ut godtaes ikke ÆØÅ. > > > > Jeg har prøvd å sende "blåbær" som "bl%E5b%E6r.no" men samme problem. > > Jeg tenkte kanskje det er en begrensning med GET eller at de har lagt inn en > > sperre på GET for å bare bruke POST, men den gang ei. POST med sockets > > gir samme resultat, uanhengig om man benytter "å" eller "%E5". > > Blir POST data kodet annerledes en GET data, altså "å"=>"%E5"? > > In the document with the form, it says: > > <form method="post" action="/domenenavnbaser/ace/" > enctype="application/x-www-form-urlencoded"> > > so I guess it will work if you use this encoding. But the document is > also in UTF-8, so you may have to do UTF-8 encoding first and then URL > encode that perhaps. > > It works with e.g. mozilla, I guess you could also try to see what > exactly it sends. > > Someone non-Norwegian might have suggestions regardig UTF-8 documents > and URL-encoding. I think browser sends post data with same charset > as the main document... > > Stig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php