-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparser.php
executable file
·50 lines (39 loc) · 1.57 KB
/
parser.php
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
#Include Libraries
include("/root/library/LIB_parse.php");
include("/root/library/LIB_http.php");
#Variables
$title_array = array();
$link_array = array();
$pub_date_array = array();
$SlickDealsURL = "http://www.slickdeals.net/";
#Download the page
$web_page = http_get($target="http://feeds.feedburner.com/SlickdealsnetFP", $referrer="");
#Parse the Title Tags
$title_excl = parse_array($web_page['FILE'], "<title>", "</title>");
$link_excl = parse_array($web_page['FILE'], "<link>", "</link>");
$pub_date_excl = parse_array($web_page['FILE'], "<pubDate>", "</pubDate>");
for($x=0; $x < count($title_excl); $x++)
{
#Array Titles
$title_array = $title_excl[$x];
#Remove Title Tags
$remove = strip_tags($title_array);
$removeSpace = str_replace("&", "", $remove);
$removeAnd = str_replace(";amp;", "", $removeSpace);
$removeMore = str_replace("More", "", $removeAnd);
$removeMuchMore = str_replace("Much more", "", $removeMore);
#Remove Slick Deals URL
$removeSlick = str_replace("SlickDeals.net", "", $removeMuchMore);
$removeSlickURL = str_replace($SlickDealsURL, "", $removeSlick);
#Array Links
$link_array = $link_excl[$x];
$removeLinkTags = strip_tags($link_array);
#Array Publication Date
$pub_date_array = $pub_date_excl[$x-1];
$removePubDateTags = strip_tags($pub_date_array);
#Print Publication Date
#Print URL and Links
echo $removeSlickURL."\n".$removeLinkTags."\n".$removePubDateTags."\n"."\n";;
}
?>