static function convertContent($document, $id, $news = 'news') { return ''; require_once ROOT_PATH . "includes/client.class.php"; $check = new client_php(); $path = AZLib::uploadImgPath($news); $link = str_replace(ROOT_PATH, '', AznetLib::uploadImgPath($news)); $document = $check->getimage($document, $path, $id, $link); return $document; }
function getimagefile($urltofile, $pathtoputfile, $id, $stt) { $path_parts = pathinfo($urltofile); $extension = $path_parts["extension"]; if ($extension == "") { $extension = "jpg"; } $this->filename = $id . "_" . $stt . "." . $extension; if ($stt == "0") { $this->filename = $id . "." . $extension; } $asd = new client_php(); $asd->fetch($urltofile); $f = fopen($pathtoputfile . $this->filename, "a"); fwrite($f, $asd->results); fclose($f); unset($urltofile); unset($pathtoputfile); unset($id); unset($stt); return true; }