1. <?
  2. $file = 'Lululululu.mp3';
  3. $url = 'http://www.upf.co.il/ubr_link_upload.php?_='.JS_Time();
  4. $reffer = "http://www.upf.co.il/";
  5. $agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4)Gecko/20030624 Netscape/7.1 (ax)";
  6. $page = @file($url);
  7. if($page[0] !== false){
  8. preg_match('#startUpload\("([^"]+)"#', $page[0], $id);
  9. $id = trim($id[1]);
  10. $link = 'http://www.upf.co.il/cgi-bin/upload.pl?upload_id='.$id;
  11. $postcontent = array();
  12. $postcontent['upfile_'.JS_Time()] = '@'.$file;
  13. $postcontent['myemail'] = '[email protected]';
  14. $postcontent['des'] = 'Uploaded by me';
  15. $postcontent['pprotect'] = '';
  16. $postcontent['confirmTos'] = '1';
  17. $postcontent['InSearch'] = 'false';
  18. $ch = curl_init();
  19. curl_setopt($ch,CURLOPT_URL,$link);
  20. curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,2);
  21. curl_setopt($ch,CURLOPT_POST,1);
  22. curl_setopt($ch,CURLOPT_POSTFIELDS,$postcontent);
  23. curl_setopt($ch,CURLOPT_USERAGENT, $agent);
  24. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  25. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  26. curl_setopt($ch, CURLOPT_REFERER, $reffer);
  27. $result=curl_exec($ch);
  28. curl_close($ch);
  29. echo $result;
  30. ?>