-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patht_menube.php
51 lines (36 loc) · 1.15 KB
/
t_menube.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
50
51
<?php
set_time_limit(0);
header('Content-type: text/html; charset=UTF-8');
include_once "../include.inc.php";
include_once "simple_html_dom.php";
include_once("utilsx.inc.php");
require 'classes/menube_scrap.class.php';
main();
function main()
{
$def_url = getParamOrDefault('url',
'http://blog.minube.com/las-10-estaciones-de-tren-mas-espectaculares/',
$_GET);
if ( isset($_GET['url']) )
{
$MYSQL_CREDENTIALS = parse_ini_file("config.ini");
$ms = new MenubeScrapper($MYSQL_CREDENTIALS);
// what does the header mean?
$aHeader = $ms->getArticleHeader($def_url);
$aHeader->stdout();
$ms->saveToFile("D:/tmp/dom/1.htm");
//$ms->output();
}
output_form($def_url);
}
function output_form($params)
{
echo "<form name=myform method=GET >
<input type=text name=url value='$params' size=200>
<input type=submit name=submit value=GetMenubeArticle>";
echo "
<input type=button value='Clear' onclick='document.myform.url.value=\"\";'>
</form>
";
}
?>