
yapmaya çalıştığım şey ise şu dosya.php?tur=$sorun&ip=$ip url olarak sanal sunucudan bu urlye istek yolladığında mysql e yazdıracak ama yapmayı bilmiyorum rica etsem bilen bir arkadaş el atabilir mi ?
curl --data "tur=$sorun&ip=$ip" $server/script/sorun/saveto.php >/dev/null 2>&1
mysql

<?php
try{
$db = new PDO("mysql:host=localhost;dbname=test;charset=utf8", "root", "");
} catch ( PDOException $e ){
print $e->getMessage();
}
print_r ($db);
if($db){
echo "test database bağlanıldı.";
}
if($query = $db->prepare("INSERT INTO wp_posts SET post_title = ?, post_content= ? ")){
$baslik = 'kahve';
$icerik = 'türk kahvesi';
$result = $query->execute(array($baslik,$icerik));
if($result){
$last_id = $db ->lastInsertId();
print '<p>insert işlemi başarılı. #'.$last_id.'<p>';
}
}else{
echo '<p>Sorguda bir hata meydana geldi.<p>';
$error = $db->errorInfo();
echo 'Hata mesajı: ' . $error[2];
}
?>