Mi esce Warning: rename(,/tmp/69f728459ca34ae624a4ed7ef4e650aa.jpg) [function.rename]: No such file or directory in /homez.406/epicfailh/www/imagem.php on line 4
dove sbaglio?
ho fatto questo:
codice:<?php preg_match("/\.(gif|bmp|png|jpg|jpeg){1}$/i", $_FILES['foto']['http://www.repubblica.it/images/2011/03/03/162225740-191299b9-bfd5-4831-b945-1375c43ac90c.jpg'], $ext); $imagem_nome = md5(uniqid(time())) . "." . $ext[1]; rename($_FILES['foto']['tmp_name'], "/tmp/" . $imagem_nome); $postData = array(); $postData['fileupload'] = "@/tmp/" . $imagem_nome; $postData['submit'] = "Submit"; $postData['key'] = "48FOPUVW3dfcb3dd7f5bf93120a456040cb2b51d"; $postData['rembar'] = "yes"; $postData['xml'] = "yes"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.imageshack.us/index.php"); curl_setopt($ch, CURLOPT_POST, true ); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); curl_setopt($ch, CURLOPT_TIMEOUT, 240);curl_setopt($ch, CURLOPT_POSTFIELDS, $postData ); $response = curl_exec( $ch ); curl_close($ch ); echo $response; ?>

Rispondi quotando