View Single Post
Old 08-16-2007, 11:00 AM  
Emil
Confirmed User
 
Emil's Avatar
 
Join Date: Feb 2007
Location: Sweden
Posts: 5,651
How do I insert referer-URL into this PHP-function?

Can anyone help me with this?
I want to insert a fake-referer-url into this function, does anyone know how to do it?
Code:
function download($file_source, $file_target) {
      $rh = fopen($file_source, 'rb');
      $wh = fopen($file_target, 'wb');
      if ($rh===false || $wh===false) {
              // error reading or opening file
              return false;
      }
      while(!feof($rh)) {
              if (fwrite($wh, fread($rh, 1024)) === FALSE) {
                 // 'Download error: Cannot write to file ('.$file_target.')';
                 return false;
              }
      }
      fclose($rh);
      fclose($wh);
      // No error
      return true;
__________________
Free 🅑🅘🅣🅒🅞🅘🅝🅢 Every Hour (Yes, really. Free ₿itCoins.)
(Signup with ONLY your Email and Password. You can also refer people and get even more.)
Emil is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote