-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
129 lines (57 loc) · 2.77 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>URL Compressor</title>
<link rel="stylesheet" href="./index_files/bootstrap.min.css">
<link rel="stylesheet" href="./index_files/font-awesome.min.css">
<link rel="stylesheet" href="./index_files/animate.min.css">
<link rel="stylesheet" href="./index_files/owl.carousel.min.css">
<link rel="stylesheet" href="./index_files/owl.theme.default.css">
<link rel="stylesheet" href="./index_files/front.css">
</head>
<body id="page-top" class="index ">
<nav id="mainNav" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header page-scroll">
<p class="navbar-brand"> Welcome to URL Compressor</p>
</div>
</div>
</nav>
<header class="shorten">
<div class="intro-text">
<div class="intro-heading wow zoomIn" data-wow-delay=".3s" style="visibility: visible; animation-delay: 0.3s; animation-name: zoomIn;">URL Compressor</div>
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<form method="post" accept-charset="utf-8" id="shorten" class="form-inline" action="index.php">
<div class="form-group">
<input type="text" name="input" placeholder="Your URL Here (http://www.example.com)" required="" class="form-control input-lg" id="url">
<button class="btn-captcha" id="invisibleCaptchaShort" type="submit" name="submit"><img src="./index_files/Right-Arrow.png" alt=""></button>
</div>
</form>
<?php
$rowSQL = mysqli_query( $con, "SELECT MAX( id ) AS max FROM main;" );
$row = mysqli_fetch_array( $rowSQL );
$largestNumber = $row['max'];
mkdir($per.($largestNumber+1));
$direc=$per.($largestNumber+1)."/index.html";
$myfile= fopen($direc,'w') or die ("Unable to contact server");
$url=$get_value;
$url2="<script>window.location.href='$url'</script>";
fwrite($myfile, $url2);
fclose($myfile);
echo "<code id=\"mycode\"> /localhost/url/$ttt </code>";
}
?>
</div>
</div>
<div class="slogan">
<b>Note: Do not forget to add ' http:// ' at the beginning.</b><br>
URL Compressor is a service that takes long URLs and squeezes them into fewer characters to make a link that is easier to share tweet email to friends.</div>
</div>
</div>
</header>
<footer>
<div class="container">
<div class="copyright text-center">
Designed and Developed by Subhajit Mondal </div>
</div>
</style>