opml file and curl?

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
kc11
Forum Commoner
Posts: 73
Joined: Mon Sep 27, 2010 3:26 pm

opml file and curl?

Post by kc11 »

Hi everyone,

I am trying to parse an opml file automatically. I generate this file by entering a string like the following into a browser: "http://www.searchtempest.com/makeopml.p ... sfeedname="


This makes the opml file and on my screen , I get a dialog box asking me to open or save a .opml file. Manually, I can save this, but how can I bypass this dialog box using curl, or alternatively, is there another way to receive and parse this file.

Thank you,

kc
kc11
Forum Commoner
Posts: 73
Joined: Mon Sep 27, 2010 3:26 pm

Re: opml file and curl?

Post by kc11 »

Actually, a basic CURL procedure worked.

Code: Select all


$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 $data = curl_exec($ch);
 curl_close($ch);

for some reason file_get_contents did not.

Thanks,

KC
Post Reply