PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php error_reporting(E_ALL); ini_set('display_errors', 'On'); header("content-type: text/html; charset=utf-8"); if (isset($_FILES['resim']['name']) && !empty($_FILES['resim']['name'])) { $resim = "resimler/haber_" . rand(1, 100000) . "-" . rand(1, 10043464) . ".jpg"; move_uploaded_file($_FILES['resim']['tmp_name'], $resim); } $xml = '<?xml version="1.0" encoding="utf-8"?>'; $xml.= '<haber>'; $xml.= '<baslik><![CDATA[' . $_POST['baslik'] . ']]></baslik>'; $xml.= '<detay><![CDATA[' . $_POST['detay'] . ']]></detay>'; $xml.= '<date><![CDATA[' . $_POST['date'] . ']]></date>'; $xml.= '<resim><![CDATA[http://' . $_SERVER['SERVER_NAME'] . '/esbot/' . $resim . ']]></resim>'; $xml.= '</haber>'; $xml_name = "xml/" . time() . rand(0, 9999) . ".xml"; $fp = fopen($xml_name, "w"); fwrite($fp, $xml); fclose($fp); foreach ($_POST['hedef'] as $hedef) { echo file_get_contents("http://" . $hedef . "/botapi/haberekle.php?xml=" . urlencode("http://" . $_SERVER['SERVER_NAME'] . "/esbot/" . $xml_name)); } unlink($xml_name);
Show:  
Copy Clear