clean
This commit is contained in:
52
.hta_slug/.htac_404.php
Normal file
52
.hta_slug/.htac_404.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
require_once('.hta_config/db_config.php');
|
||||
require_once('.htac_header.php');
|
||||
?>
|
||||
|
||||
<section class="diZContainer diZmxAuto diZmb20">
|
||||
<h1 class="diZBorderBottom">SiliconPin - Tools</h1>
|
||||
<div class="diZFlexRow diZmy8 diZFlexRow">
|
||||
<a href="/tools" class="diZButtonDefault diZmr2"><span>All</span></a>
|
||||
<a href="/tools/image" class="diZButtonDefault diZmr2"><span>Image</span></a>
|
||||
<a href="/tools/text" class="diZButtonDefault diZmr2"><span>Text</span></a>
|
||||
<a href="/tools/html" class="diZButtonDefault diZmr2"><span>HTML</span></a>
|
||||
<a href="/tools/color" class="diZButtonDefault diZmr2"><span>Color</span></a>
|
||||
<a href="/tools/info" class="diZButtonDefault diZmr2"><span>Info</span></a>
|
||||
<a href="/tools/encrypt-decrypt" class="diZButtonDefault diZmr2"><span>Encrypt / Decrypt</span></a>
|
||||
</div>
|
||||
<div class="diZGridCols1-3">
|
||||
<?php
|
||||
$requestUri = $_SERVER['REQUEST_URI'];
|
||||
$requestUri = explode('/', $requestUri)[2];
|
||||
$requestUri = ($requestUri <= 1) ? "%%" : $requestUri;
|
||||
if(isset($requestUri) && strlen($requestUri > 1)){
|
||||
try {
|
||||
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$stmt = $conn->prepare("SELECT * FROM api_tools WHERE `type` = :type");
|
||||
$stmt->bindParam(':type', $requestUri);
|
||||
$stmt->execute();
|
||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
// var_dump($rows);
|
||||
foreach($rows as $row){
|
||||
// echo $row['name'].'<br>';
|
||||
if($row['status']==1){
|
||||
$link_button = '<a class="diZButtonDefault" href="/tools/'.$row['slug'].'" ><span class="">'.$row['name'].'</span></a>';
|
||||
} else{
|
||||
$link_button = '<a class="diZButtonDefault"><span>'.$row['name'].'</span></a>';
|
||||
}
|
||||
echo '
|
||||
<div class="diZblogStyle diZPadding10px">
|
||||
<p class="diZLineClamp1">'.$row['description'].'</p>
|
||||
'.$link_button.'
|
||||
</div>';
|
||||
}
|
||||
} catch (PDOException $e) {
|
||||
$in_page_message = "<p class='text-danger'>Error: " . $e->getMessage() . "</p>";
|
||||
}
|
||||
}else{
|
||||
echo 'Page Not Found!';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
44
.hta_slug/_home.php
Normal file
44
.hta_slug/_home.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
require_once('.hta_config/db_config.php');
|
||||
require_once('.htac_header.php');
|
||||
?>
|
||||
|
||||
<section class="diZContainer diZmxAuto diZmb20">
|
||||
<h1 class="diZBorderBottom">SiliconPin - Tools</h1>
|
||||
<div class="diZFlexRow diZmy8 diZFlexRow diZOverflowAuto diZWhiteSpaceNowrap">
|
||||
<a href="/tools" class="diZButtonDefault diZmr2"><span>All</span></a>
|
||||
<a href="/tools/image" class="diZButtonDefault diZmr2"><span>Image</span></a>
|
||||
<a href="/tools/text" class="diZButtonDefault diZmr2"><span>Text</span></a><br>
|
||||
<a href="/tools/html" class="diZButtonDefault diZmr2"><span>HTML</span></a>
|
||||
<a href="/tools/color" class="diZButtonDefault diZmr2"><span>Color</span></a>
|
||||
<a href="/tools/info" class="diZButtonDefault diZmr2"><span>Info</span></a>
|
||||
<a href="/tools/encrypt-decrypt" class="diZButtonDefault diZmr2"><span>Encrypt / Decrypt</span></a>
|
||||
</div>
|
||||
<div class="diZGridCols1-3">
|
||||
<?php
|
||||
try {
|
||||
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$stmt = $conn->prepare("SELECT * FROM api_tools");
|
||||
$stmt->execute();
|
||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
// var_dump($rows);
|
||||
foreach($rows as $row){
|
||||
// echo $row['name'].'<br>';
|
||||
if($row['status']==1){
|
||||
$link_button = '<a class="diZButtonDefault" href="/tools/'.$row['slug'].'" ><span class="">'.$row['name'].'</span></a>';
|
||||
} else{
|
||||
$link_button = '<a class="diZButtonDefault"><span>'.$row['name'].'</span></a>';
|
||||
}
|
||||
echo '
|
||||
<div class="diZblogStyle diZPadding10px">
|
||||
<p class="diZLineClamp2 diZTextJustify diZToolsContentHeight" >'.$row['description'].'</p>
|
||||
'.$link_button.'
|
||||
</div>';
|
||||
}
|
||||
} catch (PDOException $e) {
|
||||
$in_page_message = "<p class='text-danger'>Error: " . $e->getMessage() . "</p>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
57
.hta_slug/add-tool.php
Normal file
57
.hta_slug/add-tool.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
require_once('.hta_config/siliconpin_sp.php');
|
||||
|
||||
if($_SERVER['REQUEST_METHOD']=='POST' && strlen($_POST['name']>3)){
|
||||
$slugText = $_POST['name'];
|
||||
$slugText = preg_replace('~[^\p{L}\p{N}_-]+~u', '-', $slugText);
|
||||
$slugText = strtolower($slugText);
|
||||
$slugText = preg_replace('~-+~', '-', $slugText);
|
||||
$slugText = trim($slugText, '-');
|
||||
|
||||
$time=time();
|
||||
$sid=rand(100,360).$time.rand(100,999);// $id='360000'.$time; //360000 concatineted with 1704215388 produces 10 width base_convert with 36
|
||||
$siliconid = base_convert($sid,10,36);
|
||||
|
||||
try {
|
||||
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
$stmt = $conn->prepare("INSERT INTO api_tools (siliconid, name, title, description, slug, status) VALUES (:siliconid, :name, :title, :description, :slug, 0)");
|
||||
$stmt->bindParam(':siliconid', $siliconid);
|
||||
$stmt->bindParam(':name', $_POST['name']);
|
||||
$stmt->bindParam(':title', $_POST['title']);
|
||||
$stmt->bindParam(':description', $_POST['description']);
|
||||
$stmt->bindParam(':slug', $slugText);
|
||||
$stmt->execute();
|
||||
// echo '<script>window.location.href="/cart/code-base"</script>';
|
||||
// $in_page_message = "<p class='text-green' style='text-align: center;' >Thank you! Your Query has been submitted.</p>";
|
||||
} catch (PDOException $e) {
|
||||
$in_page_message= "<p class='text-danger'>Error: " . $e->getMessage() . "</p>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="container-zz mx-auto my-20">
|
||||
<p>Add New Tool</p>
|
||||
<form method="post" enctype="multipart/form-data" >
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
<label for="tools-name">Tools Name:</label>
|
||||
<input type="text" name="name" id="tools-name" style="" required/>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
<label for="title">Title:</label>
|
||||
<input type="text" name="title" id="title" style="" required/>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
<label for="description">Description:</label>
|
||||
<input type="text" name="description" id="description" style="" required/>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
<input type="submit" name="submit" id="submit" value="Save" style=""/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<style>
|
||||
.container-zz{width:100%}@media (min-width: 640px){.container-zz{max-width:640px}}@media (min-width: 768px){.container-zz{max-width:768px}}@media (min-width: 1024px){.container-zz{max-width:1024px}}@media (min-width: 1280px){.container-zz{max-width:1280px}}@media (min-width: 1536px){.container-zz{max-width:1536px}}
|
||||
.mx-auto{margin-left:auto;margin-right:auto}
|
||||
.my-20{margin-top:5rem;margin-bottom:5rem}
|
||||
</style>
|
||||
102
.hta_slug/bar-code.php
Normal file
102
.hta_slug/bar-code.php
Normal file
File diff suppressed because one or more lines are too long
52
.hta_slug/base64-to-image-converter.php
Normal file
52
.hta_slug/base64-to-image-converter.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<section class="diZContainer diZmxAuto">
|
||||
<h2 class="diZBorderBottom">Convert Base64 to Image</h2>
|
||||
<div class="diZMaxW500 diZmxAuto diZFlexColumn toolsSection diZmy20">
|
||||
<textarea rows="10" class="base64-textarea" placeholder="Enter base64 encoded image data"></textarea>
|
||||
<p class="diZDisplayNone diZDengerText" id="no-select-message"></p>
|
||||
<button class="convert-button diZmt2"><span>Convert to Image</span></button>
|
||||
<div class="" id="preview"></div>
|
||||
|
||||
<div class="diZFlexColumn diZDisplayNone diZJustifyCenter" id="download-options" >
|
||||
<p>Choose Image Format & Download:</p>
|
||||
<div class="diZFlexRow">
|
||||
<button class="format-button" data-format="png"><span>PNG</span></button>
|
||||
<button class="format-button" data-format="jpeg"><span>JPEG</span></button>
|
||||
<button class="format-button" data-format="webp"><span>WebP</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
document.querySelector('.convert-button').addEventListener('click', function() {
|
||||
var base64Data = document.querySelector('.base64-textarea').value.trim();
|
||||
if (base64Data !== '') {
|
||||
var img = document.createElement('img');
|
||||
img.src = base64Data;
|
||||
img.style.maxWidth = '100%';
|
||||
img.style.height = 'auto';
|
||||
document.getElementById('preview').innerHTML = '';
|
||||
document.getElementById('preview').appendChild(img);
|
||||
document.getElementById('download-options').style.display = 'block';
|
||||
} else {
|
||||
document.getElementById('no-select-message').innerHTML = 'Please enter base64 encoded image data.';
|
||||
document.getElementById('no-select-message').style.display = 'block';
|
||||
}
|
||||
});
|
||||
|
||||
// Add event listeners to format buttons
|
||||
var formatButtons = document.querySelectorAll('.format-button');
|
||||
formatButtons.forEach(function(button) {
|
||||
button.addEventListener('click', function() {
|
||||
var imageFormat = this.getAttribute('data-format');
|
||||
downloadImage(imageFormat);
|
||||
});
|
||||
});
|
||||
|
||||
function downloadImage(imageFormat) {
|
||||
var base64Data = document.querySelector('.base64-textarea').value.trim();
|
||||
var downloadLink = document.createElement('a');
|
||||
downloadLink.href = base64Data;
|
||||
downloadLink.download = 'image.' + imageFormat;
|
||||
downloadLink.click();
|
||||
}
|
||||
</script>
|
||||
113
.hta_slug/color-code-from-image.php
Normal file
113
.hta_slug/color-code-from-image.php
Normal file
@@ -0,0 +1,113 @@
|
||||
<section class="diZContainer diZmxAuto diZmy8">
|
||||
<h1 class="diZBorderBottom">Color Hex/RGB Code From Image</h1>
|
||||
<p>The Color Code Extractor from Image is a simple and efficient web-based tool that allows users to upload an image and click on any part of it to get the RGB and HEX color codes of the pixel they clicked on. This tool is particularly useful for designers, developers, and anyone who needs to identify and use specific colors from images.</p>
|
||||
<div class="diZMaxW600 diZmxAuto toolsSection">
|
||||
<label class="diZFlexColumn " for="imageInput">Choose Image</label><br>
|
||||
<input class="diZPadding10px" type="file" id="imageInput" accept="image/*" /><br><br>
|
||||
<canvas class="diZDisplayNone diZw100" id="canvas"></canvas><br>
|
||||
<div class="diZFlexBetween">
|
||||
<div id="result">Click on the image to get the color code.</div>
|
||||
<button class="diZDisplayNone" id="copyButton" ><span>Copy</span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Usage:</h2>
|
||||
<ul>
|
||||
<li><strong>Upload an Image:</strong> Click on the file input field and select an image file from your device.</li>
|
||||
<li><strong>Display the Image:</strong> Once the image is uploaded, it will be displayed on a hidden canvas element.</li>
|
||||
<li><strong>Extract Color Code:</strong> Click on any part of the displayed image. The tool will capture the color of the clicked pixel and display both the RGB and HEX color codes.</li>
|
||||
<li><strong>Copy Color Code:</strong> Click the "Copy Color Code" button to copy the displayed color code to your clipboard for easy use in your projects.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Features:</h2>
|
||||
<ul>
|
||||
<li><strong>Easy Image Upload:</strong> Supports uploading images directly from your device.</li>
|
||||
<li><strong>Accurate Color Extraction:</strong> Retrieves the exact RGB and HEX color codes from any pixel of the image.</li>
|
||||
<li><strong>Clipboard Copy Functionality:</strong> Allows you to easily copy the extracted color codes to your clipboard.</li>
|
||||
<li><strong>Fallback for Compatibility:</strong> Provides a fallback method for copying color codes on browsers that do not support the Clipboard API.</li>
|
||||
<li><strong>User-Friendly Interface:</strong> Simple and intuitive design for ease of use.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Use Case:</h2>
|
||||
<ul>
|
||||
<li><strong>Web Designers and Developers:</strong> Quickly extract color codes from images for use in web design and development projects.</li>
|
||||
<li><strong>Graphic Designers:</strong> Identify and use specific colors from images in design software.</li>
|
||||
<li><strong>Digital Artists:</strong> Match colors from reference images to create cohesive artworks.</li>
|
||||
<li><strong>Marketing Professionals:</strong> Ensure brand consistency by extracting and using exact colors from marketing materials and logos.</li>
|
||||
<li><strong>DIY Enthusiasts:</strong> Use color codes to match paint colors, fabrics, or other materials in home decoration projects.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const imageInput = document.getElementById('imageInput');
|
||||
const copyButton = document.getElementById('copyButton');
|
||||
|
||||
imageInput.addEventListener('change', function(event) {
|
||||
const file = event.target.files[0];
|
||||
if (file) {
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
const img = new Image();
|
||||
img.onload = function() {
|
||||
const canvas = document.getElementById('canvas');
|
||||
const ctx = canvas.getContext('2d');
|
||||
canvas.width = img.width;
|
||||
canvas.height = img.height;
|
||||
ctx.drawImage(img, 0, 0);
|
||||
canvas.style.display = 'block';
|
||||
|
||||
canvas.addEventListener('click', function(event) {
|
||||
const rect = canvas.getBoundingClientRect();
|
||||
const x = event.clientX - rect.left;
|
||||
const y = event.clientY - rect.top;
|
||||
console.log(`Clicked at (x, y): (${x}, ${y})`);
|
||||
|
||||
try {
|
||||
const imageData = ctx.getImageData(x, y, 1, 1).data;
|
||||
const rgb = `rgb(${imageData[0]}, ${imageData[1]}, ${imageData[2]})`;
|
||||
const hex = `#${((1 << 24) + (imageData[0] << 16) + (imageData[1] << 8) + imageData[2]).toString(16).slice(1).toUpperCase()}`;
|
||||
const colorCode = `RGB: ${rgb}, HEX: ${hex}`;
|
||||
console.log('Color code:', colorCode);
|
||||
document.getElementById('result').innerText = colorCode;
|
||||
copyButton.style.display = 'block';
|
||||
copyButton.setAttribute('data-color-code', colorCode);
|
||||
} catch (err) {
|
||||
console.error('Error getting image data:', err);
|
||||
}
|
||||
});
|
||||
};
|
||||
img.src = e.target.result;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
});
|
||||
|
||||
copyButton.addEventListener('click', function() {
|
||||
const colorCode = copyButton.getAttribute('data-color-code');
|
||||
if (navigator.clipboard && navigator.clipboard.writeText) {
|
||||
navigator.clipboard.writeText(colorCode).then(() => {
|
||||
console.log('Color code copied to clipboard');
|
||||
}).catch(err => {
|
||||
console.error('Could not copy text: ', err);
|
||||
});
|
||||
} else {
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.value = colorCode;
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
try {
|
||||
document.execCommand('copy');
|
||||
console.log('Color code copied to clipboard');
|
||||
copyButton.innerHTML = '<span>Copied!</span>';
|
||||
setTimeout(() => {
|
||||
copyButton.innerHTML = '<span>Copy</span>';
|
||||
}, 2000);
|
||||
} catch (err) {
|
||||
console.error('Could not copy text: ', err);
|
||||
}
|
||||
document.body.removeChild(textarea);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
147
.hta_slug/color-shades-generator.php
Normal file
147
.hta_slug/color-shades-generator.php
Normal file
@@ -0,0 +1,147 @@
|
||||
<div class="color-shades-container">
|
||||
<div class="color-shades-generator">
|
||||
<h1>Color Shades Generator</h1>
|
||||
<div style="display: flex; flex-direction: column; justify-content: center; align-items: center;">
|
||||
<label for="colorInput">Choose Color</label>
|
||||
<input type="color" id="colorInput" class="color-input" value="#ff0000" />
|
||||
</div>
|
||||
<div id="colorShades" class="color-shades"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function generateShades(hex) {
|
||||
const shades = [];
|
||||
for (let i = 0; i <= 90; i += 10) { // Adjust the increment value here
|
||||
const shade = lightenDarkenColor(hex, -i);
|
||||
shades.push(shade);
|
||||
}
|
||||
return shades;
|
||||
}
|
||||
|
||||
// Function to lighten or darken a color
|
||||
function lightenDarkenColor(col, amt) {
|
||||
let usePound = false;
|
||||
if (col[0] === "#") {
|
||||
col = col.slice(1);
|
||||
usePound = true;
|
||||
}
|
||||
const num = parseInt(col, 16);
|
||||
let r = (num >> 16) + amt;
|
||||
if (r > 255) r = 255;
|
||||
else if (r < 0) r = 0;
|
||||
let b = ((num >> 8) & 0x00FF) + amt;
|
||||
if (b > 255) b = 255;
|
||||
else if (b < 0) b = 0;
|
||||
let g = (num & 0x0000FF) + amt;
|
||||
if (g > 255) g = 255;
|
||||
else if (g < 0) g = 0;
|
||||
return (usePound ? "#" : "") + (g | (b << 8) | (r << 16)).toString(16);
|
||||
}
|
||||
|
||||
// Function to display color shades
|
||||
function displayColorShades(hex) {
|
||||
const colorShadesDiv = document.getElementById("colorShades");
|
||||
colorShadesDiv.innerHTML = "";
|
||||
const shades = generateShades(hex);
|
||||
shades.forEach(shade => {
|
||||
const colorBox = document.createElement("div");
|
||||
colorBox.style.backgroundColor = shade;
|
||||
colorBox.classList.add("color-box");
|
||||
const hexCode = document.createElement("p");
|
||||
hexCode.textContent = `HEX: ${shade}`;
|
||||
const copyHexButton = createCopyButton(shade);
|
||||
colorBox.appendChild(hexCode);
|
||||
colorBox.appendChild(copyHexButton);
|
||||
colorShadesDiv.appendChild(colorBox);
|
||||
});
|
||||
}
|
||||
|
||||
// Function to create a copy button
|
||||
function createCopyButton(text) {
|
||||
const button = document.createElement('button');
|
||||
button.classList.add('copy-button');
|
||||
button.textContent = 'Copy HEX';
|
||||
button.addEventListener('click', () => {
|
||||
navigator.clipboard.writeText(text);
|
||||
button.textContent = 'Copied';
|
||||
setTimeout(() => {
|
||||
button.textContent = 'Copy HEX';
|
||||
}, 2000); // Reset button text after 2 seconds
|
||||
});
|
||||
return button;
|
||||
}
|
||||
|
||||
// Event listener for input change
|
||||
const colorInput = document.getElementById("colorInput");
|
||||
colorInput.addEventListener("input", function() {
|
||||
const hex = this.value;
|
||||
displayColorShades(hex);
|
||||
});
|
||||
|
||||
// Initial display
|
||||
const initialColor = colorInput.value;
|
||||
displayColorShades(initialColor);
|
||||
</script>
|
||||
<style>
|
||||
.color-shades-container {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
/* background-color: #f4f4f4; */
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 50px;
|
||||
/* height: 100vh; */
|
||||
}
|
||||
.color-shades-generator {
|
||||
max-width: 600px;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.color-shades-generator h1 {
|
||||
font-size: 36px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.color-input {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-bottom: 20px;
|
||||
/* padding: 10px; */
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.color-shades {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.color-box {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
.color-box .copy-button {
|
||||
position: absolute;
|
||||
color: #000;
|
||||
top: 60px;
|
||||
right: 18px;
|
||||
font-size: 12px;
|
||||
padding: 5px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.color-info {
|
||||
font-size: 14px;
|
||||
margin-top: 5px;
|
||||
color: #666;
|
||||
}
|
||||
</style>
|
||||
34
.hta_slug/dns-tools-get-a-record.php
Normal file
34
.hta_slug/dns-tools-get-a-record.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<section class="diZContainer diZmxAuto">
|
||||
<h2 class="diZBorderBottom">Ultimate Domain & IP Lookup Tool</h2>
|
||||
</section>
|
||||
<!-- <p class="diZTextJustify">Discover detailed information about any domain and IP address with ease using Who-Is. Our tool provides instant access to essential data, including ownership, registration details, and more, all in a user-friendly interface designed for efficiency and accuracy.</p> -->
|
||||
|
||||
<form method="post" class="diZToolsSection diZmt4 diZmb4 diZBorderRadius diZPadding5px">
|
||||
<div class="diZFlexRowCol diZJustifyCenter diZItemsCenter">
|
||||
<input class="diZmr2 diZw70" placeholder="Domain" name="domain" type="text" />
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
if(isset($_POST['domain']) && $_POST['domain']){
|
||||
function validateDomain($domain) {
|
||||
$regex = "/^(?!\-)(?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]\.)+[a-zA-Z]{2,}$/";
|
||||
if (preg_match($regex, $domain)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$domain = isset($_POST['domain']) ? $_POST['domain'] : '';
|
||||
if ($domain && validateDomain($domain)) {
|
||||
$command = 'dig '.$_POST['domain'].' A +short';
|
||||
$escaped_command = escapeshellcmd($command);
|
||||
$output = shell_exec($escaped_command);
|
||||
echo '<div class="diZContainer diZmxAuto diZPadding5px"><pre class="diZTextJustify" style="width: fit-content;"> ',$output, '</pre> <br><br></div>';
|
||||
} else {
|
||||
echo "Invalid domain.";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
34
.hta_slug/dns-tools-get-mx-record.php
Normal file
34
.hta_slug/dns-tools-get-mx-record.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<section class="diZContainer diZmxAuto">
|
||||
<h2 class="diZBorderBottom">Ultimate Domain & IP Lookup Tool</h2>
|
||||
</section>
|
||||
<!-- <p class="diZTextJustify">Discover detailed information about any domain and IP address with ease using Who-Is. Our tool provides instant access to essential data, including ownership, registration details, and more, all in a user-friendly interface designed for efficiency and accuracy.</p> -->
|
||||
|
||||
<form method="post" class="diZToolsSection diZmt4 diZmb4 diZBorderRadius diZPadding5px">
|
||||
<div class="diZFlexRowCol diZJustifyCenter diZItemsCenter">
|
||||
<input class="diZmr2 diZw70" placeholder="Domain" name="domain" type="text" />
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
if(isset($_POST['domain']) && $_POST['domain']){
|
||||
function validateDomain($domain) {
|
||||
$regex = "/^(?!\-)(?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]\.)+[a-zA-Z]{2,}$/";
|
||||
if (preg_match($regex, $domain)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$domain = isset($_POST['domain']) ? $_POST['domain'] : '';
|
||||
if ($domain && validateDomain($domain)) {
|
||||
$command = 'dig '.$_POST['domain'].' MX +short';
|
||||
$escaped_command = escapeshellcmd($command);
|
||||
$output = shell_exec($escaped_command);
|
||||
echo '<div class="diZContainer diZmxAuto diZPadding5px"><pre class="diZTextJustify" style="width: fit-content;"> ',$output, '</pre> <br><br></div>';
|
||||
} else {
|
||||
echo "Invalid domain.";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
34
.hta_slug/dns-tools-get-ns-record.php
Normal file
34
.hta_slug/dns-tools-get-ns-record.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<section class="diZContainer diZmxAuto">
|
||||
<h2 class="diZBorderBottom">Ultimate Domain & IP Lookup Tool</h2>
|
||||
</section>
|
||||
<!-- <p class="diZTextJustify">Discover detailed information about any domain and IP address with ease using Who-Is. Our tool provides instant access to essential data, including ownership, registration details, and more, all in a user-friendly interface designed for efficiency and accuracy.</p> -->
|
||||
|
||||
<form method="post" class="diZToolsSection diZmt4 diZmb4 diZBorderRadius diZPadding5px">
|
||||
<div class="diZFlexRowCol diZJustifyCenter diZItemsCenter">
|
||||
<input class="diZmr2 diZw70" placeholder="Domain" name="domain" type="text" />
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
if(isset($_POST['domain']) && $_POST['domain']){
|
||||
function validateDomain($domain) {
|
||||
$regex = "/^(?!\-)(?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]\.)+[a-zA-Z]{2,}$/";
|
||||
if (preg_match($regex, $domain)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$domain = isset($_POST['domain']) ? $_POST['domain'] : '';
|
||||
if ($domain && validateDomain($domain)) {
|
||||
$command = 'dig '.$_POST['domain'].' NS +short';
|
||||
$escaped_command = escapeshellcmd($command);
|
||||
$output = shell_exec($escaped_command);
|
||||
echo '<div class="diZContainer diZmxAuto diZPadding5px"><pre class="diZTextJustify" style="width: fit-content;"> ',$output, '</pre> <br><br></div>';
|
||||
} else {
|
||||
echo "Invalid domain.";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
6
.hta_slug/geoip_domain.php
Normal file
6
.hta_slug/geoip_domain.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
$isp = geoip_isp_by_name('www.example.com');
|
||||
if ($isp) {
|
||||
echo 'This host IP is from ISP: ' . $isp;
|
||||
}
|
||||
?>
|
||||
54
.hta_slug/geolocation.php
Normal file
54
.hta_slug/geolocation.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<section class="diZContainer diZmxAuto diZmy8">
|
||||
<h2 class="diZBorderBottom">Get Current Location's Latitude & Longitude</h2>
|
||||
<p class="diZTextJustify">The Geolocation Tool is a powerful and user-friendly web application designed to pinpoint your exact geographical location. With just a click, this tool leverages advanced geolocation technology to provide you with accurate latitude and longitude coordinates of your current position</p>
|
||||
<div class="diZFlexColumn diZItemsCenter diZMaxW500 diZmxAuto diZmy20 toolsSection">
|
||||
<p class="diZDisplayNone" id="copiedNotice"></p>
|
||||
<div class="diZFlexRow diZItemsCenter diZFlexBetween">
|
||||
<h2 class="" id="demo"></h2>
|
||||
<span title="Click to copy Latitude & Longitude!" onclick="copyToClipboard()" class="diZCursorPointer"><img src="/assets/svg/copy.svg" /></span>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Features:</h2>
|
||||
<ul>
|
||||
<li><strong>Real-Time Location Tracking:</strong> Instantly fetches and displays your current latitude and longitude.</li>
|
||||
<li><strong>User-Friendly Interface:</strong> Simple and intuitive design makes it easy for anyone to use.</li>
|
||||
<li><strong>High Accuracy:</strong> Utilizes modern geolocation APIs to ensure precise location data.</li>
|
||||
<li><strong>Privacy-Conscious:</strong> Only accesses your location when you allow it, ensuring your privacy is respected.</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
const x = document.getElementById("demo");
|
||||
const copiedNoticeSection = document.getElementById('copiedNotice');
|
||||
|
||||
function getLocation() {
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(showPosition);
|
||||
} else {
|
||||
x.innerHTML = "Geolocation is not supported by this browser.";
|
||||
}
|
||||
}
|
||||
getLocation();
|
||||
|
||||
function showPosition(position) {
|
||||
x.innerHTML = "Latitude: " + position.coords.latitude +
|
||||
"<br>Longitude: " + position.coords.longitude;
|
||||
}
|
||||
|
||||
|
||||
function copyToClipboard() {
|
||||
const copyText = document.getElementById("demo").innerText;
|
||||
const textArea = document.createElement("textarea");
|
||||
textArea.value = copyText;
|
||||
document.body.appendChild(textArea);
|
||||
textArea.select();
|
||||
document.execCommand("copy");
|
||||
document.body.removeChild(textArea);
|
||||
setTimeout(() => {
|
||||
copiedNoticeSection.style.display = 'none';
|
||||
}, 1000);
|
||||
copiedNoticeSection.style.display = 'block';
|
||||
copiedNoticeSection.innerHTML = 'Coordinates copied to clipboard!';
|
||||
}
|
||||
|
||||
</script>
|
||||
57
.hta_slug/get-a-name.php
Normal file
57
.hta_slug/get-a-name.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
// Function to generate a random name
|
||||
function generateRandomName($length = 6) {
|
||||
$vowels = array('a', 'e', 'i', 'o', 'u');
|
||||
$consonants = array('b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z');
|
||||
|
||||
$name = '';
|
||||
$is_vowel = mt_rand(0, 1);
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$source = $is_vowel ? $vowels : $consonants;
|
||||
$name .= $source[mt_rand(0, count($source) - 1)];
|
||||
$is_vowel = !$is_vowel;
|
||||
}
|
||||
return ucfirst($name);
|
||||
}
|
||||
|
||||
$randomFirstName = generateRandomName(mt_rand(4, 8));
|
||||
$randomLastName = generateRandomName(mt_rand(4, 8));
|
||||
?>
|
||||
<section class="diZContainer diZmxAuto diZmy8">
|
||||
<h2 class="diZBorderBottom">Get a Random Name</h2>
|
||||
<div class="diZMaxW500 diZFlexColumn diZItemsCenter diZJustifyCenter diZmxAuto toolsSection diZmy20">
|
||||
<span class="diZDisplayNone" id="copiedNoticeName">Copied to clipboard</span>
|
||||
<div class="diZFlexRow diZItemsCenter diZJustifyCenter">
|
||||
<h2 id="randomName"><?php echo $randomFirstName . ' ' . $randomLastName; ?></h2>
|
||||
<span class="diZCursorPointer" onclick="copyNameToClipboard()"><img src="/assets/svg/copy.svg" alt="Copy to Clipboard"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<h3>Random Name Usage:</h3>
|
||||
<ul>
|
||||
<li class="diZTextJustify diZmt2">Generate random names for testing or placeholder purposes in applications or websites.</li>
|
||||
<li class="diZTextJustify diZmt2">Use randomly generated names in mockups or design prototypes.</li>
|
||||
<li class="diZTextJustify diZmt2">Create unique usernames or profile names in development environments.</li>
|
||||
<li class="diZTextJustify diZmt2">Generate fictional character names for creative writing or gaming applications.</li>
|
||||
<li class="diZTextJustify diZmt2">Provide random names for demo accounts or example data in presentations.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
function copyNameToClipboard() {
|
||||
var copyText = document.getElementById('randomName');
|
||||
var textArea = document.createElement('textarea');
|
||||
textArea.value = copyText.textContent.trim();
|
||||
document.body.appendChild(textArea);
|
||||
textArea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textArea);
|
||||
|
||||
var copiedNotice = document.getElementById('copiedNoticeName');
|
||||
copiedNotice.style.display = 'block';
|
||||
setTimeout(function() {
|
||||
copiedNotice.style.display = 'none';
|
||||
}, 1000);
|
||||
}
|
||||
</script>
|
||||
61
.hta_slug/get-a-number.php
Normal file
61
.hta_slug/get-a-number.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<section class="diZContainer diZmxAuto diZmy8">
|
||||
<h2 class="diZBorderBottom">Random Unique Number Generator</h2>
|
||||
<p class="diZTextJustify">This tool generates a random and unique number sequence every time it's called. It combines a random string of digits with a unique identifier based on the current microtime, ensuring that each generated number is both unpredictable and unique. This ensures that generated IDs do not conflict in the future. Use it for various applications where unique identifiers or random tokens are required, such as in cryptographic nonce generation, session identifiers, or unique transaction IDs.</p>
|
||||
<div class="diZmy20">
|
||||
<?php
|
||||
function generateRandomUniqueNumber($length = 10) {
|
||||
$randomNumber = '';
|
||||
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$randomNumber .= mt_rand(0, 9);
|
||||
}
|
||||
|
||||
// Append a unique identifier (based on microtime)
|
||||
$uniqueId = uniqid();
|
||||
$randomUniqueNumber = $randomNumber . $uniqueId;
|
||||
|
||||
return $randomUniqueNumber;
|
||||
}
|
||||
// Usage
|
||||
$randomUniqueNumber = generateRandomUniqueNumber();
|
||||
// echo $randomUniqueNumber;
|
||||
?>
|
||||
<div class="diZMaxW500 diZFlexColumn diZItemsCenter diZJustifyCenter diZmxAuto toolsSection">
|
||||
<span class="diZDisplayNone" id="copiedNotice">Copied to clipboard</span>
|
||||
<div class="diZFlexRow diZItemsCenter diZJustifyCenter">
|
||||
<h2 id="randomNumber"><?php echo $randomUniqueNumber; ?></h2>
|
||||
<span title="Click to copy Siliconid!" onclick="copyToClipboard()" class="diZCursorPointer"><img src="/assets/svg/copy.svg" /></span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li class="diZTextJustify"><strong>Order and Transaction IDs:</strong> Generate unique identifiers for orders and transactions in e-commerce platforms to ensure each transaction is uniquely identified and tracked.</li>
|
||||
<li class="diZTextJustify"><strong>Session IDs:</strong> Use unique numbers as session identifiers in web applications to manage user sessions securely and uniquely.</li>
|
||||
<li class="diZTextJustify"><strong>Cryptographic Nonces:</strong> Generate random tokens for cryptographic nonces in security-sensitive operations to prevent replay attacks and ensure message integrity.</li>
|
||||
<li class="diZTextJustify"><strong>API Tokens:</strong> Create unique tokens for API authentication and authorization purposes, ensuring secure and verifiable access to APIs.</li>
|
||||
<li class="diZTextJustify"><strong>Coupon and Voucher Codes:</strong> Generate unique codes for promotional coupons and vouchers to track redemptions and prevent duplication.</li>
|
||||
<li class="diZTextJustify"><strong>Database Keys:</strong> Generate unique primary keys or identifiers for database records to ensure data integrity and efficient data retrieval.</li>
|
||||
<li class="diZTextJustify"><strong>Logging and Tracking:</strong> Use unique numbers as tracking IDs in logging systems to uniquely identify and trace events or actions within applications.</li>
|
||||
<li class="diZTextJustify"><strong>Password Reset Tokens:</strong> Generate unique tokens for password reset links sent via email to securely verify and authorize password changes.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
function copyToClipboard() {
|
||||
var copyText = document.getElementById('randomNumber');
|
||||
var textArea = document.createElement('textarea');
|
||||
textArea.value = copyText.textContent.trim();
|
||||
document.body.appendChild(textArea);
|
||||
textArea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textArea); //copiedNotice
|
||||
setTimeout(() => {
|
||||
document.getElementById('copiedNotice').style.display = 'none';
|
||||
}, 1000);
|
||||
document.getElementById('copiedNotice').style.display = 'block';
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
88
.hta_slug/google-fonts-pair-finder.php
Normal file
88
.hta_slug/google-fonts-pair-finder.php
Normal file
@@ -0,0 +1,88 @@
|
||||
|
||||
<!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,700"> -->
|
||||
<div class="google-fonts-container">
|
||||
<h1 class="google-fonts-heading">Google Fonts Pair Finder</h1>
|
||||
<label for="selectedFont" class="google-fonts-label">Select a Font:</label>
|
||||
<select id="selectedFont" class="google-fonts-select">
|
||||
<!-- Options will be populated dynamically -->
|
||||
</select>
|
||||
|
||||
<div class="google-fonts-preview">
|
||||
<h2>Preview:</h2>
|
||||
<p id="previewText">The quick brown fox jumps over the lazy dog.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Function to fetch all Google Fonts and populate dropdown
|
||||
function fetchGoogleFonts() {
|
||||
fetch('https://www.googleapis.com/webfonts/v1/webfonts?key=AIzaSyAssce4aiUByEQGByr49fHVn3TSzdBkQQE')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
const fonts = data.items.map(item => item.family);
|
||||
const fontSelect = document.getElementById('selectedFont');
|
||||
fonts.forEach(font => {
|
||||
const option = document.createElement('option');
|
||||
option.value = font;
|
||||
option.textContent = font;
|
||||
fontSelect.appendChild(option);
|
||||
});
|
||||
})
|
||||
.catch(error => console.error('Error fetching Google Fonts:', error));
|
||||
}
|
||||
|
||||
// Function to update font preview
|
||||
function updatePreview() {
|
||||
const selectedFont = document.getElementById('selectedFont').value;
|
||||
const previewText = document.getElementById('previewText');
|
||||
previewText.style.fontFamily = selectedFont;
|
||||
}
|
||||
|
||||
// Add event listener to font dropdown
|
||||
document.getElementById('selectedFont').addEventListener('change', updatePreview);
|
||||
|
||||
// Call function to fetch and populate Google Fonts
|
||||
fetchGoogleFonts();
|
||||
|
||||
// Initial call to update preview
|
||||
updatePreview();
|
||||
</script>
|
||||
<style>
|
||||
.google-fonts-container {
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 8px;
|
||||
background-color: #3d3d3d;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.google-fonts-heading {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-weight: 400;
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.google-fonts-select {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-size: 16px;
|
||||
padding: 8px;
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
background-color: #3d3d3d;
|
||||
}
|
||||
|
||||
.google-fonts-preview {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-size: 25px;
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
background-color: #3d3d3d;
|
||||
}
|
||||
</style>
|
||||
56
.hta_slug/hex-to-rgb-generator.php
Normal file
56
.hta_slug/hex-to-rgb-generator.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<div class="diZContainer diZmxAuto">
|
||||
<h1 class="diZBorderBottom">HEX to RGB Converter</h1>
|
||||
<div class="diZMaxW600 diZmxAuto toolsSection diZmy20 diZPadding15px">
|
||||
<label for="hex">HEX Color:</label><br><br>
|
||||
<input style="width: 96%;" onchange="visibleColor();" type="text" id="hex" value="#" pattern="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$" required ><br>
|
||||
<br>
|
||||
<div id="result"></div><br>
|
||||
<div class="diZFlexRow">
|
||||
<button id="convert-button" onclick="convertHexToRgb()"><span>Convert</span></button>
|
||||
<button id="copyButton" onclick="copyToClipboard()"><span>Copy</span></button>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function hexToRgb(hex) {
|
||||
hex = hex.replace(/^#/, '');
|
||||
if (hex.length === 3) {
|
||||
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
|
||||
}
|
||||
var bigint = parseInt(hex, 16);
|
||||
var r = (bigint >> 16) & 255;
|
||||
var g = (bigint >> 8) & 255;
|
||||
var b = bigint & 255;
|
||||
return [r, g, b];
|
||||
}
|
||||
function visibleColor(){
|
||||
var hexColorCode = document.getElementById('hex').value;
|
||||
document.getElementById('convert-button').style.backgroundColor = hexColorCode;
|
||||
}
|
||||
function convertHexToRgb() {
|
||||
var hexColor = document.getElementById('hex').value;
|
||||
var rgbArray = hexToRgb(hexColor);
|
||||
var red = rgbArray[0];
|
||||
var green = rgbArray[1];
|
||||
var blue = rgbArray[2];
|
||||
|
||||
document.getElementById('result').textContent = "HEX " + hexColor + " is equivalent to RGB(" + red + ", " + green + ", " + blue + ")";
|
||||
|
||||
document.getElementById('copyButton').style.display = 'inline-block';
|
||||
}
|
||||
|
||||
function copyToClipboard() {
|
||||
var rgbText = document.getElementById('result').textContent.split('equivalent to ')[1];
|
||||
var textarea = document.createElement('textarea');
|
||||
textarea.value = rgbText;
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textarea);
|
||||
document.getElementById('copied-notice').style.display = 'block';
|
||||
document.getElementById('copied-notice').innerHTML = 'RGB values copied successfully';
|
||||
}
|
||||
</script>
|
||||
76
.hta_slug/html-cleaner.php
Normal file
76
.hta_slug/html-cleaner.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<section class="diZContainer diZmxAuto diZmy4">
|
||||
<h1 class="diZBorderBottom">HTML Remover</h1>
|
||||
<p class="diZTextJustify">The HTML Remover tool helps you clean text by removing all HTML tags, leaving only plain text. It's perfect for extracting content from HTML code without any formatting.</p>
|
||||
<div class="diZFlexColumn diZMaxW600 diZmxAuto diZmy20 toolsSection">
|
||||
<div class="diZmt2 diZFlexColumn">
|
||||
<label for="htmlInput">Input Text with HTML:</label>
|
||||
<textarea class="diZTextAreaResizeNone" rows="10" id="htmlInput" placeholder="Paste your text with html here..."></textarea>
|
||||
</div>
|
||||
<div class="diZFlexColumn diZItemsCenter">
|
||||
<button class="diZmt2 " onclick="cleanHTML()"><span>Remove</span></button>
|
||||
</div>
|
||||
<div class="diZmt2 diZFlexColumn">
|
||||
<label for="cleanedHTML">Cleaned Text:</label>
|
||||
<textarea class="diZTextAreaResizeNone" rows="10" id="cleanedHTML" readonly placeholder="Cleaned Text will appear here..."></textarea>
|
||||
</div>
|
||||
<p class="diZDisplayNone" id="copied-notice"></p>
|
||||
<div class="diZFlexColumn diZItemsCenter">
|
||||
<button class="diZmt2 " onclick="copyToClipboard()"><span>Copy</span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<!-- diZwFit diZJustifyCenter diZItemsCenter -->
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><strong>Enter Text with HTML:</strong> Paste your desired text with HTML into the text area provided.</li>
|
||||
<li><strong>Remove HTML:</strong> Click the "Remove" button to clean the text, stripping out all HTML tags.</li>
|
||||
<li><strong>View Cleaned Text:</strong> The cleaned, plain text will appear in the output text area below.</li>
|
||||
<li><strong>Copy Cleaned Text:</strong> Click the "Copy" button to copy the cleaned text to your clipboard.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Features:</h3>
|
||||
<ul>
|
||||
<li>Effortlessly removes all HTML tags from the input text.</li>
|
||||
<li>Provides a user-friendly interface for inputting and viewing text.</li>
|
||||
<li>Includes a copy function to quickly copy the cleaned text to your clipboard.</li>
|
||||
<li>Displays a notification when the text is successfully copied to the clipboard.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Example Use Cases:</h3>
|
||||
<ul>
|
||||
<li>Writers and editors extracting plain text content from HTML-formatted documents.</li>
|
||||
<li>Developers cleaning up text before using it in applications or databases.</li>
|
||||
<li>Content creators preparing text for use in plain text editors or word processors.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
function cleanHTML() {
|
||||
const inputHTML = document.getElementById("htmlInput").value;
|
||||
|
||||
// Create a temporary element to hold the input HTML
|
||||
const tempDiv = document.createElement("div");
|
||||
tempDiv.innerHTML = inputHTML;
|
||||
|
||||
// Remove all HTML tags
|
||||
const plainText = tempDiv.textContent || tempDiv.innerText || "";
|
||||
|
||||
document.getElementById("cleanedHTML").value = plainText;
|
||||
}
|
||||
|
||||
function copyToClipboard() {
|
||||
const cleanedHTML = document.getElementById("cleanedHTML").value;
|
||||
navigator.clipboard.writeText(cleanedHTML)
|
||||
.then(() => {
|
||||
document.getElementById('copied-notice').style.display = 'block';
|
||||
document.getElementById('copied-notice').innerHTML = 'Text copied to clipboard!';
|
||||
setTimeout(() => {
|
||||
document.getElementById('copied-notice').style.display = 'none';
|
||||
}, 1000);
|
||||
|
||||
})
|
||||
.catch(err => {
|
||||
// console.error('Failed to copy: ', err);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
36
.hta_slug/html-decode.php
Normal file
36
.hta_slug/html-decode.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<section class="diZContainer diZmxAuto ">
|
||||
<h1 class="diZBorderBottom">HTML Decoder</h1>
|
||||
<div class="diZMaxW600 diZmxAuto toolsSection diZmy20">
|
||||
<div class="diZFlexColumn diZJustifyCenter">
|
||||
<textarea class="diZScrollBarNone" rows="10" id="encodedText" placeholder="Enter encoded HTML here..."></textarea>
|
||||
<div></div>
|
||||
<button class="diZmt4 diZmxAuto" onclick="decodeHtml()"><span>Decode</span></button>
|
||||
<textarea class="diZmt4 diZScrollBarNone" rows="10" id="decodedText" readonly placeholder="Decoded HTML will appear here..."></textarea>
|
||||
<button class="diZmt4 diZmxAuto" id="copyButton" onclick="copyToClipboard()"><span>Copy</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
function decodeHtml() {
|
||||
const encodedInput = document.getElementById('encodedText').value;
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.innerHTML = encodedInput;
|
||||
const decoded = textarea.value;
|
||||
document.getElementById('decodedText').value = decoded;
|
||||
}
|
||||
|
||||
function copyToClipboard() {
|
||||
const decodedText = document.getElementById('decodedText');
|
||||
decodedText.select();
|
||||
decodedText.setSelectionRange(0, 99999); // For mobile devices
|
||||
document.execCommand('copy');
|
||||
let copyButtons = document.getElementById('copyButton');
|
||||
copyButtons.innerHTML = 'Copied to clipboard!';
|
||||
setTimeout(() => {
|
||||
copyButtons.innerHTML = 'Copy';
|
||||
}, 2000);
|
||||
|
||||
// alert('Decoded HTML copied to clipboard!');
|
||||
}
|
||||
</script>
|
||||
40
.hta_slug/html-encode.php
Normal file
40
.hta_slug/html-encode.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
require_once('.htac_header.php');
|
||||
?>
|
||||
<section class="diZContainer diZmxAuto diZmy20">
|
||||
<div class="diZMaxW600 diZmxAuto toolsSection">
|
||||
<h1>HTML Encoder</h1>
|
||||
<div class="diZFlexColumn">
|
||||
<textarea class="diZScrollBarNone" rows="10" id="inputText" placeholder="Enter HTML code here..."></textarea>
|
||||
|
||||
<button class="diZmt4 diZmxAuto" onclick="encodeHtml()"><span>Encode</span></button>
|
||||
|
||||
<textarea class="diZmt4 diZScrollBarNone" rows="10" id="outputText" readonly placeholder="Encoded HTML will appear here..."></textarea>
|
||||
|
||||
<button class="diZmt4 diZmxAuto" id="copyButton" onclick="copyToClipboard()"><span>Copy</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
function encodeHtml() {
|
||||
const input = document.getElementById('inputText').value;
|
||||
const encoded = input.replace(/[\u00A0-\u9999<>&'"]/gim, function(i) {
|
||||
return '&#' + i.charCodeAt(0) + ';';
|
||||
});
|
||||
document.getElementById('outputText').value = encoded;
|
||||
}
|
||||
|
||||
function copyToClipboard() {
|
||||
const encodedText = document.getElementById('outputText');
|
||||
encodedText.select();
|
||||
encodedText.setSelectionRange(0, 99999); // For mobile devices
|
||||
document.execCommand('copy');
|
||||
let copyButtons = document.getElementById('copyButton');
|
||||
copyButtons.innerHTML = 'Copied to clipboard!';
|
||||
setTimeout(() => {
|
||||
copyButtons.innerHTML = 'Copy';
|
||||
}, 2000);
|
||||
|
||||
// alert('Decoded HTML copied to clipboard!');
|
||||
}
|
||||
</script>
|
||||
75
.hta_slug/image-compressor.php
Normal file
75
.hta_slug/image-compressor.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<section class="diZContainer diZmxAuto ">
|
||||
<h1 class="diZBorderBottom">Image Compression Tool</h1>
|
||||
<div class="toolsSection diZMaxW600 diZmxAuto diZmy20">
|
||||
<div>
|
||||
<input type="file" id="imageInput" accept="image/*">
|
||||
</div>
|
||||
<div>
|
||||
<label for="qualityInput">Compression Quality:</label>
|
||||
<div class="diZFlexRow">
|
||||
<input class="diZw100" type="range" id="qualityInput" min="1" max="100" step="1" value="10" />
|
||||
<span id="qualityValue">10%</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="image-preview">
|
||||
<img id="preview" src="" alt="" style="width: 100%;" />
|
||||
<span id="imageSize" class="image-size"></span>
|
||||
</div>
|
||||
<div class="diZFlexBetween">
|
||||
<button class="comp-button" onclick="compressImage()"><span>Compress Image</span></button>
|
||||
<a class="diZDisplayNone diZButtonDefault" id="downloadLink" href="#" download="compressed_image.jpg"><span>Download Compressed Image</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
function compressImage() {
|
||||
const fileInput = document.getElementById('imageInput');
|
||||
const file = fileInput.files[0];
|
||||
|
||||
if (!file) {
|
||||
alert('Please select an image file.');
|
||||
return;
|
||||
}
|
||||
|
||||
const reader = new FileReader();
|
||||
|
||||
reader.onload = function(event) {
|
||||
const image = new Image();
|
||||
image.src = event.target.result;
|
||||
|
||||
image.onload = function() {
|
||||
const canvas = document.createElement('canvas');
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
canvas.width = image.width;
|
||||
canvas.height = image.height;
|
||||
console.log(image.width)
|
||||
ctx.drawImage(image, 0, 0);
|
||||
|
||||
const qualityInput = document.getElementById('qualityInput');
|
||||
const qualityValue = parseFloat(qualityInput.value) / 100; // Normalize quality value to range 0-1
|
||||
|
||||
canvas.toBlob(function(blob) {
|
||||
const url = URL.createObjectURL(blob);
|
||||
const preview = document.getElementById('preview');
|
||||
const downloadLink = document.getElementById('downloadLink');
|
||||
|
||||
preview.src = url;
|
||||
downloadLink.href = url;
|
||||
downloadLink.style.display = 'flex';
|
||||
|
||||
const imageSizeSpan = document.getElementById('imageSize');
|
||||
const compressedSize = (blob.size / 1024).toFixed(2); // Convert bytes to kilobytes and round to 2 decimal places
|
||||
imageSizeSpan.textContent = `Compressed Image Size: ${compressedSize} KB`;
|
||||
}, 'image/jpeg', qualityValue); // Pass normalized quality value to toBlob
|
||||
};
|
||||
};
|
||||
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
|
||||
document.getElementById('qualityInput').addEventListener('input', function() {
|
||||
document.getElementById('qualityValue').textContent = this.value + "%";
|
||||
});
|
||||
</script>
|
||||
40
.hta_slug/image-to-base64-converter.php
Normal file
40
.hta_slug/image-to-base64-converter.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<section class="diZContainer diZmxAuto">
|
||||
<h2 class="diZBorderBottom">Convert Image to Base64</h2>
|
||||
<div class="diZMaxW600 diZmxAuto toolsSection diZmy20">
|
||||
<div class="diZFlexColumn ">
|
||||
<input type="file" class="image-input diZmt2" accept="image/*">
|
||||
<textarea rows="10" class="base64-textarea diZmt2" readonly></textarea>
|
||||
<p class="diZDisplayNone diZTextCenter diZmt2" id="copied-notice"></p>
|
||||
<div class="diZmt2" id="preview" ></div>
|
||||
<button class="copy-button diZmt2 diZmxAuto"><span>Copy Base64</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<script>
|
||||
document.querySelector('.image-input').addEventListener('change', function() {
|
||||
var file = this.files[0];
|
||||
if (file) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
var base64 = e.target.result;
|
||||
var img = document.createElement('img');
|
||||
img.src = base64;
|
||||
img.style.width = '100%';
|
||||
document.getElementById('preview').innerHTML = '';
|
||||
document.getElementById('preview').appendChild(img);
|
||||
document.querySelector('.base64-textarea').value = base64;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelector('.copy-button').addEventListener('click', function() {
|
||||
var base64TextArea = document.querySelector('.base64-textarea');
|
||||
base64TextArea.select();
|
||||
document.execCommand('copy');
|
||||
document.getElementById('copied-notice').style.display = 'block';
|
||||
document.getElementById('copied-notice').innerHTML = 'Base64 copied to clipboard!';
|
||||
});
|
||||
</script>
|
||||
111
.hta_slug/json-formatter.php
Normal file
111
.hta_slug/json-formatter.php
Normal file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
require_once('.htac_header.php');
|
||||
?>
|
||||
<section class="diZContainer diZmxAuto diZmy8">
|
||||
<h1 class="diZBorderBottom">JSON Formatter</h1>
|
||||
<div class="diZFlexRowCol">
|
||||
<div class="diZw100 jsonCustomHeight diZFlexColumn diZJsonInputBorder diZBorderRadius5px diZmr2">
|
||||
<textarea oninput="parseJSON()" id="jsonInput" class="diZJsonInput diZScrollBarNone" rows="40" placeholder="Enter JSON here"></textarea><br>
|
||||
</div>
|
||||
<div class="diZw100 jsonCustomHeight diZFlexColumn diZJsonInputBorder diZBorderRadius5px">
|
||||
<div id="output" class="diZJsonViewer"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="diZFloatRight diZFlexRow diZJustifyCenter diZItemsCenter">
|
||||
<p class=" diZJsonKey" id="countArray">Array Length: 0</p>
|
||||
<button class="diZmt4 diZmb4 diZml2" onclick="copyToClipboard()"><span>Copy JSON</span></button>
|
||||
<button class="diZmt4 diZmb4 diZml2" onclick="downloadJsonData()"><span>Download JSON</span></button>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<script>
|
||||
function parseJSON() {
|
||||
const input = document.getElementById('jsonInput').value;
|
||||
const outputElement = document.getElementById('output');
|
||||
outputElement.innerHTML = ''; // Clear previous output
|
||||
|
||||
try {
|
||||
const parsedData = JSON.parse(input);
|
||||
outputElement.appendChild(createTreeView(parsedData));
|
||||
let totalObjects = parsedData.length;
|
||||
document.getElementById('countArray').innerHTML = 'Array Length: '+ totalObjects;
|
||||
} catch (error) {
|
||||
outputElement.textContent = 'Error parsing JSON: ' + error.message;
|
||||
}
|
||||
}
|
||||
|
||||
function createTreeView(data) {
|
||||
const container = document.createElement('div');
|
||||
|
||||
if (typeof data === 'object' && data !== null) {
|
||||
const ul = document.createElement('ul');
|
||||
ul.className = 'diZJsonUl';
|
||||
for (const key in data) {
|
||||
if (data.hasOwnProperty(key)) {
|
||||
const li = document.createElement('li');
|
||||
li.className = 'diZJsonLi';
|
||||
const keySpan = document.createElement('span');
|
||||
keySpan.className = 'diZJsonKey';
|
||||
keySpan.textContent = `${key}: `;
|
||||
|
||||
const valueSpan = document.createElement('span');
|
||||
if (typeof data[key] === 'object' && data[key] !== null) {
|
||||
const childContainer = createTreeView(data[key]);
|
||||
li.appendChild(keySpan);
|
||||
li.appendChild(childContainer);
|
||||
} else {
|
||||
if (typeof data[key] === 'string') {
|
||||
valueSpan.className = 'diZJsonString';
|
||||
valueSpan.textContent = `"${data[key]}"`;
|
||||
} else {
|
||||
valueSpan.className = 'diZJsonValue';
|
||||
valueSpan.textContent = data[key];
|
||||
}
|
||||
li.appendChild(keySpan);
|
||||
li.appendChild(valueSpan);
|
||||
}
|
||||
ul.appendChild(li);
|
||||
}
|
||||
}
|
||||
container.appendChild(ul);
|
||||
} else {
|
||||
const span = document.createElement('span');
|
||||
if (typeof data === 'string') {
|
||||
span.className = 'diZJsonString';
|
||||
span.textContent = `"${data}"`;
|
||||
} else {
|
||||
span.className = 'diZJsonValue';
|
||||
span.textContent = data;
|
||||
}
|
||||
container.appendChild(span);
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
function copyToClipboard() {
|
||||
const input = document.getElementById('jsonInput').value;
|
||||
navigator.clipboard.writeText(input).then(() => {
|
||||
console.log('JSON copied to clipboard!');
|
||||
}, (err) => {
|
||||
console.log('Failed to copy JSON: ', err);
|
||||
});
|
||||
}
|
||||
function downloadJsonData() {
|
||||
const jsonData = document.getElementById('jsonInput').value;
|
||||
let jsonObject;
|
||||
try {
|
||||
jsonObject = JSON.parse(jsonData);
|
||||
} catch (error) {
|
||||
console.log('Invalid JSON data');
|
||||
return;
|
||||
}
|
||||
const jsonString = JSON.stringify(jsonObject, null, 2);
|
||||
const blob = new Blob([jsonString], { type: 'application/json' });
|
||||
const downloadLink = document.createElement('a');
|
||||
downloadLink.href = URL.createObjectURL(blob);
|
||||
downloadLink.download = 'json-data.json';
|
||||
downloadLink.click();
|
||||
URL.revokeObjectURL(downloadLink.href);
|
||||
}
|
||||
</script>
|
||||
104
.hta_slug/letter-case-converter.php
Normal file
104
.hta_slug/letter-case-converter.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<section class="diZContainer diZmxAuto">
|
||||
<h2 class="diZBorderBottom">Case Converter</h2>
|
||||
<p class="diZTextJustify">The Letter Case Converter tool allows you to effortlessly change the case of your text to Uppercase, Lowercase, or Title Case. Whether you're writing a document, formatting code, or preparing content for publication, this tool provides a quick and easy way to ensure your text is in the desired case format.</p>
|
||||
<div class="diZMaxW600 diZmxAuto toolsSection diZmt20 ">
|
||||
<form class="diZFlexColumn">
|
||||
<label class="" for="inputString">Input Text:</label>
|
||||
<textarea id="inputString" class="diZTextAreaResizeNone" name="inputString" rows="8" oninput="convertCase()"></textarea>
|
||||
<div class="diZFlexBetween diZmt4">
|
||||
<div class="caseOptionButton diZButtonDefault" onclick="setActive(this)" data-case="uppercase"><span>Uppercase</span></div>
|
||||
<div class="caseOptionButton diZButtonDefault" onclick="setActive(this)" data-case="lowercase"><span>Lowercase</span></div>
|
||||
<div class="caseOptionButton diZButtonDefault" onclick="setActive(this)" data-case="titlecase"><span>Titlecase</span></div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="diZFlexColumn">
|
||||
<textarea id="result" rows="7" readonly class="result-cc diZTextAreaResizeNone diZmt4"></textarea>
|
||||
<p class="diZDisplayNone diZmt4" id="copied-notice"></p>
|
||||
<button type="button" class="copy-button-cc diZmt4 diZmxAuto" onclick="copyToClipboard()"><span>Copy</span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="diZmb20">
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><strong>Enter Text:</strong> Input your desired text into the text area provided.</li>
|
||||
<li><strong>Choose Case Conversion:</strong> Select the type of conversion you want: Uppercase, Lowercase, or Title Case.</li>
|
||||
<!-- <li><strong>Convert Text:</strong> Click the "Convert" button to apply the selected case transformation to your text.</li> -->
|
||||
<li><strong>Copy Converted Text:</strong> Once converted, the text will appear in the output text area. Click the "Copy" button to copy it to your clipboard.</li>
|
||||
<li><strong>Paste and Use:</strong> Paste the copied text into your document, email, or any other text field where you need the transformed text.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Features:</h3>
|
||||
<ul>
|
||||
<li>Converts text to uppercase.</li>
|
||||
<li>Converts text to lowercase.</li>
|
||||
<li>Converts text to title case.</li>
|
||||
<li>Provides instant feedback with a "Text copied to clipboard!" notification upon copying.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Example Use Cases:</h3>
|
||||
<ul>
|
||||
<li>Writers ensuring consistent capitalization in their documents.</li>
|
||||
<li>Developers needing text transformations for various programming tasks.</li>
|
||||
<li>Students formatting essays and assignments according to specific case requirements.</li>
|
||||
<li>Content creators adjusting the text case for social media posts, emails, or presentations.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
function convertCase() {
|
||||
var inputString = document.getElementById("inputString").value;
|
||||
var targetCase = document.querySelector('.caseOptionButton.active').getAttribute('data-case');
|
||||
var result = document.getElementById("result");
|
||||
|
||||
if (inputString.trim() === "") {
|
||||
result.value = "Please enter a string.";
|
||||
return;
|
||||
}
|
||||
|
||||
if (targetCase === 'uppercase') {
|
||||
result.value = inputString.toUpperCase();
|
||||
} else if (targetCase === 'lowercase') {
|
||||
result.value = inputString.toLowerCase();
|
||||
} else if (targetCase === 'titlecase') {
|
||||
result.value = inputString.replace(/\w\S*/g, function (txt) {
|
||||
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
||||
});
|
||||
} else {
|
||||
result.value = "Invalid target case specified.";
|
||||
}
|
||||
}
|
||||
|
||||
function setActive(button) {
|
||||
var buttons = document.querySelectorAll('.caseOptionButton');
|
||||
buttons.forEach(function(btn) {
|
||||
btn.classList.remove('active');
|
||||
});
|
||||
button.classList.add('active');
|
||||
|
||||
convertCase();
|
||||
}
|
||||
|
||||
function copyToClipboard() {
|
||||
var result = document.getElementById("result");
|
||||
var range = document.createRange();
|
||||
range.selectNode(result);
|
||||
window.getSelection().removeAllRanges();
|
||||
window.getSelection().addRange(range);
|
||||
document.execCommand("copy");
|
||||
window.getSelection().removeAllRanges();
|
||||
// alert("Copied to clipboard!");
|
||||
|
||||
setTimeout(() => {
|
||||
document.getElementById('copied-notice').style.display = 'none';
|
||||
}, 1000);
|
||||
document.getElementById('copied-notice').style.display = 'block';
|
||||
document.getElementById('copied-notice').innerHTML = 'Copied to clipboard!';
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.active{
|
||||
border: 2px solid #4caf50;
|
||||
background: transparent;
|
||||
color: #4caf50;
|
||||
}
|
||||
</style>
|
||||
148
.hta_slug/letter-counter.php
Normal file
148
.hta_slug/letter-counter.php
Normal file
@@ -0,0 +1,148 @@
|
||||
|
||||
<section class="diZContainer diZmxAuto">
|
||||
<h1 class="diZBorderBottom">Text Counter</h1>
|
||||
<div class="diZMaxW600 diZmxAuto diZmyAuto diZFlexColumn toolsSection diZmt20">
|
||||
<label for="inputText">Enter your text:</label><br>
|
||||
<textarea class="" rows="10" id="inputText" placeholder="Type your text here..." oninput="countTextMetrics()" style="resize: vertical;"></textarea>
|
||||
<div>
|
||||
<p>Total letters: <span id="letterCount">0</span></p>
|
||||
<p>Total words: <span id="wordCount">0</span></p>
|
||||
<p>Total sentences: <span id="sentenceCount">0</span></p>
|
||||
<p>Total paragraphs: <span id="paragraphCount">0</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="diZContainer diZmxAuto diZmb20">
|
||||
<div>
|
||||
<h2 class="diZBorderBottom">Content Limitations</h2>
|
||||
<table class="diZw70 diZmxAuto">
|
||||
<tr>
|
||||
<th class="diZTableBorder diZPadding5px">Name</th>
|
||||
<th class="diZTableBorder diZPadding5px">Min/Max</th>
|
||||
<th class="diZTableBorder diZPadding5px">Limit</th>
|
||||
<th class="diZTableBorder diZPadding5px">Type</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Meta Title</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">55</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Meta Description</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">160</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Google Ideal Post Content</td>
|
||||
<td class="diZTableBorder diZPadding5px">Min</td>
|
||||
<td class="diZTableBorder diZPadding5px">300</td>
|
||||
<td class="diZTableBorder diZPadding5px">Word</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Instagram Captions/Comments</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">2200</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Twitter Post</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">280</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Twitter Username</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">20</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Facebook Wall Post (Truncation)</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">477</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Facebook Wall Post (All)</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">63206</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Facebook Comment</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">8000</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Facebook Page Description</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">255</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Facebook Username</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">50</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Facebook Messenger Message</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">20000</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">YouTube Video Title</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">70</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">YouTube Video Description</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">5000</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Snapchat Caption</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">250</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Pinterest Pin Description</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">500</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
function countTextMetrics() {
|
||||
const text = document.getElementById('inputText').value;
|
||||
|
||||
// Count letters
|
||||
const letterCount = text.replace(/[^a-zA-Z]/g, '').length;
|
||||
document.getElementById('letterCount').textContent = letterCount;
|
||||
|
||||
// Count words
|
||||
const words = text.split(/\s+/).filter(word => word.length > 0);
|
||||
const wordCount = words.length;
|
||||
document.getElementById('wordCount').textContent = wordCount;
|
||||
|
||||
// Count sentences
|
||||
const sentences = text.split(/[.!?]+/).filter(sentence => sentence.trim().length > 0);
|
||||
const sentenceCount = sentences.length;
|
||||
document.getElementById('sentenceCount').textContent = sentenceCount;
|
||||
|
||||
// Count paragraphs
|
||||
const paragraphs = text.split(/\n\n+/).filter(paragraph => paragraph.trim().length > 0);
|
||||
const paragraphCount = paragraphs.length;
|
||||
document.getElementById('paragraphCount').textContent = paragraphCount;
|
||||
}
|
||||
</script>
|
||||
118
.hta_slug/location-ip-to-location.php
Normal file
118
.hta_slug/location-ip-to-location.php
Normal file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
require '.hta_lib/vendors/maxmind-db-reader/vendor/autoload.php';
|
||||
?>
|
||||
<section class="diZContainer diZmxAuto diZmy8">
|
||||
<h1 class="diZBorderBottom">IP Information</h1>
|
||||
<p>This tool provides detailed geographical and ISP information for a given IP address using the GeoIP2.</p>
|
||||
<?php
|
||||
use GeoIp2\Database\Reader;
|
||||
if (isset($_GET['ip'])) {
|
||||
try {
|
||||
$reader = new Reader('.hta_lib/data/GeoLite2-City.mmdb');
|
||||
$reader2 = new Reader('.hta_lib/data/GeoLite2-ASN.mmdb');
|
||||
|
||||
$records = $reader->city($_GET['ip']);
|
||||
$records2 = $reader2->asn($_GET['ip']);
|
||||
// var_dump($records2);
|
||||
$country = $records->country->name ?? null;
|
||||
$state = $records->mostSpecificSubdivision->name ?? null;
|
||||
$city = $records->city->name ?? null;
|
||||
$region = $records->subdivisions[0]->name ?? null;
|
||||
$timezone = $records->location->timeZone ?? null;
|
||||
|
||||
$data = [
|
||||
'ip' => $_GET['ip'],
|
||||
'country' => $records->country->name ?? null,
|
||||
'country_iso_code' => $records->country->iso_code ?? null,
|
||||
'state' => $records->mostSpecificSubdivision->name ?? null,
|
||||
'state_iso_code' => $records->mostSpecificSubdivision->iso_code ?? null,
|
||||
'city' => $records->city->name ?? null,
|
||||
'region' => $records->subdivisions[0]->name ?? null,
|
||||
'timezone' => $records->location->timeZone ?? null,
|
||||
'latitude' => $records->location->latitude ?? null,
|
||||
'longitude' => $records->location->longitude ?? null,
|
||||
'postal_code' => $records->postal->code ?? null,
|
||||
'continent' => $records->continent->name ?? null,
|
||||
'asn' => $records2->autonomousSystemNumber ?? null,
|
||||
'isp' => $records2->autonomousSystemOrganization ?? null,
|
||||
];
|
||||
$dataArray = [$data]; // Wrap in an array if it's a single record.
|
||||
?>
|
||||
<div class="diZGridCols1-3">
|
||||
<?php
|
||||
foreach ($dataArray as $record) { // Ensure you loop through an array
|
||||
if (is_array($record)) { // Check if record is an array
|
||||
?>
|
||||
<h3 style="border-bottom: 1px solid #808080;"><strong>IP:</strong> <?php echo $record['ip']; ?></h3>
|
||||
<h3 style="border-bottom: 1px solid #808080;"><strong>Continent:</strong> <?php echo $record['continent']; ?></h3>
|
||||
<h3 style="border-bottom: 1px solid #808080;"><strong>Country:</strong> <?php echo $record['country']; ?></h3>
|
||||
<h3 style="border-bottom: 1px solid #808080;"><strong>State:</strong> <?php echo $record['state']; ?></h3>
|
||||
<h3 style="border-bottom: 1px solid #808080;"><strong>City:</strong> <?php echo $record['city']; ?></h3>
|
||||
<h3 style="border-bottom: 1px solid #808080;"><strong>Region:</strong> <?php echo $record['region']; ?></h3>
|
||||
<h3 style="border-bottom: 1px solid #808080;"><strong>Timezone:</strong> <?php echo $record['timezone']; ?></h3>
|
||||
<h3 style="border-bottom: 1px solid #808080;"><strong>Latitude:</strong> <?php echo $record['latitude']; ?></h3>
|
||||
<h3 style="border-bottom: 1px solid #808080;"><strong>Longitude:</strong> <?php echo $record['longitude']; ?></h3>
|
||||
<h3 style="border-bottom: 1px solid #808080;"><strong>Postal Code:</strong> <?php echo $record['postal_code']; ?></h3>
|
||||
<h3 style="border-bottom: 1px solid #808080;"><strong>ASN:</strong> <?php echo $record['asn']; ?></h3>
|
||||
<h3 style="border-bottom: 1px solid #808080;"><strong>ISP:</strong> <?php echo $record['isp']; ?></h3>
|
||||
<?php
|
||||
} else {
|
||||
echo '<p>Invalid data format</p><br>';
|
||||
echo '<div class="diZFlexColumn diZmxAuto diZJustifyCenter diZItemsCenter">
|
||||
<a class="diZButtonDenger " href="/tools/location-ip-to-location">Back</a>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="diZFlexColumn diZmxAuto diZJustifyCenter diZItemsCenter">
|
||||
<a class="diZButtonDenger " href="/tools/location-ip-to-location">Back</a>
|
||||
</div>
|
||||
<?php
|
||||
// Echoing the data as JSON
|
||||
// echo json_encode($data);
|
||||
} catch (Exception $e) {
|
||||
echo json_encode(['error' => $e->getMessage()]);
|
||||
echo '<div class="diZFlexColumn diZmxAuto diZJustifyCenter diZItemsCenter">
|
||||
<a class="diZButtonDenger " href="/tools/location-ip-to-location">Back</a>
|
||||
</div>';
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<div class="diZMaxW600 diZw100 diZmxAuto toolsSection diZFlexColumn diZmy20"><br>
|
||||
<form method="get" class="diZFlexColumn">
|
||||
<label for="ip">IP Address:</label>
|
||||
<div class="diZFlexColumn">
|
||||
<input class="diZPadding5px" type="text" name="ip" id="ip" placeholder="Enter IP Address" />
|
||||
<button class="diZmxAuto diZmt4" type="submit"><span>Check IP Details</span></button>
|
||||
</div>
|
||||
</form><br>
|
||||
</div>
|
||||
<!-- echo json_encode(['error' => 'Invalid parameters']); diZw100 -->
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div>
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><strong>Enter IP Address:</strong> Input the IP address you wish to check in the provided query parameter.</li>
|
||||
<li><strong>Check Location:</strong> Send a request with the IP address to retrieve and display the geographical and ISP information.</li>
|
||||
<li><strong>View Results:</strong> The location and ISP details will be displayed in a structured format, showing country, city, region, ASN, ISP, and other relevant information.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Features:</h3>
|
||||
<ul>
|
||||
<li>Uses MaxMind GeoLite2 databases for accurate geo-location and ISP information.</li>
|
||||
<li>Displays detailed geographical information including continent, country, state, city, and region.</li>
|
||||
<li>Provides additional information such as timezone, latitude, longitude, and postal code.</li>
|
||||
<li>Displays Autonomous System Number (ASN) and Internet Service Provider (ISP) details.</li>
|
||||
</ul>
|
||||
<h3>Example Use Cases:</h3>
|
||||
<ul>
|
||||
<li>Network administrators tracking the location of IP addresses accessing their networks.</li>
|
||||
<li>Security professionals analyzing IP addresses for potential threats.</li>
|
||||
<li>Developers building applications that require IP-based location services.</li>
|
||||
<li>Marketers tailoring content based on the geographic location of their audience.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
94
.hta_slug/md5-decryption.php
Normal file
94
.hta_slug/md5-decryption.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
require_once ('.hta_config/db_config.php');
|
||||
?>
|
||||
<section class="diZContainer diZmxAuto diZmy8">
|
||||
<h2 class="diZBorderBottom">MD5 Decryption</h2>
|
||||
<p class="diZTextJustify">The MD5 Decryption Tool is designed to help you decrypt MD5 hashes. It searches a pre-existing database for the original text corresponding to a given MD5 hash and retrieves it if available. This tool is especially useful for developers and security professionals who need to quickly look up the original value of an MD5 hash.</p>
|
||||
<div class="diZMaxW600 diZmxAuto toolsSection diZmy20">
|
||||
<?php
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
try {
|
||||
$db = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$stmt = $db->prepare("SELECT * FROM md5_data WHERE md5 = :md5");
|
||||
$stmt->bindParam(':md5', $_POST["md5-hash"]);
|
||||
$stmt->execute();
|
||||
$result = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($result) {
|
||||
echo ' <div class="">
|
||||
<p>Given MD5 Vlue: </p>
|
||||
<p class="diZDisplayNone" id="copied-notice"></p>
|
||||
<div class="diZFlexColumn">
|
||||
<textarea class="diZTextAreaResizeNone" rows="8" id="output" readonly>'.$result['value'].'</textarea><br>
|
||||
<button class="diZmxAuto" id="copyButton" onclick="copyOutputText()"><span>Copy</span></button>
|
||||
</div>
|
||||
</div>';
|
||||
echo '
|
||||
<script>
|
||||
function copyOutputText() {
|
||||
const outputText = document.getElementById(\'output\').value;
|
||||
const textarea = document.createElement(\'textarea\');
|
||||
textarea.value = outputText;
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
document.execCommand(\'copy\');
|
||||
document.body.removeChild(textarea);
|
||||
document.getElementById(\'copied-notice\').style.display = \'block\';
|
||||
document.getElementById(\'copied-notice\').innerHTML = \'MD5 value copied to clipboard!\';
|
||||
}
|
||||
</script>';
|
||||
} else {
|
||||
echo '<div>
|
||||
<div>
|
||||
<p>No data found for the given MD5 hash </p>
|
||||
<div>
|
||||
<button class="" id="" onclick="tryAgain()">Try Again</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
echo ' <script>
|
||||
function tryAgain() {
|
||||
window.location.href="/tools/md5-decryption";
|
||||
}
|
||||
</script>' ;
|
||||
// echo json_encode(array('success' => false, 'message' => 'No data found for the given MD5 hash'));
|
||||
}
|
||||
} catch (PDOException $e) {
|
||||
echo json_encode(array('success' => false, 'message' => 'Database error: ' . $e->getMessage()));
|
||||
exit();
|
||||
}
|
||||
}else{
|
||||
echo ' <form method="post" action="" class="diZFlexColumn">
|
||||
<label for="md5-hash" class="custom-label">Enter MD5 Hash:</label><br>
|
||||
<textarea id="md5-hash" name="md5-hash" class="diZTextAreaResizeNone" rows="8"></textarea><br>
|
||||
<button class="diZmxAuto" type="submit"><span>Convert MD5</span></button>
|
||||
</form>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><strong>Enter MD5 Hash:</strong> Input the MD5 hash you want to decrypt into the provided text area.</li>
|
||||
<li><strong>Decrypt MD5:</strong> Click the "Convert MD5" button to initiate the search for the corresponding value in the database.</li>
|
||||
<li><strong>View and Copy Result:</strong> If a matching value is found, it will be displayed in the output area. Click the "Copy" button to copy the result to your clipboard.</li>
|
||||
<li><strong>Try Again:</strong> If no matching value is found, click the "Try Again" button to search for another MD5 hash.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Features:</h3>
|
||||
<ul>
|
||||
<li>Simple and user-friendly interface for easy MD5 hash decryption.</li>
|
||||
<li>Instantly displays the original text if found in the database.</li>
|
||||
<li>Copy functionality to quickly copy the decrypted text to your clipboard.</li>
|
||||
<li>Notification message to indicate successful copying of the decrypted text.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Example Use Cases:</h3>
|
||||
<ul>
|
||||
<li>Developers verifying the integrity of files by comparing original text and its MD5 hash.</li>
|
||||
<li>Security professionals analyzing hashed data to check for common vulnerabilities.</li>
|
||||
<li>Researchers decrypting MD5 hashes for data analysis purposes.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
101
.hta_slug/md5-encryption.php
Normal file
101
.hta_slug/md5-encryption.php
Normal file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
// require_once ('.hta_config/siliconpin_sp.php');
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
|
||||
$md5_hash = md5($_POST["md5-text"]);
|
||||
try {
|
||||
$db = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$stmt = $db->prepare("INSERT INTO md5_data (md5, value) VALUES (:md5, :value)");
|
||||
$stmt->bindParam(':md5', $md5_hash);
|
||||
$stmt->bindParam(':value', $_POST["md5-text"]);
|
||||
$stmt->execute();
|
||||
echo ' <div class="diZContainer diZmxAuto">
|
||||
<h2 class="diZBorderBottom">Generate MD5 Hash</h2>
|
||||
<p>The MD5 Hash Generator tool allows you to quickly and easily generate an MD5 hash from any text input. This is useful for creating checksums, storing passwords securely, or any other application where a unique hash representation of your data is needed.</p>
|
||||
<div class="diZMaxW600 diZmxAuto diZmy20 toolsSection">
|
||||
<div class="diZFlexColumn diZJustifyCenter ">
|
||||
<div>
|
||||
<p>Converted MD5: </p>
|
||||
<p id="copied-notice"></p>
|
||||
<div class="diZFlexColumn">
|
||||
<input id="output" type="text" readonly value="'.$md5_hash.'" /><br>
|
||||
<button class="diZmxAuto" id="copyButton" onclick="copyOutputText()"><span>Copy</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
echo '
|
||||
<script>
|
||||
function copyOutputText() {
|
||||
const outputText = document.getElementById(\'output\').value;
|
||||
const textarea = document.createElement(\'textarea\');
|
||||
textarea.value = outputText;
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
document.execCommand(\'copy\');
|
||||
document.body.removeChild(textarea);
|
||||
document.getElementById(\'copied-notice\').style.display = \'block\';
|
||||
document.getElementById(\'copied-notice\').innerHTML = \'MD5 copied to clipboard!\';
|
||||
}
|
||||
</script>';
|
||||
// echo json_encode(array('success' => true, 'message' => 'Data inserted successfully'));
|
||||
// echo '<script>window.location.href="/admin/add-content";</script>';
|
||||
} catch (PDOException $e) {
|
||||
echo json_encode(array('success' => false, 'message' => 'Database error: ' . $e->getMessage()));
|
||||
exit();
|
||||
}
|
||||
}else{
|
||||
echo '<section class="diZContainer diZmxAuto">
|
||||
<h2 class="diZBorderBottom">Generate MD5 Hash</h2>
|
||||
<div class="diZMaxW600 diZmxAuto diZmy20 toolsSection">
|
||||
<form method="post" class="diZFlexColumn diZJustifyCenter "><br>
|
||||
<label for="md5-text" class="">Enter Text Convert to MD5:</label><br>
|
||||
<textarea name="md5-text" id="md5-text" rows="10"></textarea><br>
|
||||
<button class="diZmxAuto" type="submit"><span>Generate MD5 Hash</span></button>
|
||||
</form>
|
||||
</div>
|
||||
</section>';
|
||||
}
|
||||
?>
|
||||
<div class="diZContainer diZmxAuto">
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><strong>Enter Text:</strong> Input your desired text into the text area provided.</li>
|
||||
<li><strong>Generate MD5 Hash:</strong> Click the "Generate MD5 Hash" button to convert the text into an MD5 hash.</li>
|
||||
<li><strong>Copy Hash:</strong> Once generated, the hash will appear in the output text area. Click the "Copy" button to copy it to your clipboard.</li>
|
||||
<li><strong>Paste and Use:</strong> Paste the copied hash directly into your application, database, or any other place where you need an MD5 hash.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Features:</h3>
|
||||
<ul>
|
||||
<li>Generates a unique MD5 hash from any input text.</li>
|
||||
<li>Displays the generated hash in a read-only text area for easy copying.</li>
|
||||
<li>Provides a "Copy" button to quickly copy the generated hash to the clipboard.</li>
|
||||
<li>Includes error handling to manage database insertion issues gracefully.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Example Use Cases:</h3>
|
||||
<ul>
|
||||
<li>Web developers creating checksums for file verification.</li>
|
||||
<li>Security professionals storing passwords securely in a database.</li>
|
||||
<li>Software engineers ensuring data integrity by generating unique hashes for sensitive data.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- <script>
|
||||
function copyOutputText() {
|
||||
const outputText = document.getElementById('output').value;
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.value = outputText;
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textarea);
|
||||
document.getElementById('copied-notice').style.display = 'block';
|
||||
document.getElementById('copied-notice').innerHTML = 'Output text copied to clipboard!';
|
||||
}
|
||||
</script> -->
|
||||
41
.hta_slug/multiple-whitespace-remover.php
Normal file
41
.hta_slug/multiple-whitespace-remover.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<section class="diZContainer diZmxAuto">
|
||||
<h2 class="diZBorderBottom">Remove Multiple Whitespace</h2>
|
||||
<div class="diZMaxW600 diZFlexColumn diZmxAuto diZmy20 toolsSection">
|
||||
<textarea class="textarea-text" id="textInput" rows="10" placeholder="Enter text here..."></textarea>
|
||||
<button class="diZmt2 diZmxAuto" onclick="processText()"><span>Remove</span></button>
|
||||
<div class="diZFlexColumn diZDisplayNone diZmt2" id="after-procces">
|
||||
<textarea class="textarea-text" id="output" rows="10" readonly></textarea>
|
||||
<p class="diZDisplayNone diZTextCenter" id="copied-notice"></p>
|
||||
<button class="diZmt2 diZmxAuto" id="copyButton" onclick="copyOutputText()"><span>Copy</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
function removeMultipleWhitespace(text) {
|
||||
return text.replace(/\s+/g, ' ').trim();
|
||||
}
|
||||
|
||||
function processText() {
|
||||
const inputText = document.getElementById('textInput').value;
|
||||
const cleanedText = removeMultipleWhitespace(inputText);
|
||||
document.getElementById('output').value = cleanedText;
|
||||
document.getElementById('after-procces').style.display = 'flex';
|
||||
}
|
||||
|
||||
function copyOutputText() {
|
||||
const outputText = document.getElementById('output').value;
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.value = outputText;
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textarea);
|
||||
const copiedNotice = document.getElementById('copied-notice');
|
||||
copiedNotice.style.display = 'block';
|
||||
copiedNotice.innerHTML = 'Output text copied to clipboard!';
|
||||
setTimeout(() => {
|
||||
copiedNotice.style.display = 'none';
|
||||
}, 2000);
|
||||
}
|
||||
</script>
|
||||
36
.hta_slug/mx-lookup.php
Normal file
36
.hta_slug/mx-lookup.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<section class="diZContainer diZmxAuto">
|
||||
<h2 class="diZBorderBottom">Domain MX Information Viewer</h2>
|
||||
<p class="diZTextJustify diZmb4">The Domain MX Information Viewer is a powerful and easy-to-use tool designed to help IT professionals and website administrators retrieve detailed mail exchange (MX) records for any given domain. Simply enter a domain name, and this tool will perform a DNS lookup to fetch and display the MX records, providing insights into the domain's email routing information.</p>
|
||||
<form method="post" class="diZToolsSection diZmt4 diZmb4 diZBorderRadius diZPadding5px ">
|
||||
<div class="diZFlexRowCol diZJustifyCenter diZItemsCenter">
|
||||
<input class="diZmr2 diZw70" placeholder="Domain Name" id="Domain" name="domain" type="text" required />
|
||||
<button class="diZmr2" type="submit"><span>Check</span></button>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
if (isset($_POST['domain']) && $_POST['domain']) {
|
||||
function validateDomain($domain) {
|
||||
return filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME);
|
||||
}
|
||||
|
||||
$domain = $_POST['domain'];
|
||||
if (validateDomain($domain)) {
|
||||
$command = escapeshellcmd('dig ' . $domain . ' MX');
|
||||
$output = shell_exec($command);
|
||||
echo '<div class="diZContainer diZmxAuto diZPadding5px"><pre>' . htmlspecialchars($output, ENT_QUOTES, 'UTF-8') . '</pre></div>';
|
||||
} else {
|
||||
echo '<div class="diZContainer diZmxAuto diZPadding5px">Invalid domain.</div>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="diZmy20">
|
||||
<h3>Key Features:</h3>
|
||||
<ul>
|
||||
<li><strong>Accurate Domain Validation:</strong> Ensures the entered domain name is valid and properly formatted.</li>
|
||||
<li><strong>Secure Processing:</strong> Utilizes command sanitization and output encoding to prevent security vulnerabilities like command injection and cross-site scripting (XSS).</li>
|
||||
<li><strong>Instant Results:</strong> Quickly retrieves and displays MX records for the specified domain.</li>
|
||||
<li><strong>User-Friendly Interface:</strong> Simplified input form for easy use without the need for additional styling.</li>
|
||||
</ul>
|
||||
<p>This tool is ideal for those seeking quick and reliable MX record information to manage and troubleshoot email delivery issues effectively.</p>
|
||||
</div>
|
||||
</section>
|
||||
32
.hta_slug/ns-lookup.php
Normal file
32
.hta_slug/ns-lookup.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<section class="diZContainer diZmxAuto">
|
||||
<h2 class="diZBorderBottom">Domain DNS Information Viewer</h2>
|
||||
</section>
|
||||
<!-- <p class="diZTextJustify">NS Lookup simplifies checking DNS records. Enter any domain to instantly retrieve and explore its DNS details, including A, AAAA, MX, CNAME records, and more. Ideal for IT professionals and website administrators seeking quick and accurate DNS insights.</p> -->
|
||||
<form method="post" class="diZToolsSection diZmt4 diZmb4 diZBorderRadius diZPadding5px">
|
||||
<div class="diZFlexRowCol diZJustifyCenter diZItemsCenter">
|
||||
<input class="diZmr2 diZw70" placeholder="Domain Name" name="domain" type="text" />
|
||||
<button class="diZmr2" type="submit" value="Check"><span>Check</span></button>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
if(isset($_POST['domain']) && $_POST['domain']){
|
||||
function validateDomain($domain) {
|
||||
$regex = "/^(?!\-)(?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]\.)+[a-zA-Z]{2,}$/";
|
||||
if (preg_match($regex, $domain)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$domain = isset($_POST['domain']) ? $_POST['domain'] : '';
|
||||
if ($domain && validateDomain($domain)) {
|
||||
$command = 'dig '.$_POST['domain']. ' NS';
|
||||
$escaped_command = escapeshellcmd($command);
|
||||
$output = shell_exec($escaped_command);
|
||||
echo '<div class="diZContainer diZmxAuto diZPadding5px"><pre class="diZTextJustify" style="width: fit-content;"> ',$output, '</pre> <br><br></div>';
|
||||
} else {
|
||||
echo "Invalid domain.";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
250
.hta_slug/open-graph-meta-generator.php
Normal file
250
.hta_slug/open-graph-meta-generator.php
Normal file
@@ -0,0 +1,250 @@
|
||||
<section class="diZContainer diZmxAuto diZmy4">
|
||||
<h1 class="diZBorderBottom">Open Graph Meta Generator</h1>
|
||||
<p class="diZTextJustify">The Open Graph Meta Generator is a tool designed to help web developers and content creators easily generate meta tags for optimizing content sharing on social media platforms like Facebook and Twitter. By filling out a simple form, users can create the necessary Open Graph and Twitter meta tags to enhance the visibility and appearance of their web pages when shared online.</p>
|
||||
<div class="diZFlexColumn diZMaxW600 diZmxAuto diZmy20 toolsSection">
|
||||
<form class="diZFlexColumn" id="metaForm">
|
||||
<div class="diZFlexColumn diZmt2">
|
||||
<label for="ogTitle" class="form-label">Title:</label>
|
||||
<input type="text" id="ogTitle" name="ogTitle" class="" required>
|
||||
</div>
|
||||
<div class="diZFlexColumn diZmt2">
|
||||
<label for="ogDescription" class="form-label">Description:</label>
|
||||
<textarea id="ogDescription" name="ogDescription" class="diZTextAreaResizeNone" rows="4" required></textarea>
|
||||
</div>
|
||||
<div class="diZFlexColumn diZmt2">
|
||||
<label for="ogImage" class="form-label">Image URL:</label>
|
||||
<input type="text" id="ogImage" name="ogImage" class="" required>
|
||||
</div>
|
||||
<div class="diZFlexColumn diZmt2">
|
||||
<label for="ogUrl" class="form-label">URL:</label>
|
||||
<input type="text" id="ogUrl" name="ogUrl" class="" required>
|
||||
</div>
|
||||
<div class="diZFlexColumn diZmt2">
|
||||
<label for="author" class="form-label">Author:</label>
|
||||
<input type="text" id="author" name="author" class="" required>
|
||||
</div>
|
||||
<div class="diZFlexColumn diZmt2">
|
||||
<label for="keywords" class="form-label">Keywords:</label>
|
||||
<input type="text" id="keywords" name="keywords" class="" required>
|
||||
</div>
|
||||
<div class="diZFlexColumn diZmt2">
|
||||
<label for="twitterTitle" class="form-label">Twitter Title:</label>
|
||||
<input type="text" id="twitterTitle" name="twitterTitle" class="" required>
|
||||
</div>
|
||||
<div class="diZFlexColumn diZmt2">
|
||||
<label for="twitterDescription" class="form-label">Twitter Description:</label>
|
||||
<textarea id="twitterDescription" name="twitterDescription" class="diZTextAreaResizeNone" rows="4" required></textarea>
|
||||
</div>
|
||||
<div class="diZFlexColumn diZmt2">
|
||||
<label for="twitterImage" class="form-label">Twitter Image URL:</label>
|
||||
<input type="text" id="twitterImage" name="twitterImage" class="" required>
|
||||
</div>
|
||||
<div class="diZFlexColumn diZmt2">
|
||||
<label for="twitterCard" class="form-label">Twitter Card Type:</label>
|
||||
<select id="twitterCard" name="twitterCard" class="" required>
|
||||
<option value="summary">Summary</option>
|
||||
<option value="summary_large_image">Summary Large Image</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="diZFlexColumn diZmt2">
|
||||
<div class="diZDisplayNone generated-meta-tags" id="generatedMetaTags"></div>
|
||||
<p class="diZDisplayNone" id="copied-notice"></p>
|
||||
</div>
|
||||
<div class="diZFlexBetween diZmt2">
|
||||
<button type="submit" class="button-style"><span>Generate</span></button>
|
||||
<button id="copyButton" class="button-style" onclick="copyToClipboard()"><span>Copy</span></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<h2 class="diZBorderBottom">Content Limitations</h2>
|
||||
<p>Understanding the character and word limits for various platforms and meta tags is crucial for optimizing your content. The following table provides a comprehensive guide to these limitations, ensuring that your content adheres to the best practices for SEO and social media sharing.</p>
|
||||
<table class="diZw70 diZmxAuto">
|
||||
<tr>
|
||||
<th class="diZTableBorder diZPadding5px">Name</th>
|
||||
<th class="diZTableBorder diZPadding5px">Min/Max</th>
|
||||
<th class="diZTableBorder diZPadding5px">Limit</th>
|
||||
<th class="diZTableBorder diZPadding5px">Type</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Meta Title</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">55</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Meta Description</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">160</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Google Ideal Post Content</td>
|
||||
<td class="diZTableBorder diZPadding5px">Min</td>
|
||||
<td class="diZTableBorder diZPadding5px">300</td>
|
||||
<td class="diZTableBorder diZPadding5px">Word</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Instagram Captions/Comments</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">2200</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Twitter Post</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">280</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Twitter Username</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">20</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Facebook Wall Post (Truncation)</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">477</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Facebook Wall Post (All)</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">63206</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Facebook Comment</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">8000</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Facebook Page Description</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">255</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Facebook Username</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">50</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Facebook Messenger Message</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">20000</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">YouTube Video Title</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">70</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">YouTube Video Description</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">5000</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Snapchat Caption</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">250</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px">Pinterest Pin Description</td>
|
||||
<td class="diZTableBorder diZPadding5px">Max</td>
|
||||
<td class="diZTableBorder diZPadding5px">500</td>
|
||||
<td class="diZTableBorder diZPadding5px">Letter</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><strong>Enter Information:</strong> Input the required information, including Title, Description, Image URL, URL, Author, Keywords, Twitter Title, Twitter Description, Twitter Image URL, and Twitter Card Type, into the respective fields in the form.</li>
|
||||
<li><strong>Generate Meta Tags:</strong> Click the "Generate" button to create the Open Graph and Twitter meta tags based on the provided information.</li>
|
||||
<li><strong>Copy Meta Tags:</strong> The generated meta tags will appear in the output area. Click the "Copy" button to copy the meta tags to your clipboard.</li>
|
||||
<li><strong>Paste and Use:</strong> Paste the copied meta tags into the head section of your HTML document to enhance your webpage's social media integration and SEO.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Features:</h3>
|
||||
<ul>
|
||||
<li>Generates Open Graph meta tags for improved social media sharing.</li>
|
||||
<li>Generates Twitter meta tags for optimized content sharing on Twitter.</li>
|
||||
<li>Provides a clear and user-friendly form to input all necessary information.</li>
|
||||
<li>Includes a "Copy to Clipboard" function for easy integration into your HTML code.</li>
|
||||
<li>Displays a "Meta tags copied to clipboard!" notification upon copying.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Example Use Cases:</h3>
|
||||
<ul>
|
||||
<li>Web developers optimizing websites for social media sharing.</li>
|
||||
<li>Content creators ensuring their articles and posts are displayed attractively on social media platforms.</li>
|
||||
<li>SEO specialists enhancing webpage metadata for better search engine rankings.</li>
|
||||
<li>Bloggers and marketers improving the visibility and engagement of their content on social media.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<script>
|
||||
const form = document.getElementById('metaForm');
|
||||
const generatedMetaTags = document.getElementById('generatedMetaTags');
|
||||
const copiedNotice = document.getElementById('copied-notice');
|
||||
|
||||
form.addEventListener('submit', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
const ogTitle = document.getElementById('ogTitle').value.trim();
|
||||
const ogDescription = document.getElementById('ogDescription').value.trim();
|
||||
const ogImage = document.getElementById('ogImage').value.trim();
|
||||
const ogUrl = document.getElementById('ogUrl').value.trim();
|
||||
const author = document.getElementById('author').value.trim();
|
||||
const keywords = document.getElementById('keywords').value.trim();
|
||||
const twitterTitle = document.getElementById('twitterTitle').value.trim();
|
||||
const twitterDescription = document.getElementById('twitterDescription').value.trim();
|
||||
const twitterImage = document.getElementById('twitterImage').value.trim();
|
||||
const twitterCard = document.getElementById('twitterCard').value.trim();
|
||||
|
||||
const metaTags = `
|
||||
<title>${ogTitle}</title>
|
||||
<meta name="description" content="${ogDescription}">
|
||||
<meta name="keywords" content="${keywords}">
|
||||
<meta name="author" content="${author}">
|
||||
<meta property="og:title" content="${ogTitle}">
|
||||
<meta property="og:description" content="${ogDescription}">
|
||||
<meta property="og:image" content="${ogImage}">
|
||||
<meta property="og:url" content="${ogUrl}">
|
||||
<meta name="twitter:title" content="${twitterTitle}">
|
||||
<meta name="twitter:description" content="${twitterDescription}">
|
||||
<meta name="twitter:image" content="${twitterImage}">
|
||||
<meta name="twitter:card" content="${twitterCard}">
|
||||
`;
|
||||
|
||||
if(metaTags.length > 20) {
|
||||
generatedMetaTags.style.display = "block";
|
||||
}
|
||||
|
||||
generatedMetaTags.innerText = `${metaTags}`;
|
||||
});
|
||||
|
||||
function copyToClipboard() {
|
||||
const metaTags = document.getElementById('generatedMetaTags');
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.value = metaTags.innerText;
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textarea);
|
||||
copiedNotice.style.display = 'block';
|
||||
copiedNotice.innerHTML = 'Meta tags copied to clipboard!';
|
||||
|
||||
setTimeout(() => {
|
||||
copiedNotice.style.display = 'none';
|
||||
}, 3000);
|
||||
}
|
||||
</script>
|
||||
52
.hta_slug/pdf-to-image.php
Normal file
52
.hta_slug/pdf-to-image.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>PDF to Image Converter</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>PDF to Image Converter</h1>
|
||||
<?php
|
||||
// Check if form is submitted
|
||||
if (isset($_POST['submit'])) {
|
||||
// Check if file is uploaded without errors
|
||||
if ($_FILES['pdfFile']['error'] === UPLOAD_ERR_OK) {
|
||||
$pdfPath = $_FILES['pdfFile']['tmp_name']; // Temporary path of the uploaded file
|
||||
$outputFolder = 'output_images'; // Output folder for converted images
|
||||
|
||||
// Convert PDF to images
|
||||
pdf_to_images($pdfPath, $outputFolder);
|
||||
} else {
|
||||
echo "Error uploading file.";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="pdfFile" accept=".pdf">
|
||||
<button type="submit" name="submit"><span>Upload PDF</span></button>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
// Function to convert PDF to images
|
||||
function pdf_to_images($pdfPath, $outputFolder) {
|
||||
// Check if output folder exists, create it if not
|
||||
if (!file_exists($outputFolder)) {
|
||||
mkdir($outputFolder, 0777, true);
|
||||
}
|
||||
|
||||
// Command to convert PDF to images (using ImageMagick)
|
||||
$command = "convert {$pdfPath} {$outputFolder}/output.jpg";
|
||||
|
||||
// Execute the command
|
||||
exec($command, $output, $returnCode);
|
||||
|
||||
// Check if command execution was successful
|
||||
if ($returnCode === 0) {
|
||||
echo "PDF converted to images successfully!";
|
||||
} else {
|
||||
echo "Error converting PDF to images.";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
77
.hta_slug/png-to-svg.php
Normal file
77
.hta_slug/png-to-svg.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Image to ICO Converter</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
text-align: center;
|
||||
margin-top: 50px;
|
||||
}
|
||||
#fileInput {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Image to ICO Converter</h1>
|
||||
<input type="file" id="fileInput" accept="image/*">
|
||||
<br>
|
||||
<button id="convertButton"><span>Convert to ICO</span></button>
|
||||
<br><br>
|
||||
<a id="downloadLink" style="display: none;" download="icon.ico">Download ICO</a>
|
||||
|
||||
<script src="icojs.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const fileInput = document.getElementById('fileInput');
|
||||
const convertButton = document.getElementById('convertButton');
|
||||
const downloadLink = document.getElementById('downloadLink');
|
||||
|
||||
convertButton.addEventListener('click', function() {
|
||||
if (fileInput.files.length > 0) {
|
||||
const file = fileInput.files[0];
|
||||
|
||||
// Check if file is an image
|
||||
if (file.type.startsWith('image/')) {
|
||||
const reader = new FileReader();
|
||||
|
||||
reader.onload = function(e) {
|
||||
const img = new Image();
|
||||
img.onload = function() {
|
||||
// Create a canvas to draw the image
|
||||
const canvas = document.createElement('canvas');
|
||||
canvas.width = img.width;
|
||||
canvas.height = img.height;
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(img, 0, 0, img.width, img.height);
|
||||
|
||||
// Convert canvas to ICO format
|
||||
const ico = new ICO();
|
||||
ico.add(canvas.toDataURL('image/png')); // Add PNG image data
|
||||
|
||||
// Generate ICO file blob
|
||||
const icoBlob = ico.build();
|
||||
|
||||
// Update download link
|
||||
const url = URL.createObjectURL(icoBlob);
|
||||
downloadLink.href = url;
|
||||
downloadLink.style.display = 'inline-block';
|
||||
};
|
||||
img.src = e.target.result;
|
||||
};
|
||||
|
||||
reader.readAsDataURL(file);
|
||||
} else {
|
||||
alert('Please upload an image file.');
|
||||
}
|
||||
} else {
|
||||
alert('Please select a file to convert.');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
118
.hta_slug/qr-code.php
Normal file
118
.hta_slug/qr-code.php
Normal file
File diff suppressed because one or more lines are too long
74
.hta_slug/random-password-generator.php
Normal file
74
.hta_slug/random-password-generator.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
$time = time();
|
||||
$gen_pass = rand(100, 360) . $time . rand(100, 999);
|
||||
$rand_pass = base_convert($gen_pass, 10, 36);
|
||||
?>
|
||||
|
||||
<section class="diZContainer diZmxAuto diZmy8">
|
||||
<h1 class="diZBorderBottom">Get a random password</h1>
|
||||
<p class="diZTextJustify">This tool generates a random password consisting of alphanumeric characters, ideal for creating secure credentials quickly. It combines a random numeric value with the current timestamp, converting the result into a base-36 string format for enhanced security and uniqueness.</p>
|
||||
<div class="diZMaxW600 diZmxAuto diZmy20 diZFlexColumn toolsSection">
|
||||
<p class="diZDisplayNone" id="copied-notice"></p>
|
||||
<div class="diZFlexRow diZItemsCenter diZJustifyCenter">
|
||||
<h2>Password: <span id="randPassword"><?php echo $rand_pass; ?></span></h2>
|
||||
<span class="diZCursorPointer" onclick="copyToClipboard()"><img src="/assets/svg/copy.svg" alt="Copy to Clipboard"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><strong>Generate Random Password:</strong> Click the "Get a random password" button to generate a new, unique password.</li>
|
||||
<li><strong>Copy Password to Clipboard:</strong> Once generated, the password will display below the button.</li>
|
||||
<li><strong>Click the Copy Icon:</strong> Click the copy icon next to the password to copy it to your clipboard.</li>
|
||||
<li><strong>Paste and Use:</strong> Paste the copied password into any application, login form, or document where a secure password is required.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Features:</h3>
|
||||
<ul>
|
||||
<li><strong>Randomized Generation:</strong> Each password is dynamically generated using random numbers and timestamps.</li>
|
||||
<li><strong>Secure Base-36 Conversion:</strong> Converts the generated value into a base-36 string format for enhanced security.</li>
|
||||
<li><strong>Clipboard Integration:</strong> Allows easy copying of the generated password with a single click.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Example Use Cases:</h3>
|
||||
<ul>
|
||||
<li><strong>User Accounts:</strong> Quickly generate secure passwords for new user registrations or account setups.</li>
|
||||
<li><strong>Password Resets:</strong> Provide users with randomly generated passwords for password recovery processes.</li>
|
||||
<li><strong>Secure Access:</strong> Ideal for securing sensitive information and access credentials across various platforms.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<script>
|
||||
function copyToClipboard() {
|
||||
var copyText = document.getElementById('randPassword').innerText; // Get the text content
|
||||
var textArea = document.createElement('textarea');
|
||||
|
||||
// Place the text in the textarea
|
||||
textArea.value = copyText;
|
||||
|
||||
// Make the textarea hidden
|
||||
textArea.style.position = 'fixed';
|
||||
textArea.style.opacity = 0;
|
||||
|
||||
// Append the textarea to the body
|
||||
document.body.appendChild(textArea);
|
||||
|
||||
// Select and copy the text
|
||||
textArea.select();
|
||||
document.execCommand('copy');
|
||||
|
||||
// Remove the textarea from the DOM
|
||||
document.body.removeChild(textArea);
|
||||
|
||||
// Show copied notice
|
||||
var notice = document.getElementById('copied-notice');
|
||||
notice.style.display = 'block';
|
||||
notice.textContent = 'Text copied to clipboard!';
|
||||
|
||||
// Hide notice after 1 second
|
||||
setTimeout(function() {
|
||||
notice.style.display = 'none';
|
||||
}, 1000);
|
||||
}
|
||||
</script>
|
||||
105
.hta_slug/rgb-to-hex-generator.php
Normal file
105
.hta_slug/rgb-to-hex-generator.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<section class="diZContainer diZmxAuto diZmt8">
|
||||
<h1 class="diZBorderBottom">RGB to HEX Converter</h1>
|
||||
<div class="diZmxAuto toolsSection diZMaxW600 diZmy20" >
|
||||
<div class="diZFlexColumn"><br>
|
||||
<label for="red">Red:</label>
|
||||
<input style="width: 97%;" type="number" id="red" min="0" max="255" required>
|
||||
</div>
|
||||
<div class="diZFlexColumn"><br>
|
||||
<label for="green">Green:</label>
|
||||
<input style="width: 97%;" type="number" id="green" min="0" max="255" required>
|
||||
</div>
|
||||
<div class="diZFlexColumn"><br>
|
||||
<label for="blue">Blue:</label>
|
||||
<input style="width: 97%;" type="number" id="blue" min="0" max="255" required>
|
||||
</div>
|
||||
<div id="result"></div>
|
||||
<div class="diZFlexBetween">
|
||||
<button class="" onclick="convert()"><span>Convert</span></button>
|
||||
<button id="copyButton" onclick="copyToClipboard()"><span>Copy</span></button>
|
||||
</div>
|
||||
<span class="diZDisplayNone" id="copied-notice"></span>
|
||||
</div>
|
||||
</section>
|
||||
<!-- diZJustifyCenter diZItemsCenter -->
|
||||
<script>
|
||||
function rgbToHex(r, g, b) {
|
||||
r = Math.max(0, Math.min(255, r));
|
||||
g = Math.max(0, Math.min(255, g));
|
||||
b = Math.max(0, Math.min(255, b));
|
||||
|
||||
var hex = "#" + ("0" + r.toString(16)).slice(-2) + ("0" + g.toString(16)).slice(-2) + ("0" + b.toString(16)).slice(-2);
|
||||
|
||||
return hex.toUpperCase();
|
||||
}
|
||||
|
||||
function convert() {
|
||||
var red = parseInt(document.getElementById('red').value);
|
||||
var green = parseInt(document.getElementById('green').value);
|
||||
var blue = parseInt(document.getElementById('blue').value);
|
||||
|
||||
var hexColor = rgbToHex(red, green, blue);
|
||||
document.getElementById('result').textContent = "RGB(" + red + ", " + green + ", " + blue + ") is equivalent to " + hexColor;
|
||||
|
||||
document.getElementById('copyButton').style.display = 'inline-block';
|
||||
}
|
||||
|
||||
function copyToClipboard() {
|
||||
var hexColor = document.getElementById('result').textContent.split('equivalent to ')[1];
|
||||
var textarea = document.createElement('textarea');
|
||||
textarea.value = hexColor;
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textarea);
|
||||
document.getElementById('copied-notice').style.display = 'block';
|
||||
document.getElementById('copied-notice').innerHTML = 'HEX color code copied Successfully';
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.container-dzx {
|
||||
background-color: #3d3d3d;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 0px 10px 0px #FFFFFF80;
|
||||
padding: 20px;
|
||||
max-width: 500px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
transform: translate(-50%, -70%);
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
input[type="number"] {
|
||||
width: 100px;
|
||||
padding: 8px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #ccc;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.button-style{
|
||||
padding: 10px 20px;
|
||||
background-color: #7d7d7d;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.button-style:hover {
|
||||
background-color: #9d9d9d;
|
||||
}
|
||||
|
||||
#result {
|
||||
color: #007bff;
|
||||
}
|
||||
</style>
|
||||
126
.hta_slug/screen-recorder.php
Normal file
126
.hta_slug/screen-recorder.php
Normal file
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
require_once('.htac_header.php');
|
||||
?>
|
||||
<div class="diZMaxW600 diZmxAuto diZFlexColumn diZmb20">
|
||||
<h1 class="diZTextCenter diZBorderBottom">Screen Recorder</h1>
|
||||
<div class="diZFlexRow ">
|
||||
<button class="diZSpaceR" id="start"><span>Start Recording</span></button>
|
||||
<button class="diZSpaceR" id="stop" disabled><span>Stop Recording</span></button>
|
||||
<button class="diZSpaceR" id="download" disabled><span>Download Recording</span></button>
|
||||
</div>
|
||||
<div class="diZTextCenter diZmb4 diZmt4" id="timer">Duration: 00:00:00</div>
|
||||
<video class="diZw100" id="video" muted controls autoplay></video>
|
||||
</div>
|
||||
<script>
|
||||
const startButton = document.getElementById('start');
|
||||
const stopButton = document.getElementById('stop');
|
||||
const downloadButton = document.getElementById('download');
|
||||
const video = document.getElementById('video');
|
||||
const timer = document.getElementById('timer');
|
||||
|
||||
let mediaRecorder;
|
||||
let recordedChunks = [];
|
||||
let startTime;
|
||||
let timerInterval;
|
||||
|
||||
function formatTime(time) {
|
||||
const hours = String(Math.floor(time / 3600)).padStart(2, '0');
|
||||
const minutes = String(Math.floor((time % 3600) / 60)).padStart(2, '0');
|
||||
const seconds = String(time % 60).padStart(2, '0');
|
||||
return `${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
|
||||
function startTimer() {
|
||||
startTime = Date.now();
|
||||
timerInterval = setInterval(() => {
|
||||
const elapsedTime = Math.floor((Date.now() - startTime) / 1000);
|
||||
timer.textContent ='Duration: ' + formatTime(elapsedTime);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function stopTimer() {
|
||||
clearInterval(timerInterval);
|
||||
}
|
||||
|
||||
startButton.addEventListener('click', async () => {
|
||||
if (!navigator.mediaDevices || !navigator.mediaDevices.getDisplayMedia) {
|
||||
console.log('getDisplayMedia is not supported in your browser.');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const stream = await navigator.mediaDevices.getDisplayMedia({
|
||||
video: { mediaSource: 'screen' },
|
||||
audio: true // Enable audio recording
|
||||
});
|
||||
|
||||
// Show live video feed in the video element
|
||||
video.srcObject = stream;
|
||||
|
||||
mediaRecorder = new MediaRecorder(stream);
|
||||
|
||||
mediaRecorder.ondataavailable = (event) => {
|
||||
if (event.data.size > 0) {
|
||||
console.log('Data available:', event.data.size);
|
||||
recordedChunks.push(event.data);
|
||||
}
|
||||
};
|
||||
|
||||
mediaRecorder.onstop = () => {
|
||||
console.log('Recording stopped. Creating blob.');
|
||||
if (recordedChunks.length > 0) {
|
||||
const blob = new Blob(recordedChunks, {
|
||||
type: 'video/webm'
|
||||
});
|
||||
const url = URL.createObjectURL(blob);
|
||||
video.src = url;
|
||||
downloadButton.href = url;
|
||||
downloadButton.download = 'recording.webm';
|
||||
downloadButton.disabled = false;
|
||||
} else {
|
||||
console.error('No recorded data available.');
|
||||
}
|
||||
};
|
||||
|
||||
mediaRecorder.start();
|
||||
startTimer();
|
||||
|
||||
startButton.disabled = true;
|
||||
stopButton.disabled = false;
|
||||
downloadButton.disabled = true;
|
||||
} catch (error) {
|
||||
console.error('Error: ' + error);
|
||||
}
|
||||
});
|
||||
|
||||
stopButton.addEventListener('click', () => {
|
||||
if (mediaRecorder && mediaRecorder.state !== 'inactive') {
|
||||
mediaRecorder.stop();
|
||||
stopTimer();
|
||||
|
||||
startButton.disabled = false;
|
||||
stopButton.disabled = true;
|
||||
} else {
|
||||
console.error('No active recording to stop.');
|
||||
}
|
||||
});
|
||||
|
||||
downloadButton.addEventListener('click', () => {
|
||||
if (recordedChunks.length > 0) {
|
||||
const blob = new Blob(recordedChunks, {
|
||||
type: 'video/webm'
|
||||
});
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.style.display = 'none';
|
||||
a.href = url;
|
||||
a.download = 'recording.webm';
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
recordedChunks = [];
|
||||
} else {
|
||||
console.error('No data available for download.');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
71
.hta_slug/slug-generator.php
Normal file
71
.hta_slug/slug-generator.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<section class="diZContainer diZmxAuto diZmy8">
|
||||
<h1 class="diZBorderBottom">Slug Generator</h1>
|
||||
<p class="diZTextJustify">The Slug Generator tool allows you to easily create SEO-friendly slugs from your input text. A slug is a URL-friendly version of a string, typically used in web addresses to identify a specific page or resource. This tool converts any text you input into a lowercase string, removes special characters, and replaces spaces with hyphens to generate a clean and readable URL slug.</p>
|
||||
<div class="diZMaxW600 diZmxAuto diZmy20 diZFlexColumn toolsSection">
|
||||
<textarea class="diZTextAreaResizeNone" placeholder="Enter text" id="inputText" rows="6"></textarea> <br>
|
||||
<button class="diZmxAuto" onclick="generateSlug()"><span>Generate Slug</span></button>
|
||||
<p id="copied-notice" class="diZDisplayNone"></p>
|
||||
<textarea id="slugOutput" class="diZTextAreaResizeNone diZDisplayNone diZmy4" rows="6"></textarea>
|
||||
<button id="copyBtn" class="diZDisplayNone diZmxAuto" onclick="copyToClipboard()"><span>Copy Slug</span></button>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><strong>Enter Text:</strong> Input your desired text into the text area provided.</li>
|
||||
<li><strong>Generate Slug:</strong> Click the "Generate Slug" button to convert the text into a URL-friendly slug.</li>
|
||||
<li><strong>Copy Slug:</strong> Once generated, the slug will appear in the output text area. Click the "Copy Slug" button to copy it to your clipboard.</li>
|
||||
<li><strong>Paste and Use:</strong> Paste the copied slug directly into your web application, blog post, or any other content management system (CMS) where you need a URL slug.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Features:</h3>
|
||||
<ul>
|
||||
<li>Converts text to lowercase.</li>
|
||||
<li>Removes special characters and replaces spaces with hyphens.</li>
|
||||
<li>Provides instant feedback with a "Slug copied to clipboard!" notification upon copying.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Example Use Cases:</h3>
|
||||
<ul>
|
||||
<li>Bloggers creating SEO-friendly URLs for their articles.</li>
|
||||
<li>Developers generating slugs for dynamic content pages.</li>
|
||||
<li>Content managers ensuring consistency and readability in URL structures.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
function generateSlug() {
|
||||
const inputText = document.getElementById('inputText').value;
|
||||
const slugOutput = document.getElementById('slugOutput');
|
||||
// Generate slug
|
||||
const slug = inputText.trim().toLowerCase().replace(/[^\w\s-]/g, '').replace(/\s+/g, '-');
|
||||
|
||||
// Update output textarea and display copy button
|
||||
if (slug.length > 0) {
|
||||
document.getElementById('copyBtn').style.display = 'block';
|
||||
slugOutput.style.display = 'block';
|
||||
slugOutput.value = slug;
|
||||
} else {
|
||||
document.getElementById('copyBtn').style.display = 'none';
|
||||
slugOutput.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
function copyToClipboard() {
|
||||
const slugOutput = document.getElementById('slugOutput');
|
||||
const textArea = document.createElement('textarea');
|
||||
textArea.value = slugOutput.value;
|
||||
document.body.appendChild(textArea);
|
||||
textArea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textArea);
|
||||
|
||||
// Show copied notice
|
||||
document.getElementById('copied-notice').innerHTML = 'Slug copied to clipboard!';
|
||||
document.getElementById('copied-notice').style.display = 'block';
|
||||
|
||||
// Hide notice after 1 second
|
||||
setTimeout(() => {
|
||||
document.getElementById('copied-notice').style.display = 'none';
|
||||
}, 1000);
|
||||
}
|
||||
</script>
|
||||
41
.hta_slug/speed-test.php
Normal file
41
.hta_slug/speed-test.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Internet Speed Test</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Internet Speed Test</h1>
|
||||
<button onclick="runSpeedTest()"><span>Run Speed Test</span></button>
|
||||
<div id="result"></div>
|
||||
|
||||
<script>
|
||||
function runSpeedTest() {
|
||||
var startTime = new Date().getTime();
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', '<?php echo $_SERVER['PHP_SELF']; ?>?action=speedtest');
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||
var endTime = new Date().getTime();
|
||||
var fileSize = parseInt(xhr.getResponseHeader('Content-Length'));
|
||||
var downloadTime = (endTime - startTime) / 1000; // in seconds
|
||||
var downloadSpeed = (fileSize / downloadTime / 1024).toFixed(2); // in KB/s
|
||||
document.getElementById('result').innerHTML = 'Download Speed: ' + downloadSpeed + ' KB/s';
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
if ($_GET['action'] == 'speedtest') {
|
||||
$fileUrl = 'https://videos.pexels.com/video-files/5532774/5532774-uhd_4096_2160_25fps.mp4?action=speedtest'; // URL to a sample file to download for the test
|
||||
$fileSize = filesize($fileUrl);
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Disposition: attachment; filename="samplefile.bin"');
|
||||
header('Content-Length: ' . $fileSize);
|
||||
readfile($fileUrl);
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
109
.hta_slug/type-1.php
Normal file
109
.hta_slug/type-1.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
require_once('.htac_header.php');
|
||||
require_once('.hta_config/db_config.php');
|
||||
?>
|
||||
|
||||
<section class="container-zz mx-auto">
|
||||
<h1 class="grid-container" style="font-size: 30px; font-weight: bold; padding-top: 20px; padding-bottom: 10px; border-bottom: 4px solid #FFF; margin-bottom: 20px;">SiliconPin - Tools</h1>
|
||||
<div class="grid-container" style="display: flex; flex-direction: row; overflow-x: auto; margin-bottom: 20px;">
|
||||
<a href="/tools/type/?type=image" class="type-button">Image</a>
|
||||
<a href="/tools/type/?type=text" class="type-button">Text</a>
|
||||
<a href="/tools/type/?type=html" class="type-button">HTML</a>
|
||||
<a href="/tools/type/?type=color" class="type-button">Color</a>
|
||||
<a href="/tools/type/?type=info" class="type-button">Info</a>
|
||||
<a href="/tools/type/?type=encrypt-decrypt" class="type-button">Encrypt / Decrypt</a>
|
||||
</div>
|
||||
<div class="grid-container">
|
||||
<?php
|
||||
try {
|
||||
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$stmt = $conn->prepare("SELECT * FROM api_tools WHERE `type` = :type");
|
||||
$stmt->bindParam(':type', $_GET['type'], PDO::PARAM_STR);
|
||||
$stmt->execute();
|
||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
// var_dump($rows);
|
||||
foreach($rows as $row){
|
||||
// echo $row['name'].'<br>';
|
||||
if($row['status']==1){
|
||||
$link_button = '<a href="/tools/'.$row['slug'].'" ><p style="background-color: #6d6d6d; padding: 6px 0px 6px 0px; border-radius: 10px;">'.$row['name'].'</p></a>';
|
||||
} else{
|
||||
$link_button = '<h2><p style="background-color: #6d6d6d; padding: 6px 0px 6px 0px; border-radius: 10px;">'.$row['name'].'</p></h2>';
|
||||
}
|
||||
echo '
|
||||
<div class="grid-item">
|
||||
<p class="line-clamp-2" style="text-align: justify;" >'.$row['description'].'</p>
|
||||
'.$link_button.'
|
||||
</div>';
|
||||
}
|
||||
} catch (PDOException $e) {
|
||||
$in_page_message = "<p class='text-danger'>Error: " . $e->getMessage() . "</p>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<style>
|
||||
.type-button{
|
||||
background-color: #3d3d3d;
|
||||
padding: 10px 20px 10px 20px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.container-zz{width:100%}@media (min-width: 640px){.container-zz{max-width:640px}}@media (min-width: 768px){.container-zz{max-width:768px}}@media (min-width: 1024px){.container-zz{max-width:1024px}}@media (min-width: 1280px){.container-zz{max-width:1280px}}@media (min-width: 1536px){.container-zz{max-width:1536px}}
|
||||
.mx-auto{margin-left:auto;margin-right:auto;
|
||||
padding: 10px;
|
||||
}
|
||||
.my-20{margin-top:5rem;margin-bottom:5rem}
|
||||
.grid-container {
|
||||
display: grid;
|
||||
grid-gap: 10px;
|
||||
margin: 0 auto;
|
||||
max-width: 1200px;
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
background-color: #3d3d3d;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
/* Mobile (up to 600px) */
|
||||
@media only screen and (max-width: 600px) {
|
||||
.grid-container {
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* Medium (601px - 1024px) */
|
||||
@media only screen and (min-width: 601px) and (max-width: 1024px) {
|
||||
.grid-container {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* Large (1025px and above) */
|
||||
@media only screen and (min-width: 1025px) {
|
||||
.grid-container {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
}
|
||||
.line-clamp-2 {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
.line-clamp-1 {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
#dynamicContent > img{
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
</style>
|
||||
19
.hta_slug/url-encode-url-decode.php
Normal file
19
.hta_slug/url-encode-url-decode.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
$encodedUrl='';
|
||||
$decodeddUrl='';
|
||||
if(isset($_POST['encode']) && isset($_POST['url_to_encode']) ) $encodedUrl=urlencode($_POST['url_to_encode']);
|
||||
if(isset($_POST['decode']) && isset($_POST['url_to_decode']) ) $decodeddUrl=urldecode($_POST['url_to_decode']);
|
||||
?>
|
||||
<br>
|
||||
|
||||
<form method="post">
|
||||
<input type="text" name="url_to_encode" >
|
||||
<input type="submit" name="encode" value="Encode">
|
||||
<span><?php echo $encodedUrl; ?></span>
|
||||
</form>
|
||||
<br>
|
||||
<form method="post">
|
||||
<input type="text" name="url_to_decode" >
|
||||
<input type="submit" name="decode" value="Decode">
|
||||
<span><?php echo $decodeddUrl; ?></span>
|
||||
</form>
|
||||
34
.hta_slug/weather.php
Normal file
34
.hta_slug/weather.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
echo 'Weather Report';
|
||||
?>
|
||||
<section>
|
||||
<div>
|
||||
<form id="cityForm" method="post" enctype="multipart/form-data">
|
||||
<input name="date" id="date" type="date">
|
||||
<!-- <select onchange="getWeatherReport()" name="city" id="city" style="background-color: #000;">
|
||||
<option value="London">London</option>
|
||||
<option value="Kolkata">Kolkata</option>
|
||||
<option value="Delhi">Delhi</option>
|
||||
</select> -->
|
||||
<button type="submit" name="submit" onsubmit="getCity();"><span>Click</span></button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
function getWeatherReport(){
|
||||
let formContent = document.getElementById('cityForm');
|
||||
let formData = new FormData(formContent)
|
||||
let url = 'https://apisp.dev2.cicdhosting.com/upload_file/v2/upload-weather.php';
|
||||
fetch(url,{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
.then(data => data.json())
|
||||
.then(data => {
|
||||
console.log(data)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
})
|
||||
}
|
||||
</script>
|
||||
46
.hta_slug/what-is-my-browser.php
Normal file
46
.hta_slug/what-is-my-browser.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
$user_agent = $_SERVER['HTTP_USER_AGENT'];
|
||||
|
||||
// Function to extract browser version from user agent string
|
||||
function get_browser_version($user_agent, $browser)
|
||||
{
|
||||
$pattern = '/' . $browser . '\/([^\s]+)/';
|
||||
if (preg_match($pattern, $user_agent, $matches)) {
|
||||
return $matches[1];
|
||||
}
|
||||
return 'Unknown';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="container-zz mx-auto">
|
||||
<div style="padding: 10px;">
|
||||
<!-- <h2 style="font-size: 25px;">Your User Agent is:</h2> -->
|
||||
<p style="font-size: 20px;">You are Using</p>
|
||||
|
||||
<?php
|
||||
// Additional description text based on common user agent patterns
|
||||
if (strpos($user_agent, 'Firefox') !== false) {
|
||||
echo "<div style='display:flex; flex-direction: row; align-items:center; font-size: 25px;'><img src='/assets/firefox.svg' alt='' /> <p> Mozilla Firefox " . get_browser_version($user_agent, 'Firefox') . ".</p></div>";
|
||||
} elseif (strpos($user_agent, 'Chrome') !== false) {
|
||||
echo "<div style='display:flex; flex-direction: row; align-items:center; font-size: 25px;'><img src='/assets/chrome.svg' alt='' /> <p> Google Chrome " . get_browser_version($user_agent, 'Chrome') . ".</p></div>";
|
||||
} elseif (strpos($user_agent, 'Safari') !== false) {
|
||||
echo "<div style='display:flex; flex-direction: row; align-items:center; font-size: 25px;'><img src='/assets/safari.svg' alt='' /> <p> Apple Safari " . get_browser_version($user_agent, 'Version') . ".</p></div>";
|
||||
} elseif (strpos($user_agent, 'Opera') !== false) {
|
||||
echo "<div style='display:flex; flex-direction: row; align-items:center; font-size: 25px;'><img src='/assets/opera.svg' alt='' /> <p> Opera " . get_browser_version($user_agent, 'OPR') . ".</p></div>";
|
||||
} elseif (strpos($user_agent, 'Edge') !== false) {
|
||||
echo "<div style='display:flex; flex-direction: row; align-items:center; font-size: 25px;'><img src='/assets/edge.svg' alt='' /> <p> Microsoft Edge " . get_browser_version($user_agent, 'Edge') . ".</p></div>";
|
||||
} elseif (strpos($user_agent, 'Trident') !== false) {
|
||||
echo "<div style='display:flex; flex-direction: row; align-items:center; font-size: 25px;'><img src='/assets/internet-exp.svg' alt='' /> <p> Internet Explorer " . get_browser_version($user_agent, 'rv') . ".</p></div>";
|
||||
} else {
|
||||
echo "<div style='display:flex; flex-direction: row; align-items:center; font-size: 25px;'><img src='/assets/no-br.svg' alt='' /> <p>We couldn't determine your browser from the user agent string.</p></div>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.container-zz{width:100%}@media (min-width: 640px){.container-zz{max-width:640px}}@media (min-width: 768px){.container-zz{max-width:768px}}@media (min-width: 1024px){.container-zz{max-width:1024px}}@media (min-width: 1280px){.container-zz{max-width:1280px}}@media (min-width: 1536px){.container-zz{max-width:1536px}}
|
||||
.mx-auto{margin-left:auto;margin-right:auto}
|
||||
.my-20{margin-top:5rem;margin-bottom:5rem}
|
||||
</style>
|
||||
34
.hta_slug/what-is-my-device.php
Normal file
34
.hta_slug/what-is-my-device.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
function is_mobile_device() {
|
||||
$user_agent = $_SERVER['HTTP_USER_AGENT'];
|
||||
$mobile_keywords = array('android', 'iphone', 'ipod', 'blackberry', 'opera mini', 'windows phone', 'iemobile');
|
||||
|
||||
foreach ($mobile_keywords as $keyword) {
|
||||
if (stripos($user_agent, $keyword) !== false) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_mobile_device()) {
|
||||
$device_name = "You're accessing from a mobile device.";
|
||||
} else {
|
||||
$device_name = "You're accessing from a desktop device.";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<section class="container-zz mx-auto my-20">
|
||||
<div style="font-size: 25px;">
|
||||
<p>Your Device System:</p>
|
||||
<h3><?php echo $device_name; ?></h3>
|
||||
</div>
|
||||
</section>
|
||||
<style>
|
||||
.container-zz{width:100%}@media (min-width: 640px){.container-zz{max-width:640px}}@media (min-width: 768px){.container-zz{max-width:768px}}@media (min-width: 1024px){.container-zz{max-width:1024px}}@media (min-width: 1280px){.container-zz{max-width:1280px}}@media (min-width: 1536px){.container-zz{max-width:1536px}}
|
||||
.mx-auto{margin-left:auto;margin-right:auto}
|
||||
.my-20{margin-top:5rem;margin-bottom:5rem}
|
||||
</style>
|
||||
96
.hta_slug/what-is-my-dns.php
Normal file
96
.hta_slug/what-is-my-dns.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
$errorMessage = "";
|
||||
$dns_records = [];
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
$domain = filter_input(INPUT_POST, 'domain', FILTER_SANITIZE_STRING);
|
||||
|
||||
if (filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)) {
|
||||
$dns_records = dns_get_record($domain, DNS_ALL);
|
||||
|
||||
if ($dns_records === false) {
|
||||
$errorMessage = "Unable to retrieve DNS records for domain: $domain";
|
||||
}
|
||||
} else {
|
||||
$errorMessage = "Invalid domain format: $domain";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<section class="diZContainer diZmxAuto diZmy4">
|
||||
<h2 class="diZBorderBottom">DNS records for domain: <?php echo htmlspecialchars($domain); ?></h2>
|
||||
|
||||
<div class="diZmy20 toolsSection diZMaxW700 diZmxAuto">
|
||||
<form action="" method="post">
|
||||
<div class="diZFlexColumn">
|
||||
<label for="domain">Enter domain:</label>
|
||||
<p class="diZDangerText"><?php echo htmlspecialchars($errorMessage); ?></p>
|
||||
<input type="text" id="domain" name="domain" placeholder="Enter Domain Name" required>
|
||||
<button class="diZmxAuto diZmt4" type="submit"><span>Check DNS</span></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php if (!empty($dns_records)) { ?>
|
||||
<div class="diZMaxW700 diZmxAuto diZOverflowXAuto">
|
||||
<table class="diZw100">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="diZTableBorder diZPadding5px">Type</th>
|
||||
<th class="diZTableBorder diZPadding5px">Host</th>
|
||||
<th class="diZTableBorder diZPadding5px">Class</th>
|
||||
<th class="diZTableBorder diZPadding5px">TTL</th>
|
||||
<th class="diZTableBorder diZPadding5px">Other</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($dns_records as $record) { ?>
|
||||
<tr>
|
||||
<td class="diZTableBorder diZPadding5px"><?php echo $record['type']; ?></td>
|
||||
<td class="diZTableBorder diZPadding5px"><?php echo $record['host']; ?></td>
|
||||
<td class="diZTableBorder diZPadding5px"><?php echo $record['class']; ?></td>
|
||||
<td class="diZTableBorder diZPadding5px"><?php echo $record['ttl']; ?></td>
|
||||
<td class="diZTableBorder diZPadding5px">
|
||||
<?php
|
||||
foreach ($record as $key => $value) {
|
||||
if (!in_array($key, ['type', 'host', 'class', 'ttl'])) {
|
||||
if (is_array($value)) {
|
||||
echo "$key: " . implode(', ', $value) . " <br>";
|
||||
} else {
|
||||
echo "$key: $value <br>";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div>
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li><strong>Enter Domain:</strong> Input the domain name you wish to check in the provided text field.</li>
|
||||
<li><strong>Check DNS:</strong> Click the "Check DNS" button to retrieve and display the DNS records for the entered domain.</li>
|
||||
<li><strong>View Results:</strong> The DNS records will be displayed in a tabular format, showing the type, host, class, TTL, and other relevant information for each record.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Features:</h3>
|
||||
<ul>
|
||||
<li>Supports all common DNS record types (A, AAAA, CNAME, MX, NS, TXT, etc.).</li>
|
||||
<li>Displays DNS records in a clear and organized table.</li>
|
||||
<li>Validates domain format before querying DNS records.</li>
|
||||
<li>Provides a user-friendly interface for easy DNS checking.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Example Use Cases:</h3>
|
||||
<ul>
|
||||
<li>Web administrators troubleshooting DNS issues for their domains.</li>
|
||||
<li>Developers needing to verify DNS settings for their applications.</li>
|
||||
<li>SEO specialists checking the DNS configuration of websites.</li>
|
||||
<li>Domain owners ensuring proper DNS setup and propagation.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
42
.hta_slug/what-is-my-ip-old.php
Normal file
42
.hta_slug/what-is-my-ip-old.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
require_once('.hta_config/siliconpin_sp.php');
|
||||
$publicIPv4 = file_get_contents('https://ipv4.icanhazip.com/');
|
||||
$publicIPv6 = @file_get_contents('https://ipv6.icanhazip.com/');
|
||||
$userIP = $_SERVER['REMOTE_ADDR'];
|
||||
$ipLocation = 'Unknown';
|
||||
$isp = 'Unknown';
|
||||
$ipLocationData = @file_get_contents("http://ip-api.com/json/$userIP");
|
||||
// $ipLocationData = @file_get_contents("http://ip-api.com/json/$userIP?fields=status,message,continent,continentCode,country,countryCode,region,regionName,city,district,zip,lat,lon,timezone,offset,currency,isp,org,as,asname,reverse,mobile,proxy,hosting,query");
|
||||
if ($ipLocationData !== false) {
|
||||
$ipLocationData = json_decode($ipLocationData, true);
|
||||
if (isset($ipLocationData['status']) && $ipLocationData['status'] == 'success') {
|
||||
$ipLocation = isset($ipLocationData['city']) ? $ipLocationData['city'] . ', ' . $ipLocationData['country'] : 'Unknown';
|
||||
$isp = isset($ipLocationData['isp']) ? $ipLocationData['isp'] : 'Unknown';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<?php
|
||||
$web_page_title = 'Your IP Address - siliconpin.com';
|
||||
$web_page_meta_description = 'Find out your current IP address';
|
||||
$web_page_meta_keywords = 'IP address, internet, network';
|
||||
$web_page_author = 'Your Name';
|
||||
$web_page_meta_og_title = $web_page_title;
|
||||
$web_page_meta_og_description = $web_page_meta_description;
|
||||
$web_page_meta_og_image = ''; // Add URL to an image if desired
|
||||
$web_page_meta_og_url = 'http://siliconpin.com/what-is-my-ip'; // Update URL
|
||||
$web_page_meta_twitter_title = $web_page_title;
|
||||
$web_page_meta_twitter_description = $web_page_meta_description;
|
||||
$web_page_meta_twitter_image = ''; // Add URL to an image if desired
|
||||
$web_page_meta_twitter_card = 'summary'; // or 'summary_large_image' if you have a large image
|
||||
require_once('.htac_header.php');
|
||||
require_once('.htac_nav.php');
|
||||
?>
|
||||
<section class="container mx-auto custom-container" style="margin-top: 100px; margin-bottom: 10px;">
|
||||
<p><?php echo "My Public IPv4: $publicIPv4 <br>"; ?></p>
|
||||
<p><?php echo "My Public IPv6: " . ($publicIPv6 ? $publicIPv6 : 'IPv6 not supported or unavailable') . "<br>"; ?></p>
|
||||
<p><?php echo "My IP Location: $ipLocation <br>"; ?></p>
|
||||
<p><?php echo "My ISP: $isp"; ?></p>
|
||||
</section>
|
||||
<?php
|
||||
?>
|
||||
17
.hta_slug/what-is-my-ip.php
Normal file
17
.hta_slug/what-is-my-ip.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$ipv4 = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
// Get the IPv6 address of the client if available
|
||||
$ipv6 = $_SERVER['REMOTE_ADDR'];
|
||||
if (strpos($ipv6, ":") !== false) {
|
||||
// IPv6 address detected
|
||||
$ipv6 = explode("%", $ipv6)[0]; // Remove interface suffix, if any
|
||||
} else {
|
||||
// No IPv6 address detected
|
||||
$ipv6 = "IPv6 not available";
|
||||
}
|
||||
|
||||
// Display IPv4 and IPv6 addresses
|
||||
echo "IPv4 Address: " . $ipv4 . "<br>";
|
||||
echo "IPv6 Address: " . $ipv6 . "<br>";
|
||||
?>
|
||||
12
.hta_slug/what-is-my-operating-system.php
Normal file
12
.hta_slug/what-is-my-operating-system.php
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
<section class="container-zz mx-auto my-20">
|
||||
<div style="font-size: 25px;">
|
||||
<p>Your Operating System:</p>
|
||||
<h3><?php echo php_uname(); ?></h3>
|
||||
</div>
|
||||
</section>
|
||||
<style>
|
||||
.container-zz{width:100%}@media (min-width: 640px){.container-zz{max-width:640px}}@media (min-width: 768px){.container-zz{max-width:768px}}@media (min-width: 1024px){.container-zz{max-width:1024px}}@media (min-width: 1280px){.container-zz{max-width:1280px}}@media (min-width: 1536px){.container-zz{max-width:1536px}}
|
||||
.mx-auto{margin-left:auto;margin-right:auto}
|
||||
.my-20{margin-top:5rem;margin-bottom:5rem}
|
||||
</style>
|
||||
48
.hta_slug/what-is-my-screen-resolution.php
Normal file
48
.hta_slug/what-is-my-screen-resolution.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<div class="container-zz mx-auto my-20">
|
||||
<div style="display: flex; flex-direction: column; justify-content: center; align-items:center;">
|
||||
<h2 style="font-size: 25px;">Your Screen Resolution:</h2>
|
||||
<p style="font-size: 25px; text-align: center;" id="resolution"></p>
|
||||
<p style="font-size: 25px; text-align: center;" id="innerRes"></p>
|
||||
<!-- <p style="font-size: 25px; text-align: center;" id="asperatio"></p> -->
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var screenWidth = window.screen.width;
|
||||
var screenHeight = window.screen.height;
|
||||
document.getElementById('resolution').innerHTML = "This is widescreen resolution - " + "Width: " + screenWidth + " x " + "Height: " + screenHeight + " Pixels";
|
||||
|
||||
|
||||
var inner_width = window.innerWidth;
|
||||
var inner_height = window.innerHeight;
|
||||
document.getElementById('innerRes').innerHTML = "This is browser's inner resolution - " + "Width: " + inner_width + " x " + "Height: " + inner_height + " Pixels";
|
||||
|
||||
function getAspectRatio() {
|
||||
const width = screen.width;
|
||||
const height = screen.height;
|
||||
|
||||
// Calculate the greatest common divisor (GCD) for cleaner ratio representation
|
||||
function gcd(a, b) {
|
||||
return (b === 0) ? a : gcd(b, a % b);
|
||||
}
|
||||
const divisor = gcd(width, height);
|
||||
|
||||
// Simplify width and height by dividing with GCD
|
||||
const simplifiedWidth = width / divisor;
|
||||
const simplifiedHeight = height / divisor;
|
||||
|
||||
return `${simplifiedWidth}:${simplifiedHeight}`;
|
||||
}
|
||||
|
||||
// Example usage
|
||||
const aspectRatio = getAspectRatio();
|
||||
// document.getElementById('asperatio').innerHTML = aspectRatio;
|
||||
// console.log("Screen aspect ratio:", aspectRatio);
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.container-zz{width:100%}@media (min-width: 640px){.container-zz{max-width:640px}}@media (min-width: 768px){.container-zz{max-width:768px}}@media (min-width: 1024px){.container-zz{max-width:1024px}}@media (min-width: 1280px){.container-zz{max-width:1280px}}@media (min-width: 1536px){.container-zz{max-width:1536px}}
|
||||
.mx-auto{margin-left:auto;margin-right:auto}
|
||||
.my-20{margin-top:5rem;margin-bottom:5rem}
|
||||
</style>
|
||||
35
.hta_slug/what-is-my-user-agent.php
Normal file
35
.hta_slug/what-is-my-user-agent.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
$user_agent = $_SERVER['HTTP_USER_AGENT'];
|
||||
?>
|
||||
|
||||
<div class="container-zz mx-auto">
|
||||
<div style="padding: 10px;">
|
||||
<h2 style="font-size: 25px;">Your User Agent is:</h2>
|
||||
<p style="font-size: 25px;"><?php echo $user_agent; ?></p>
|
||||
|
||||
<?php
|
||||
// Additional description text based on common user agent patterns
|
||||
if (strpos($user_agent, 'Firefox') !== false) {
|
||||
echo "<p style='font-size: 20px;'>Used Browser Mozilla Firefox.</p>";
|
||||
} elseif (strpos($user_agent, 'Chrome') !== false) {
|
||||
echo "<p style='font-size: 20px;'>Used Browser Google Chrome.</p>";
|
||||
} elseif (strpos($user_agent, 'Safari') !== false) {
|
||||
echo "<p style='font-size: 20px;'>Used Browser Apple Safari.</p>";
|
||||
} elseif (strpos($user_agent, 'Opera') !== false) {
|
||||
echo "<p style='font-size: 20px;'>Used Browser Opera.</p>";
|
||||
} elseif (strpos($user_agent, 'Edge') !== false) {
|
||||
echo "<p style='font-size: 20px;'>Used Browser Microsoft Edge.</p>";
|
||||
} elseif (strpos($user_agent, 'Trident') !== false) {
|
||||
echo "<p style='font-size: 20px;'>Used Browser Internet Explorer.</p>";
|
||||
} else {
|
||||
echo "<p style='font-size: 20px;'>We couldn't determine your browser from the user agent string.</p>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.container-zz{width:100%}@media (min-width: 640px){.container-zz{max-width:640px}}@media (min-width: 768px){.container-zz{max-width:768px}}@media (min-width: 1024px){.container-zz{max-width:1024px}}@media (min-width: 1280px){.container-zz{max-width:1280px}}@media (min-width: 1536px){.container-zz{max-width:1536px}}
|
||||
.mx-auto{margin-left:auto;margin-right:auto}
|
||||
.my-20{margin-top:5rem;margin-bottom:5rem}
|
||||
</style>
|
||||
74
.hta_slug/who-is.php
Normal file
74
.hta_slug/who-is.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<section class="diZContainer diZmxAuto">
|
||||
<h2 class="diZBorderBottom">Ultimate Domain & IP Lookup Tool</h2>
|
||||
<p class="diZmb20">This tool allows you to perform a comprehensive lookup of domain names or IP addresses, providing detailed WHOIS information.</p>
|
||||
<form method="post" class="diZToolsSection diZmt4 diZmb4 diZBorderRadius diZPadding5px ">
|
||||
<div class="diZFlexRowCol diZJustifyCenter diZItemsCenter ">
|
||||
<input class="diZmr2 diZw70" placeholder="Domain" name="domain" type="text" />
|
||||
<p class="diZmr2">OR</p>
|
||||
<input class="diZmr2 diZw70" placeholder="IP Address" name="ip" type="text" />
|
||||
<button type="submit"><span>Check</span></button>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
if(isset($_POST['domain']) && $_POST['domain']){
|
||||
function validateDomain($domain) {
|
||||
$regex = "/^(?!\-)(?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]\.)+[a-zA-Z]{2,}$/";
|
||||
if (preg_match($regex, $domain)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$domain = isset($_POST['domain']) ? $_POST['domain'] : '';
|
||||
if ($domain && validateDomain($domain)) {
|
||||
$command = 'whois '.$_POST['domain'];
|
||||
$escaped_command = escapeshellcmd($command);
|
||||
$output = shell_exec($escaped_command);
|
||||
echo '<div class="diZContainer diZmxAuto diZPadding5px"><pre class="diZTextJustify" style="width: fit-content;"> ',$output, '</pre> <br><br></div>';
|
||||
} else {
|
||||
echo "Invalid domain.";
|
||||
}
|
||||
}
|
||||
if(isset($_POST['ip']) && $_POST['ip']){
|
||||
function validatePublicIp($ip) {
|
||||
if (filter_var($ip, FILTER_VALIDATE_IP)) {
|
||||
if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
$ip = isset($_POST['ip']) ? $_POST['ip'] : '';
|
||||
if ($ip && validatePublicIp($ip)) {
|
||||
$command = 'whois '.$_POST['ip'];
|
||||
$escaped_command = escapeshellcmd($command);
|
||||
$output = shell_exec($escaped_command);
|
||||
echo '<div class="diZContainer diZmxAuto diZPadding5px"><pre> ',$output, '</pre> <br><br></div>';
|
||||
} else {
|
||||
echo "Invalid IP address.";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div>
|
||||
<h3>Usage:</h3>
|
||||
<ul>
|
||||
<li>Enter a domain name or an IP address into the respective input field.</li>
|
||||
<li>Click the "Check" button to retrieve WHOIS information.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Features:</h3>
|
||||
<ul>
|
||||
<li>Supports lookup for both domain names and IP addresses.</li>
|
||||
<li>Displays WHOIS data including registration details and administrative contacts.</li>
|
||||
<li>Secure input validation to ensure accurate results.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Example Use Cases:</h3>
|
||||
<ul>
|
||||
<li>Investigate ownership and registration details of a domain.</li>
|
||||
<li>Check the WHOIS information of an IP address for network troubleshooting.</li>
|
||||
<li>Verify domain availability and registration status.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user