-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrssfeed.php
More file actions
27 lines (27 loc) · 761 Bytes
/
rssfeed.php
File metadata and controls
27 lines (27 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/*
* rssFeed - Your rss feed on your website
*
* http://noprobweb.com/rss_feed_flux_jquery.php
*
* Version : 1.6
*
* Copyright (c) 2014 NoProbWeb (http://www.noprobweb.com)
*
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
*
* Built on top of the jQuery library
* http://jquery.com
*
*/
$url = $_POST['feed'];
$ch = curl_init();
$timeout = 10;
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13');
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
echo $file_contents;
curl_close($ch);
?>