AW: [PHP] Re: get facebook rss feeds
| From: | Tobias Fichtner | Date: | Fri, 03 Oct 2014 22:01:06 +0000 |
| Subject: | AW: [PHP] Re: get facebook rss feeds | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-323920@lists.php.net to get a copy of this message | ||
At the Moment i try with the follow code:
<?php
$header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,";
$header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
$header[] = "Cache-Control: max-age=0";
$header[] = "Connection: keep-alive";
$header[] = "Keep-Alive: 300";
$header[] = "Accept-Charset: utf-8,ISO-8859-1;q=0.7,*;q=0.7";
$header[] = "Accept-Language: de-DE,de;q=0.5";
$header[] = "Pragma: "; // browsers keep this blank.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
"https://www.facebook.com/feeds/page.php?id=227911617222802&format=rss20");
curl_setopt($ch, CURLOPT_USERAGENT, 'Microsoft Office/14.0 (Windows NT
5.1; Microsoft Outlook 14.0.4536; Pro; MSOffice 14)');
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_REFERER, '');
curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate');
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 300);
$xml = curl_exec($ch);
curl_close($ch);
fputs($fp = fopen("facebook.xml", "w" ), $xml );
fclose($fp);
?>
I get a blank result / nothing.
Mit freundlichen Grüßen /
King regards,
Tobias Fichtner
[m] +491785347944 - [t] +493420570416 - [f] +493420570407 - [w]
http://tobiasfichtner.com/ - [e] info@tobiasfichtner.com
[gpg] 0x8498F4B2
[fp] 2978 57FB 155B 30BE 7316 AA7D D79C 4A0A 8498 F4B2
Diese E-Mail enthält evtl. vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser E-Mail ist nicht gestattet.
This E-Mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this E-Mail in error)
please notify the sender immediately and destroy the E-Mail. Any
unauthorised copying, disclosure or distribution of this E-Mail is strictly
forbidden.
-----Ursprüngliche Nachricht-----
Von: ellis@spinics.net [mailto:ellis@spinics.net]
Gesendet: Freitag, 3. Oktober 2014 23:52
An: php-general@lists.php.net
Betreff: [PHP] Re: get facebook rss feeds
> have anyone a running script to grad a facebook-rss feed over php?
Are they somehow different than other rss feeds? It should be just a fetch
(i.e. GET) of a URL.
> In the internet i found some not working solutions with and without
> curl.
It's best to use curl. But anyway you can do the fetch should be fine.
--
http://yosemitenews.info/
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
Attachment: [application/pkcs7-signature] smime.p7s
Attachment: [application/pkcs7-signature] smime.p7s