Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 PHP Code: Copy a remote file to your site Jump to:  
Category: >> PHP Code >> Copy a remote file to your site Bookmark and Share

<< lastnext >>

Snippet Name: Copy a remote file to your site

Description: Copies any file (image, zip, swf, etc) from a remote site to a file on your site.

Also see:
» Saving Remote Images With PHP
» Copy a remote file to your site
» Random Image from Directory
» Read gzip File
» Create gzip file
» Simple image scaling
» Show current time as PNG-image
» Check if an image exists (GD)
» Gradient Image Generator
» Show basic image info
» Write text onto an image
» Remote file_exist()
» Storing images in a database
» Make grayscaled image
» CAPTCHA w/ GD Image Library
» Calculate Zipcode Distances

Comment: (none)

Language: PHP
Highlight Mode: PHP
Last Modified: March 16th, 2009

FUNCTION copy_file($url,$filename){
 
	$file = FOPEN ($url, "rb");
 
	IF (!$file) RETURN FALSE; ELSE {
		$fc = FOPEN($filename, "wb");
 
		WHILE (!FEOF ($file)) {
			$line = FREAD ($file, 1028);
			FWRITE($fc,$line);
		}
 
		FCLOSE($fc);
		RETURN TRUE;
	}
}


Free
Oracle Magazine
Subscriptions
and Oracle White Papers


SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 48 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?