const { useState, useRef } = React; function ConverterForm({ onSuccess }) { const [loading, setLoading] = useState(false); const [result, setResult] = useState(null); const formRef = useRef(null); const handleSubmit = async (e) => { e.preventDefault(); const formData = new FormData(formRef.current); const fileInput = formData.get('file'); if (!fileInput || fileInput.name === '') { setResult({ type: 'error', message: 'الرجاء اختيار ملف' }); return; } setLoading(true); setResult(null); try { const res = await fetch('conv.php', { method: 'POST', body: formData }); const data = await res.json(); if (data.status === 'success') { setResult({ type: 'success', url: data.url, message: data.message }); formRef.current.reset(); if (onSuccess) onSuccess(); } else { setResult({ type: 'error', message: data.message || 'حدث خطأ غير معروف' }); } } catch (err) { setResult({ type: 'error', message: 'حدث خطأ في الاتصال بالخادم' }); } finally { setLoading(false); } }; return (

محول ترميز الهاكات

قم بتحويل ترميز ملفات الهاكات (XML) من الترميز اللاتيني القديم إلى ترميز UTF-8 العالمي بضغطة زر واحدة، لتعمل بسلاسة في منتداك!

حجم الملف يجي ان لا يتجاوز 50 كيلوبايت اذا كان حجم الملف اكبر من ذلك راسلنا لتحويله.
اسم سوف يظهر عند عرض الهاك في قسم الهاكات.
{result && result.type === 'success' && (

{result.message}

تحميل الملف
)} {result && result.type === 'error' && (
{result.message}
)}
); }