Unverified Commit 3d427df3 authored by matusrebros's avatar matusrebros
Browse files

v1

parent 35d8ecdb
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /
table,th,td{border:1px solid black}td{padding:8px}button.copy{background:none;border:none;cursor:pointer}.deeplink-wrapper{background:lightblue}.deeplink-wrapper:hover{background:#86c5da}
for (const elem of document.querySelectorAll(".copy")) {
elem.addEventListener("click", e => {
const ta = document.createElement("textarea");
ta.innerText = e.target.innerText;
document.body.appendChild(ta);
ta.select();
document.execCommand("copy");
document.body.removeChild(ta);
alert('Skopirované')
});
}
table,
th,
td {
border: 1px solid black;
}
td {
padding: 8px;
}
button.copy {
background: none;
border: none;
cursor: pointer;
}
.deeplink-wrapper {
background: lightblue;
&:hover {
background: darken(lightblue, 10);
}
}
<?php
if (isset($_GET['IgUsername']) and !empty($_GET['IgUsername'])) {
$RootDomain = 'https://deep.dpmarketing.sk/';
$IgUsername = $_GET['IgUsername'];
$hash = substr(md5($IgUsername), 0, 8);
$link = mysqli_connect("mysql80.r1.websupport.sk:3314", "yk4i43mm", "Oo5ajK83p=", "yk4i43mm");
if ($link === false) {
die("ERROR: Could not connect. " . mysqli_connect_error());
}
$ig_username = mysqli_real_escape_string($link, $_REQUEST['IgUsername']);
$db_hash = mysqli_real_escape_string($link, $hash);
$sql = "INSERT INTO `urls` (`ig_username`, `hash`)
SELECT '$ig_username', '$db_hash' FROM DUAL
WHERE NOT EXISTS (SELECT * FROM `urls`
WHERE `ig_username`='$ig_username' AND `hash`='$db_hash' LIMIT 1)";
if (mysqli_query($link, $sql)) {
if ( mysqli_affected_rows($link) > 0 ) {
echo "Pridané" . "<br>";
echo "Deeplink URL: <a href=". $RootDomain . $hash .">". $RootDomain . $hash . "</a>";
} else {
echo "IG je už v DB";
}
} else {
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
mysqli_close($link);
} else {
echo 'Daj tam IG username koko';
}
......@@ -10,7 +10,7 @@
<body>
<form method="POST" action="deep.php">
<form method="GET" action="../deep.php">
<input type="text" name="IgUsername" placeholder="IG username" />
<input type="submit" value="Deep It" />
</form>
......
<?php
$actual_hash = ltrim($_SERVER['REQUEST_URI'], '/');
$conn = new mysqli("mysql80.r1.websupport.sk:3314", "yk4i43mm", "Oo5ajK83p=", "yk4i43mm");
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT ig_username FROM urls WHERE hash = '$actual_hash'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$MobileLink = "instagram://user?username=" . $row["ig_username"];
$DesktopLink = "https://www.instagram.com/" . $row["ig_username"];
function isMobile()
{
return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
}
if (isMobile()) {
header('Location: ' . $MobileLink);
} else {
header('Location: ' . $DesktopLink);
}
}
} else {
echo "Zlá URL";
}
$conn->close();
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>List of backlinks</title>
<link rel="stylesheet" href="../assets/css/main.min.css">
</head>
<body>
<?php
$RootDomain = 'https://deep.dpmarketing.sk/';
$conn = new mysqli("mysql80.r1.websupport.sk:3314", "yk4i43mm", "Oo5ajK83p=", "yk4i43mm");
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT id, ig_username, hash, created_at FROM urls";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
?>
<table>
<tbody>
<tr class="strong">
<td>ID</td>
<td>Username</td>
<td>Depp Link</td>
<td>Created At</td>
</tr>
<?php
// output data of each row
while ($row = $result->fetch_assoc()) {
echo "
<tr>
<td>" . $row["id"] . "</td>
<td>" . $row["ig_username"] . "</td>
<td class=\"deeplink-wrapper\"><button class=\"copy\">". $RootDomain . $row["hash"] ."</button></td>
<td>" . $row["created_at"] . "</td>
</tr>";
}
} else {
echo "0 results";
}
$conn->close();
?>
</tbody>
</table>
<script src="../assets/js/main.js"></script>
</body>
</html>
<?php
define('MYSQL_HOST', 'localhost');
define('MYSQL_USER', '0p42ld3z');
define('MYSQL_PASSWORD', 'Zc04N5iwZ{');
define('MYSQL_DATABASE', '0p42ld3z');
define('SITE_URL', 'http://deep.dpmarketing.sk/'); //your website url i.e https://zatackcoder.com
?>
<?php
if (isset($_POST['IgUsername']) and !empty($_POST['IgUsername'])) {
$IgUsername = $_POST['IgUsername'];
$MobileLink = "instagram://user?username=" . $IgUsername;
$DesktopLink = "https://www.instagram.com/" . $IgUsername;
function isMobile()
{
return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
}
if (isMobile()) {
header('Location: ' . $MobileLink);
} else {
header('Location: ' . $DesktopLink);
}
} else {
echo 'enter IG username koko';
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment