R
ryanmaelhorn77
Guest
I'm still trying to get this simple script to work. I swtiched over to using the cURL library on the reccomendations of others. It still isn't working though. I get no error msg when I load the page, but no data either. x10 has cURL installed, right?
HTML:
<!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://MyFTPusername:MyFTPpassword@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 to ensure its there.
var_dump($data);
?>
</body>
</html>