فايل هاي اسكي رو ميتونيد اينجوري بخونيد
$numofbytes=10240 ; // dar inja maikham 10K byte ro bekhoonam . mitoni ino edit koni be chizi ke mikhay
$fp=fopen("http://masirefile","r");
$readedbytes=0;
$file_content="";// mohtaviate filet to in variable mirizim
while($readedbytes<$numofbytes){ to in loop mohtaviate file ro 1K 1K mikhoonam (yeja nemishe khond)
$file_content .=fread($fp,1024);
$readedbytes +=1024 ;
}
echo $file_content ; // file ke khondi ro chap kon