<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Altmint Blog &#187; ftp file upload</title>
	<atom:link href="http://blog.altmint.com/tag/ftp-file-upload/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.altmint.com</link>
	<description></description>
	<lastBuildDate>Mon, 24 Oct 2011 09:11:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to connect to FTP and upload file using php code?</title>
		<link>http://blog.altmint.com/how-to-connect-to-ftp-and-upload-file-using-php-code</link>
		<comments>http://blog.altmint.com/how-to-connect-to-ftp-and-upload-file-using-php-code#comments</comments>
		<pubDate>Sat, 03 Apr 2010 08:15:44 +0000</pubDate>
		<dc:creator>Kongoti</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[file upload using php]]></category>
		<category><![CDATA[ftp file upload]]></category>

		<guid isPermaLink="false">http://blog.altmint.com/?p=72</guid>
		<description><![CDATA[How to connect to FTP and upload file using php code? The following code will connect to the ftp and upload the file to the server using php code &#60;?php $ftp_server=â€HOST NAMEâ€; $ftp_user_name=â€USER NAMEâ€; $ftp_user_pass=â€PASSWORDâ€; $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, â€œ$ftp_user_nameâ€, â€œ$ftp_user_passâ€); if ((!$conn_id) &#124;&#124; (!$login_result)) { echo <a href="http://blog.altmint.com/how-to-connect-to-ftp-and-upload-file-using-php-code">Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><strong>How to connect to FTP and upload file using php code?</strong></p>
<p>The following code will connect to the ftp and upload the file to the server using php code</p>
<pre class="brush: php">
&lt;?php

$ftp_server=â€HOST NAMEâ€;
$ftp_user_name=â€USER NAMEâ€;
$ftp_user_pass=â€PASSWORDâ€;
$conn_id = ftp_connect($ftp_server);

// login with username and password

$login_result = ftp_login($conn_id, â€œ$ftp_user_nameâ€, â€œ$ftp_user_passâ€);

if ((!$conn_id) || (!$login_result)) {
echo â€œauthentication failedâ€;
}
else
{

$source_file=â€uploads/â€.$fileName;
$destination_file=â€/htdocs/â€.$fileName;
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);

}

ftp_quit($conn_id);

?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.altmint.com/how-to-connect-to-ftp-and-upload-file-using-php-code/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

