Autor | Zpráva | ||
---|---|---|---|
RadimSkacel Profil * |
#1 · Zasláno: 22. 1. 2013, 23:34:09 · Upravil/a: RadimSkacel
Chtěl bych načítat RSS z facebook. Samotná URL funguje, ale pokud URL vložím do CURL, tak ten nic nevyplivne. Uvažoval jsem, že tam chybí user-agent, ale nemohu na internetu najít správné nastavení :(
<? $url_rss = 'https://www.facebook.com/feeds/page.php?format=rss20&id=209145458183'; $ch = curl_init(); $timeout = 5; // set to zero for no timeout curl_setopt($ch, CURLOPT_URL, $url_rss); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $xml_curl = curl_exec($ch); curl_close($ch); $xml = simplexml_load_string($xml_curl); echo $xml_curl; Na konec jsem našel hotovy script: https://gist.github.com/3864515 |
||
Časová prodleva: 11 let
|
0