Discussion:
get facebook rss feeds
Tobias Fichtner
2014-10-03 21:48:21 UTC
Permalink
Hello,

have anyone a running script to grad a facebook-rss feed over php?

In the internet i found some not working solutions with and without curl.

Mit freundlichen Grüßen /
King regards,
Tobias Fichtner


[m] +491785347944 - [t] +493420570416 - [f] +493420570407 - [w]
http://tobiasfichtner.com/ - [e] ***@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.
e***@spinics.net
2014-10-03 21:52:23 UTC
Permalink
Post by Tobias Fichtner
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.
Post by Tobias Fichtner
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
Tobias Fichtner
2014-10-03 22:01:06 UTC
Permalink
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] ***@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: ***@spinics.net [mailto:***@spinics.net]
Gesendet: Freitag, 3. Oktober 2014 23:52
An: php-***@lists.php.net
Betreff: [PHP] Re: get facebook rss feeds
Post by Tobias Fichtner
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.
Post by Tobias Fichtner
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
Rick
2014-10-03 22:07:50 UTC
Permalink
"https://www.facebook.com/feeds/page.php?id=3D227911617222802&format=3Drs=
s20");
Fix the syntax error in that line.

--
http://www.spinics.net/lists/arm-kernel/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Tobias Fichtner
2014-10-03 22:10:39 UTC
Permalink
I got it...


* Hostname was found in DNS cache
* Hostname in DNS cache was stale, zapped
* Trying 173.252.74.22...
* Connected to www.facebook.com (173.252.74.22) port 443 (#34)
* SSL certificate problem: unable to get local issuer certificate
* Closing connection 34


Thanks anyway


Mit freundlichen Grüßen /
King regards,
Tobias Fichtner


[m] +491785347944 - [t] +493420570416 - [f] +493420570407 - [w]
http://tobiasfichtner.com/ - [e] ***@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: Tobias Fichtner [mailto:***@tobiasfichtner.com]
Gesendet: Samstag, 4. Oktober 2014 00:01
An: php-***@lists.php.net
Betreff: AW: [PHP] Re: get facebook rss feeds

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] ***@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: ***@spinics.net [mailto:***@spinics.net]
Gesendet: Freitag, 3. Oktober 2014 23:52
An: php-***@lists.php.net
Betreff: [PHP] Re: get facebook rss feeds
Post by Tobias Fichtner
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.
Post by Tobias Fichtner
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

Loading...