<?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>Johan de Bruin &#187; Archivo</title>
	<atom:link href="http://www.johandebruin.com/t/archivo/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johandebruin.com</link>
	<description>Programación en php, tutorial de api wordpress y posicionamiento en buscadores seo.</description>
	<lastBuildDate>Sun, 05 Feb 2012 15:18:06 +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>Subir un archivo usando ftp con php</title>
		<link>http://www.johandebruin.com/subir-un-archivo-usando-ftp-con-php/</link>
		<comments>http://www.johandebruin.com/subir-un-archivo-usando-ftp-con-php/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 20:22:30 +0000</pubDate>
		<dc:creator>Johan de Bruin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Archivo]]></category>
		<category><![CDATA[ftp]]></category>

		<guid isPermaLink="false">http://www.johandebruin.com/?p=433</guid>
		<description><![CDATA[Bueno, rebuscando entre mis códigos olvidados he encontrado este pequeño snnipet que puede salvarte la vida en más de una ocasión. Usar el ftp con php puede ser muy sencillo gracias a esta función, sus parametros son: $dir: ftp del servidor. $user: usuario del ftp $pass: contraseña $desde: ruta donde se localiza el archivo que [...]]]></description>
			<content:encoded><![CDATA[<p>Bueno, rebuscando entre mis códigos olvidados he encontrado este pequeño snnipet que puede salvarte la vida en más de una ocasión. Usar el ftp con php puede ser muy sencillo gracias a esta función, sus parametros son:</p>
<ul>
<li>$dir: ftp del servidor.</li>
<li>$user: usuario del ftp</li>
<li>$pass: contraseña</li>
<li>$desde: ruta donde se localiza el archivo que se desea subir</li>
<li>$hacia: ruta donde quieres alojar el archivo</li>
</ul>
<p><span id="more-433"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> subirFTP<span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #339933;">,</span><span style="color: #000088;">$user</span><span style="color: #339933;">,</span><span style="color: #000088;">$pass</span><span style="color: #339933;">,</span><span style="color: #000088;">$desde</span><span style="color: #339933;">,</span><span style="color: #000088;">$hacia</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	try
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$idConn</span> <span style="color: #339933;">=</span> <span style="color: #990000;">ftp_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">ftp_login</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$idConn</span><span style="color: #339933;">,</span><span style="color: #000088;">$user</span><span style="color: #339933;">,</span><span style="color: #000088;">$pass</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">ftp_put</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$idConn</span><span style="color: #339933;">,</span><span style="color: #000088;">$hacia</span><span style="color: #339933;">,</span><span style="color: #000088;">$desde</span><span style="color: #339933;">,</span>FTP_BINARY<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">ftp_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$idConn</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	catch<span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$e</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.johandebruin.com/subir-un-archivo-usando-ftp-con-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

