Forums Gallery Movies File Hosting Classifieds Jokes Free Hosting Free Blogs

Go Back   BizHat Forums > Computer Forum > PHP Programming

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-11-2008, 02:30 PM
Administrator
Site Admin
 
Join Date: Sep 2003
Posts: 2,689
Default Download file using curl

Here is a php function to download files from remote server using curl.

$remote is url of source file.
$local is path where you need the file saved after download.


PHP Code:
function curl_download($remote$local)    {
    
$cp curl_init($remote);
    
$fp fopen($local"w");
    
    
curl_setopt($cpCURLOPT_FILE$fp);
    
curl_setopt($cpCURLOPT_HEADER0);
    
    
curl_exec($cp);
    
curl_close($cp);
    
fclose($fp);    


__________________
BizHat Games BizHat Video
Reply With Quote
  #2 (permalink)  
Old 08-20-2008, 07:56 AM
Administrator
Site Admin
 
Join Date: Jun 2008
Posts: 342
Default PDF_open_file

PDF_open_file

(PHP 4 >= 4.0.5, PECL pdflib:1.0-2.1.3)
PDF_open_file — Create PDF file [deprecated]

Description.

bool PDF_open_file ( resource $p , string $filename )


Creates a new PDF file using the supplied file name. Returns TRUE on success or FALSE on failure.
This function is deprecated since PDFlib version 6, use PDF_begin_document() instead.
Reply With Quote
  #3 (permalink)  
Old 09-18-2008, 11:48 AM
Senior Member
BizHat Geek
 
Join Date: Jan 2006
Location: Press F13 to find the location
Posts: 619
Send a message via AIM to tuluvaguy Send a message via MSN to tuluvaguy Send a message via Yahoo to tuluvaguy
Default

A nice information. Will add this in my wallet. I used to hunt for a third part application to avail this function.
Reply With Quote
  #4 (permalink)  
Old 09-19-2008, 03:37 PM
Junior Member
BizHat Newbie
 
Join Date: Sep 2008
Posts: 5
Default

It would be great if you an explanation about fopen function.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:57 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0