Here is alternative that can be hosted.
On your hosting create a php file in it do the following.
<?php
// Initialize variables
$originalUrl = '';
$convertedUrl = '';
// Check if the form was submitted
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Get the URL from the form
$originalUrl = $_POST['url'];
// Check if the URL contains "
www.dropbox.com"
if (strpos($originalUrl, '
www.dropbox.com') !== false) {
// Replace "
www.dropbox.com" with "
dl.dropboxusercontent.com"
$convertedUrl = str_replace('
www.dropbox.com', '
dl.dropboxusercontent.com', $originalUrl);
} else {
echo 'The URL does not match the expected pattern. Code might be already converted';
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Download code URL converter</title>
<script>
function copyToClipboard() {
// Get the text from the converted URL text box
var copyText = document.getElementById("convertedUrl");
// Select the text
copyText.select();
copyText.setSelectionRange(0, 99999); // For mobile devices
// Copy the text to the clipboard
document.execCommand("copy");
// Deselect the text
copyText.blur();
// Display a confirmation message
alert("Copied to clipboard: " + copyText.value);
}
</script>
</head>
<body>
<h1>Download code URL converter</h1>
<form method="post">
<label for="url">Enter URL:</label>
<input type="text" id="url" name="url" required value="<?php echo $originalUrl; ?>">
<button type="submit">Submit</button>
</form>
<br>
<?php if (!empty($convertedUrl)) : ?>
<label for="convertedUrl">Converted URL:</label>
<input type="text" id="convertedUrl" value="<?php echo $convertedUrl; ?>" readonly>
<button onclick="copyToClipboard()">Copy to Clipboard</button>
<?php endif; ?>
</body>
</html>