You are here:  » Magicparser not working with this rss

Support Forum



Magicparser not working with this rss

Submitted by fraizor on Sun, 2016-08-14 11:48 in

Hi
i noticed that MgicParser is not working with
{link saved}
NOT EVEN WITH THE DEMO PAGE

after doing some research i found out that this site require cookies (But why!!)
so the problem is not with magic parser itself but in accessing the feed

any ideas or a workaround ?

Submitted by support on Mon, 2016-08-15 11:11

Hello frazior,

You can make a request using CURL with cookies submitted; for example, and then pass the response to MagicParser_parse() using the string:// method, for example:

  $url = "http://www.example.com/feed.rss";
  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_HEADER, 0);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_COOKIE, "cookie1=value1; cookie2=value2");
  $xml = curl_exec($ch);
  curl_close($ch);
  MagicParser_parse("string://".$xml,"myRecordHandler","xml|RSS/CHANNEL/ITEM/");

Hope this helps!
Cheers,
David
--
MagicParser.com

Submitted by fraizor on Fri, 2016-08-19 11:49

hi, the url is
{link saved}

how can i use cookies for this link ?

Submitted by support on Fri, 2016-08-19 12:58

Hello fraizor,

Please could you email me the URL and I'll follow up by email with you...

Thanks,
David