-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
91 lines (79 loc) · 2.62 KB
/
index.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
/**
* @author Nguyen Duc Hanh
* @copyright 2014
* @copygith nguyenduchanh.com
*/
session_start();
error_reporting(0);
if($_POST){
$url = $_POST['url'];
if($url==''){
$err_mgs[] = '+ Enter valid url';
}else{
if(strpos($url,'http')===false){
$url = 'http://'.$url;
}
$_SESSION['url'] = $url;
}
$parse_url = parse_url($url);
$folder = $parse_url['host'];
if($folder==''){
$err_mgs[] = '+ Folder is not valid';
}else{
$_SESSION['folder'] = $folder;
}
$save_file = $_POST['save_file'];
if($save_file==''){
$err_mgs[] = '+ Enter valid file to save';
}else{
$_SESSION['save_file'] = $save_file;
}
if($url && $folder && $save_file){
header("location: process.php");
}
}else{
session_destroy();
}
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Css spider</title>
<meta name="description" content="Save complete website" />
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8"/>
<meta http-equiv="Cache-Control" content="no-cache/"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="-1"/>
<meta name="robots" content="noindex, nofollow" />
</head>
<style>
.forgotpass{
text-decoration: none !important;
}
.forgotpass:hover{
text-decoration: underline !important;
}
</style>
<body>
<br /><br />
<center>
<form name="frm" id="frm" action="" method="post">
<table width="500" style="border-collapse:collapse;font-size:11px;font-family:tahoma;border-color:#CCC;border: 1px #CCC solid;background-color:#FFF;padding-bottom:10px;" border="1">
<caption style="font-size: 11px; font-family:tahoma;color:#FF0000; margin-bottom: 5px; text-align: left;">
<?php
if(isset($err_mgs)){
foreach($err_mgs as $msg){
echo $msg.'<br/>';
}
}
?>
</caption>
<tr><td colspan="2" style="font-weight: bold; color:#FFF; background-color:#1788C8;padding:3px;text-align: center;" >CSS Spider</td></tr>
<tr><td> URL(Example: google.com):</td><td><input type="text" name="url" style="width: 100%;" class="{required:true,messages:{required:'Enter url!'}}" /><span class="error"></span></td></tr>
<tr><td> File name to save</td><td><input type="text" name="save_file" value="index.html" style="width: 100%;" class="{required:true,messages:{required:'Nhập mật khẩu!'}}"/><span class="error"></span></td></tr>
<tr><td> </td><td style="padding:3px;"><input type="submit" name="btnSubmit" value="Process" /></td></tr>
</table>
</form>
</center>
</body>
</html>