<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <h2>Data=</h2> <?php // Init $GetData as a cURL object $GetData = curl_init(); // Tell cURL what URL we want to FTP $fp = fopen(__FILE__, "r"); $url = "ftp://MyFTPpassword:MyFTPuserName@Thumbscalp.com/Signal/test.txt"; curl_setopt($GetData, CURLOPT_URL, $url); // Tell cURL we would like the results as a string instead of just dumping it on the screen curl_setopt($GetData, CURLOPT_RETURNTRANSFER, 1); // Execute the cURL request $data = curl_exec($GetData); // Close the cURL request curl_close($GetData); // Display the data from the variable. var_dump($data); ?> </body> </html>
This post has been edited by inkexit: 06 July 2010 - 11:31 AM

New Topic/Question
Reply




MultiQuote






|