Mình có code tạo file trên xtgem ,nhưng mình muốn nó tạo thêm 1 file nữa ,và thêm curl gì đó để chữ có dấu thành chữ thường (cái $title)
Đây là code
PHP
<?php function md_set_file($tao,$content_file){ @set_time_limit(0); include 'postv.php'; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, $ua); curl_setopt($ch, CURLOPT_URL, $auto); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); curl_exec($ch); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie); curl_setopt($ch, CURLOPT_URL, 'http://'.$sever.'/filebrowser'); $nd = curl_exec($ch); preg_match('#token=(.*?)&#is', $nd, $matoken);$token = @$matoken[1]; curl_setopt($ch, CURLOPT_URL, 'http://'.$sever.'/filebrowser/file_save?__token='.$token.'&&act=edit_file&&file=/truyen/data/'.$tao.''); curl_setopt($ch, CURLOPT_POSTFIELDS, array('value' => $content_file, 'submit' => 'Save')); curl_exec($ch); curl_close($ch); } if (isset($_POST['title'])){ $tao = $_POST['title']; $title = $_POST['title']; $info = $_POST['info']; md_set_file($tao,'[ten]'.$title.'[/ten] [info]'.$info.'[/info]'); header('Location: http://truyen04.hexat.com/dang-bai?p=1'); } ?>