Spacefem (spacefem) wrote,
Spacefem
spacefem

php file encoding and underscores?

So I'm trying to write some livejournal stuff and having a heck of a time. Maybe someone has an idea for this one.

I need to fetch some xml files, which livejournal makes readily available, yay.

I've tried two different ways to open these files...

first curl:
curl_init($url);

then xml parsing with DOM:
$xmlDoc = new DOMDocument();
$xmlDoc->load($url);

in both cases, some of the files I want give me a "failed to open" sort of error. The ones that do not work have one thing in common: underscores. But some of the files that work have underscores too. So I give up.

Examples of files that work, every time... I can open these just fine:
http://adefinitemaybe.livejournal.com/data/foaf.rdf
http://spacefem.livejournal.com/data/foaf.rdf
http://u_b_c.livejournal.com/data/foaf.rdf

Examples of files that totally do NOT work ever... I get a "not found" error in my script even though I can open them in a browser!
http://_frangible_.livejournal.com/data/foaf.rdf
http://i_love_freddie.livejournal.com/data/foaf.rdf
http://katie____.livejournal.com/data/foaf.rdf

not sure if I have any coders reading here anymore but if I do... help? (and if you don't want to comment, then spacefem@spacefem.com)
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 11 comments