انشاء موقع تحويل روابط لمواقع اخرى مع كود لوضعه بالمواقع لتحويل اى رابط بصفحة تحويل روابط تحتوى على عداد وتحويل مباشر واماكن للاعلانات وتظهر داخل الصفحة
كيفية انشاء موقع تحويل روابط لمواقع اخرى
لإنشاء موقع تحويل روابط يحتوي على صفحة تحويل تشمل:
عداد تنازلي (Countdown Timer)
تحويل تلقائي بعد انتهاء العداد
أماكن مخصصة للإعلانات
كود يمكن وضعه داخل مواقع أخرى لتحويل أي رابط عبر صفحة التحويل
سأعطيك أولاً كود صفحة تحويل الروابط، ثم سكربت يمكن تضمينه في المواقع الأخرى.
✅ 1. كود صفحة تحويل الروابط (redirect.html)
.code-box {
position: relative;
background: #272822;
color: #f8f8f2;
border-radius: 10px;
padding: 15px;
margin: 20px auto;
font-family: monospace;
direction: ltr;
overflow: auto;
}
.code-box textarea {
width: 100%;
height: 250px;
background: transparent;
border: none;
color: #f8f8f2;
resize: none;
font-size: 14px;
outline: none;
}
.code-buttons {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 10px;
}
.code-buttons button {
padding: 8px 12px;
background-color: #007BFF;
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
transition: 0.3s;
}
.code-buttons button:hover {
background-color: #0056b3;
}
جارٍ تحويلك…
body {
font-family: Arial, sans-serif;
text-align: center;
padding: 50px;
direction: rtl;
background: #f4f4f4;
}
.container {
background: #fff;
padding: 30px;
border-radius: 15px;
max-width: 600px;
margin: auto;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.ads {
margin: 20px 0;
background: #ddd;
padding: 20px;
border-radius: 10px;
}
#countdown {
font-size: 24px;
color: #e74c3c;
}
يرجى الانتظار، سيتم تحويلك خلال 10 ثوانٍ
إعلان هنا
إعلان آخر هنا
إذا لم يتم التحويل تلقائياً، اضغط هنا.
const params = new URLSearchParams(window.location.search);
const url = params.get(“url”);
if (!url) {
document.body.innerHTML = “
الرابط غير موجود
“;
} else {
document.getElementById(“manualLink”).href = url;
let countdown = 10;
const countdownElement = document.getElementById(“countdown”);
const interval = setInterval(() => {
countdown–;
countdownElement.textContent = countdown;
if (countdown <= 0) {
clearInterval(interval);
window.location.href = url;
}
}, 1000);
}
function copyCode() {
const code = document.getElementById(“myCode”);
code.select();
document.execCommand(“copy”);
alert(“تم نسخ الكود!”);
}
function downloadCode() {
const code = document.getElementById(“myCode”).value;
const blob = new Blob(, { type: “text/plain” });
const link = document.createElement(“a”);
link.href = URL.createObjectURL(blob);
link.download = “code.html”;
link.click();
}
function clearCode() {
if (confirm(“هل أنت متأكد من مسح الكود؟”)) {
document.getElementById(“myCode”).value = “”;
}
}
✅ 2. سكربت تضمينه في المواقع الأخرى لتحويل أي رابط عبر صفحة التحويل
يمكنك وضع هذا السكربت في أي موقع:
.code-box {
position: relative;
background: #272822;
color: #f8f8f2;
border-radius: 10px;
padding: 15px;
margin: 20px auto;
font-family: monospace;
direction: ltr;
overflow: auto;
}
.code-box textarea {
width: 100%;
height: 250px;
background: transparent;
border: none;
color: #f8f8f2;
resize: none;
font-size: 14px;
outline: none;
}
.code-buttons {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 10px;
}
.code-buttons button {
padding: 8px 12px;
background-color: #007BFF;
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
transition: 0.3s;
}
.code-buttons button:hover {
background-color: #0056b3;
}
function redirectViaService(targetUrl) {
// غيّر الرابط أدناه إلى رابط صفحة التحويل الخاصة بك
const redirectPage = “https://example.com/redirect.html”;
window.location.href = `${redirectPage}?url=${encodeURIComponent(targetUrl)}`;
}
// مثال على الاستخدام:
// redirectViaService(“https://www.google.com”);
function copyCode() {
const code = document.getElementById(“myCode”);
code.select();
document.execCommand(“copy”);
alert(“تم نسخ الكود!”);
}
function downloadCode() {
const code = document.getElementById(“myCode”).value;
const blob = new Blob(, { type: “text/plain” });
const link = document.createElement(“a”);
link.href = URL.createObjectURL(blob);
link.download = “code.html”;
link.click();
}
function clearCode() {
if (confirm(“هل أنت متأكد من مسح الكود؟”)) {
document.getElementById(“myCode”).value = “”;
}
}
أو يمكنك استخدامه مع روابط مباشرة مثل:
.code-box {
position: relative;
background: #272822;
color: #f8f8f2;
border-radius: 10px;
padding: 15px;
margin: 20px auto;
font-family: monospace;
direction: ltr;
overflow: auto;
}
.code-box textarea {
width: 100%;
height: 250px;
background: transparent;
border: none;
color: #f8f8f2;
resize: none;
font-size: 14px;
outline: none;
}
.code-buttons {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 10px;
}
.code-buttons button {
padding: 8px 12px;
background-color: #007BFF;
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
transition: 0.3s;
}
.code-buttons button:hover {
background-color: #0056b3;
}
function copyCode() {
const code = document.getElementById(“myCode”);
code.select();
document.execCommand(“copy”);
alert(“تم نسخ الكود!”);
}
function downloadCode() {
const code = document.getElementById(“myCode”).value;
const blob = new Blob(, { type: “text/plain” });
const link = document.createElement(“a”);
link.href = URL.createObjectURL(blob);
link.download = “code.html”;
link.click();
}
function clearCode() {
if (confirm(“هل أنت متأكد من مسح الكود؟”)) {
document.getElementById(“myCode”).value = “”;
}
}
✅ ملاحظات إضافية
تأكد من استضافة صفحة redirect.html على موقعك (مثلاً: https://example.com/redirect.html)
يمكنك استخدام إعلانات Google AdSense أو أي شبكة إعلانية ضمن أماكن الإعلانات داخل الصفحة.
يمكن تحسين التصميم أو جعل العداد أطول / أقصر حسب حاجتك.
هل تحب أضيف لك لوحة تحكم لإحصائيات أو توليد روابط قصيرة مثلاً؟


أضف تعليق