Curl- encoding problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
goamind
Forum Newbie
Posts: 2
Joined: Mon Jul 03, 2006 2:46 pm

Curl- encoding problem

Post by goamind »

Hi!
I ask to be forgive if a similar problem was already posted, but I looked arround and didn't find it.
I am using CURL to fetch pages from the links you find below.
My problem is: there are characters that when I fetch get all screwed up and in my fetched string I lose the and thats very bad!

Here is how I've built the curl session.

$adresa="http://www.pagini-nationale.ro/dets.asp ... 0668145234";

$ch = curl_init($adresa);

curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_ENCODING, "");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);

$data=curl_exec ($ch);
curl_close ($ch);

so in $data, I have the page without those non standard characters which I need.
Please advise me what am I doing wrong and what I need to do to fetch them too.
Thanks a lot, I wish you the best!
Post Reply