Üşenmedim yaptım
İşine yarayacak arkadaş varsa aşağıdaki kodları kullanabilir. Denedim sorunsuz çalışıyor.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Sayıdan Yazıya</title>
</head>
<body>
<form action="" method="post">
<input type="text" name="sayi" placeholder="Çevirilecek sayı" value="<?php echo @$_POST['sayi'] ?>" />
<input type="submit" value="Çevir" />
</form>
<?php
if($_POST){
$ch = curl_init('http://biltek.tubitak.gov.tr/sandik/sayicevir/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, True);
curl_setopt($ch, CURLOPT_POST, True);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'sayi=' . $_POST['sayi'] . '&tip=kendi&cevir=Çevir');
$source = curl_exec($ch);
curl_close($ch);
preg_match('~</font> (.*?)</td>~si', $source, $result);
$result = iconv('windows-1254', 'UTF-8', $result[1]);
echo $result;
}
?>
</body>
</html>