<?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>El Blog del Antonio &#187; How To</title>
	<atom:link href="http://www.ramirezcobos.com/category/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ramirezcobos.com</link>
	<description>Programming Web with PHP, CSS, Javascript and ∞</description>
	<lastBuildDate>Wed, 14 Jul 2010 14:03:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Speed Up Your Pages With Lazy Load JQuery Plugin</title>
		<link>http://www.ramirezcobos.com/2010/06/15/speed-up-your-pages-with-lazy-load-jquery-plugin/</link>
		<comments>http://www.ramirezcobos.com/2010/06/15/speed-up-your-pages-with-lazy-load-jquery-plugin/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 15:06:54 +0000</pubDate>
		<dc:creator>Antonio Ramirez</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[On The Web]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.ramirezcobos.com/?p=476</guid>
		<description><![CDATA[I would like to introduce you this simple but very efficient plugin that will help us speed up the downloading time of our web pages. I am talking about mr Mika Tuupola&#8217;s Lazy Load JQuery Plugin. This plugin loads the images of a web page as the user scrolls to their position, that is, images]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-372" href="http://www.ramirezcobos.com/2010/01/14/jquery-1-4-are-you-ready/picture-121-300x157/"><img class="alignright size-full wp-image-372" title="Picture-121-300x157" src="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Picture-121-300x157.png" alt="" width="300" height="157" /></a>I would like to introduce you this simple but very efficient plugin that will help us speed up the downloading time of our web pages. I am talking about mr <a href="http://www.appelsiini.net/projects/lazyload/enabled_gazillion.html" target="_blank">Mika Tuupola&#8217;s Lazy Load JQuery Plugin</a>.</p>
<p>This plugin loads the images of a web page as the user scrolls to their position, that is, images wont load until they are not within the visible viewport margins of the window.</p>
<p><strong>How to use</strong></p>
<p>First we need to insert the following references into our code</p>
<pre class="brush: xml;">

&lt;!-- insert a reference to jquery and the jquery.lazyload plugin --&gt;
&lt;script src=&quot;jquery.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;jquery.lazyload.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</pre>
<p>And now this few lines of code in our document.ready function</p>
<pre class="brush: xml;">

&lt;script type=&quot;text/javascript&quot;&gt;
$(function() {
          $(&quot;img&quot;).lazyload({
              placeholder : &quot;img/grey.gif&quot;,
              effect      : &quot;fadeIn&quot;
           });
       });
&lt; /script&gt;
</pre>
<p>And that&#8217;s it! Easy right? </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ramirezcobos.com/2010/06/15/speed-up-your-pages-with-lazy-load-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Handling Timeouts with PHP5 SoapClient Extension</title>
		<link>http://www.ramirezcobos.com/2010/02/02/handling-timeouts-with-php5-soapclient-extension/</link>
		<comments>http://www.ramirezcobos.com/2010/02/02/handling-timeouts-with-php5-soapclient-extension/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 01:37:10 +0000</pubDate>
		<dc:creator>Antonio Ramirez</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.ramirezcobos.com/?p=266</guid>
		<description><![CDATA[I was breaking my head towards a silly thing around SoapClient Calls. My actual project requires Soap Calls to certain providers and everytime I was calling the external server, I had to wait for the server response (if any) and if the server failed to respond accordingly&#8230; damn&#8230; Warnings and/or Errors displayed and boom&#8230; My]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ramirezcobos.com/wp-content/uploads/2010/02/Imagen-2.png"></a><a href="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Imagen-2-300x197.png"></a><a href="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Imagen-2-300x197.png"></a><a href="http://www.ramirezcobos.com/wp-content/uploads/2010/02/Imagen-2-300x197.png"><img class="alignright size-full wp-image-387" title="Imagen-2-300x197" src="http://www.ramirezcobos.com/wp-content/uploads/2010/02/Imagen-2-300x197.png" alt="" width="300" height="197" /></a>I was breaking my head towards a silly thing around SoapClient Calls. My actual project requires Soap Calls to certain providers and everytime I was calling the external server, I had to wait for the server response (if any) and if the server failed to respond accordingly&#8230; damn&#8230; Warnings and/or Errors displayed and boom&#8230; My great application just looked like&#8230; well, forget it, I just used the try and catch statements for that&#8230; not big deal.</p>
<p>So I jump over Google&#8217;s horse and looked around implementing timeouts! because that was a true issue. Can you imagine? A user makes a request I looked around my DB and suddenly that single SOAP call takes me one minute to respond. No good, time for a solution.</p>
<p>Found the way to do it, by setting a hidden parameter (not documented) named &#8216;connection_timeout&#8217;:</p>
<pre class="brush: php;">
//
// setting a connection timeout (five seconds on the example)
//
$client = new SoapClient($wsdl, array(&quot;connection_timeout&quot;=&gt;15));
</pre>
<p>The above says wait 15 seconds before returning a fault if you cannot connect properly to the host. The parameter &#8216;connection_timeout&#8217; addresses the time it takes to wait to connect to your host.</p>
<p>As Jim Plush&#8217;s said:</p>
<blockquote><p>You&#8217;d have two timeouts set in your application one for how long it should take to actually connect to your remote host and a timeout for how long the socket connection should wait for a response from the server.</p></blockquote>
<p>So, now we need to set the time we wait for a server response with the following:</p>
<pre class="brush: php;">

ini_set('default_socket_timeout', 180);
</pre>
<p>With these two configuration options we control the time to wait for a Soap host connection and the time waiting for a Soap Service response. Just perfect.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-7060132287364604";
/* 468x60, creado 16/03/10 */
google_ad_slot = "9029910384";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<a href='http://www.ramirezcobos.com/2010/02/02/handling-timeouts-with-php5-soapclient-extension/imagen-2-300x197-2/' title='Imagen-2-300x197'><img width="120" height="120" src="http://www.ramirezcobos.com/wp-content/uploads/2010/02/Imagen-2-300x197-120x120.png" class="attachment-thumbnail" alt="Imagen-2-300x197" title="Imagen-2-300x197" /></a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ramirezcobos.com/2010/02/02/handling-timeouts-with-php5-soapclient-extension/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Latitude and Longitude with Google Maps V3</title>
		<link>http://www.ramirezcobos.com/2010/01/22/get-latitude-and-longitude-with-google-maps-v3/</link>
		<comments>http://www.ramirezcobos.com/2010/01/22/get-latitude-and-longitude-with-google-maps-v3/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 14:56:24 +0000</pubDate>
		<dc:creator>Antonio Ramirez</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Google Maps]]></category>

		<guid isPermaLink="false">http://www.ramirezcobos.com/?p=251</guid>
		<description><![CDATA[I would like to share with you a little piece of code that I find quite useful in my applications. I do create lots of guides that require a small utility to find out the latitude and longitude of a business location from a control panel in order to display the maps appropiately on the]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ramirezcobos.com/wp-content/uploads/2010/01/Picture-22.png"><a href="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Picture-22-300x198.png"><img class="alignright size-full wp-image-320" title="Picture-22-300x198" src="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Picture-22-300x198.png" alt="" width="300" height="198" /></a></a>I would like to share with you a little piece of code that I find quite useful in my applications. I do create lots of guides that require a small utility to find out the latitude and longitude of a business location from a control panel in order to display the maps appropiately on the Web. Here I will do my best to explain a step procedure on how to do that -once you know the procedure, it is easy to create plugins or whatever you wish to do.</p>
<h3>Step 1</h3>
<p>First of all, lets make a reference to the new version of Google Maps. Check that we have to specify a parameter sensor=false. To find out more about this parameter please follow this <a href="http://code.google.com/intl/en-EN/apis/maps/documentation/#SpecifyingSensor">link</a>.</p>
<pre class="brush: xml;">
&lt;script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"&gt;&lt;/script&gt;
</pre>
<h3>Step 2</h3>
<p>Now we are going to write the HTML tags on the BODY of our document that will hold the map and the controls that will hold latitude, longitude and zoom level references. Also, see the CSS that control the size of the map holder.</p>
<pre class="brush: xml;">
&lt;style&gt;
div#gmap {
width: 100%;
height: 300px;
}
&lt;/style&gt;
&lt;body&gt;
&lt;center&gt;
&lt;!-- MAP HOLDER --&gt;
&lt;div id="gmap"&gt;&lt;/div&gt;
&lt;!-- REFERENCES --&gt;
lat:&lt;span id="lat"&gt;&lt;/span&gt; lon:&lt;span id="lon"&gt;&lt;/span&gt;&lt;br/&gt;
zoom level: &lt;span id="zoom_level"&gt;&lt;/span&gt;
&lt;/center&gt;
&lt;/body&gt;
</pre>
<h3>Step 3</h3>
<p>Now, we are going to write the function that will display the map when the document loads. The function, that we will call &#8216;initialize&#8217; has different parts that we will describe now:</p>
<h4>Part 1</h4>
<p>Setting the map zoom level and its position in the world:</p>
<pre class="brush: jscript;">
var myLatlng = new google.maps.LatLng(38.971154274048345,1.415863037109375); // IBIZA <img src='http://www.ramirezcobos.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
var myOptions = {
zoom: 16,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("gmap"), myOptions);
</pre>
<h4>Part 2</h4>
<p>Placing a marker on the map specifying its center position (please refer to above code for LatLon location).</p>
<pre class="brush: jscript;">
// marker refers to a global variable
marker = new google.maps.Marker({
position: myLatlng,
map: map
});
</pre>
<h4>Part 3</h4>
<p>Now, the events that will take control of the marker center re-positioning and placing the information on the correspondent document objects (lat, lon, and zoom level).</p>
<pre class="brush: jscript;">
// if center changed then update lat and lon document objects
google.maps.event.addListener(map, 'center_changed', function() {
var location = map.getCenter();
document.getElementById("lat").innerHTML = location.lat();
document.getElementById("lon").innerHTML = location.lng();
// call function to reposition marker location
placeMarker(location);
});
// if zoom changed, then update document object with new info
google.maps.event.addListener(map, 'zoom_changed', function() {
zoomLevel = map.getZoom();
document.getElementById("zoom_level").innerHTML = zoomLevel;
});
// double click on the marker changes zoom level
google.maps.event.addListener(marker, 'dblclick', function() {
zoomLevel = map.getZoom()+1;
if (zoomLevel == 20) {
zoomLevel = 10;
}
document.getElementById("zoom_level").innerHTML = zoomLevel;
map.setZoom(zoomLevel);
});
</pre>
<h4>Part 4</h4>
<p>Initialize the document objects with default information</p>
<pre class="brush: jscript;">
document.getElementById("zoom_level").innerHTML = 16;
document.getElementById("lat").innerHTML = 38.971154274048345;
document.getElementById("lon").innerHTML = 1.415863037109375;
</pre>
<h4>Step 4</h4>
<p>Finally, we have to write the function that will reposition the marker on &#8216;zoom_changed&#8217; map event and call the &#8216;initialize&#8217; function on window load event.</p>
<pre class="brush: jscript;">
function placeMarker(location) {
var clickedLocation = new google.maps.LatLng(location);
marker.setPosition(location);
}
window.onload = function(){initialize()};
</pre>
<p>And that&#8217;s it, we have a great utility to plug onto our projects in order to find out the latitude and longitude of an address.</p>
<h3>DOWNLOAD</h3>
<p>I have included the working version of this tutorial for you to download. If you make any changes on the code in order to improve/add more functionality to it (that is easy fellows), please share it here with us.</p>
<div style="padding: 10px; text-align: center; background-color: #ffffff; border: 3px solid #dddddd;"><table style="border: 1px solid #CCC;" cellpadding="3" width="100%">
  <tr>
    <td width="35">
      <img src="http://www.ramirezcobos.com/wp-content/plugins/downloads-manager/img/icons/default.gif" alt="http://www.ramirezcobos.com/wp-content/plugins/downloads-manager/img/icons/default.gif">
    </td>
    <td>
      <b>download:</b> <a href="http://www.ramirezcobos.com/?file_id=9">Get Lat Lon Finder</a> <small>(1.41KB)</small><br />
      <b>added:</b> 22/01/2010 <br />
      <b>clicks:</b> 375 <br />
      <b>description:</b>  <br />
    </td>
  </tr>
</table></div>
<script type="text/javascript"><!--
google_ad_client = "pub-7060132287364604";
/* 468x60, creado 16/03/10 */
google_ad_slot = "9029910384";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
]]></content:encoded>
			<wfw:commentRss>http://www.ramirezcobos.com/2010/01/22/get-latitude-and-longitude-with-google-maps-v3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing 500 Internal Error on Xampp</title>
		<link>http://www.ramirezcobos.com/2010/01/12/fixing-500-internal-error-on-xampp/</link>
		<comments>http://www.ramirezcobos.com/2010/01/12/fixing-500-internal-error-on-xampp/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 01:05:50 +0000</pubDate>
		<dc:creator>Antonio Ramirez</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Apache Server]]></category>

		<guid isPermaLink="false">http://www.ramirezcobos.com/?p=214</guid>
		<description><![CDATA[First of all, let&#8217;s talk about XAMPP a bit. XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use &#8211; just download, extract and start. There are three types of distribution (Windows, Linux and Mac). I am not going to discuss anything]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ramirezcobos.com/wp-content/uploads/2010/01/Picture-5.png"><a href="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Picture-5-300x165.png"><img class="alignright size-full wp-image-308" title="Picture-5-300x165" src="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Picture-5-300x165.png" alt="" width="300" height="165" /></a></a>First of all, let&#8217;s talk about <a href="http://www.apachefriends.org/en/xampp.html" target="_blank">XAMPP</a> a bit. <a href="http://www.apachefriends.org/en/xampp.html" target="_blank">XAMPP</a> is an easy to install Apache distribution containing MySQL, PHP and Perl. <a href="http://www.apachefriends.org/en/xampp.html" target="_blank">XAMPP</a> is really very easy to install and to use &#8211; just download, extract and start.</p>
<p>There are three types of distribution (Windows, Linux and Mac). I am not going to discuss anything about <a href="http://www.apachefriends.org/en/xampp.html" target="_blank">XAMPP</a>, I think that with a visit to their site you will all the info required to install and run this wonderful package.</p>
<p>What I want to concentrate on is that when trying to use a regular .htaccess in a specific folder, Apache fires a beautiful and really annoying (it is not very well explained why this error happens when it happens) <strong>500 Internal Error</strong>.<strong> </strong></p>
<h3>Finding the problem</h3>
<p>Well, I went to the httpd.conf file to see what was going on and found the problem. The problem is that XAMPP Apache version has a very strict security on allowing users to modify its default settings -and its default settings are <em>AllowOverride None</em>:<br />
<strong><br />
AllowOverride AuthConfig</strong></p>
<h3>Solution</h3>
<p>Just go to the Directory directive and change <strong>AllowOverride AuthConfig</strong> to <strong>AllowOverride All</strong> and thats it.</p>
<pre class="brush: plain; highlight: [11];">
&lt;Directory "/Applications/xampp/xamppfiles/htdocs"&gt;

Options Indexes FollowSymLinks ExecCGI Includes

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
# AllowOverride AuthConfig
AllowOverride All

Order allow,deny
Allow from all

&lt;/Directory&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ramirezcobos.com/2010/01/12/fixing-500-internal-error-on-xampp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SWFUpload_0_0. Error HTTP Status: 403 Solved</title>
		<link>http://www.ramirezcobos.com/2010/01/05/swfupload_0_0-error-http-status-403-solved/</link>
		<comments>http://www.ramirezcobos.com/2010/01/05/swfupload_0_0-error-http-status-403-solved/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 11:21:18 +0000</pubDate>
		<dc:creator>Antonio Ramirez</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[On The Web]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.ramirezcobos.com/?p=161</guid>
		<description><![CDATA[SWFUpload is a client-side file upload tool originally developed by Vinterwebb.se. It uses a combination of Flash and JavaScript to provide file upload functionality beyond what the basic browser provides with the &#60;input type=&#8221;file&#8221; /&#62; tag. The main features that SWFUpload provides are: The ability to select multiple files in the file browser dialog. AJAX-style]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ramirezcobos.com/wp-content/uploads/2010/01/Picture-6.png"><a href="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Picture-6.png"><img class="alignright size-medium wp-image-312" title="Picture-6" src="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Picture-6-300x143.png" alt="" width="300" height="143" /></a></a><br />
<a href="http://www.swfupload.org/">SWFUpload</a> is a client-side file upload tool originally developed by <a href="http://www.vinterwebb.se/">Vinterwebb.se</a>. It uses a combination of Flash and JavaScript to 	provide file upload functionality beyond what the basic browser provides with the &lt;input type=&#8221;file&#8221; /&gt; tag.</p>
<p>The main features that SWFUpload provides are:</p>
<ul>
<li>The ability to select multiple files in the file browser dialog.</li>
<li>AJAX-style uploading without a page refresh.</li>
<li>Upload progress events.</li>
<li>Namespaced classes compatible with other JavaScript libraries (i.e., jQuery, Prototype, etc.).</li>
<li>Flash 9 and Flash 10 support. (Flash 8 support dropped in version 2.2.0)</li>
</ul>
<p>SWFUpload is different from other Flash based upload tools because of the philosophy 		behind its design.  SWFUpload gives developers control by leaving the UI in the browser (as much as possible). 		Developers can use XHTML, CSS, and JavaScript to tailor the upload UI to the needs and 		style of their site.  Upload status updates are made through a set of simple JavaScript events. 		The developer uses these events to update the webpage as the file upload progresses.</p>
<h3>How to use it</h3>
<p>I am not going to explain how to use it, if any of you are interested on it, SWFUpload guys have developed a very <a href="http://demo.swfupload.org/Documentation/" target="_blank">good site explaining its full functionality</a>.</p>
<h3>The problem</h3>
<p>After successfully installing the component on one of my projects and working amazingly good on the local computer, when I uploaded the project to the server where I contracted the hosting, suddenly I had an error: SWFUpload_0_0. Error HTTP Status: 403.</p>
<p>I google to find a solution to my problem and found tons of people having the same issue and the answers where always the same. For example:</p>
<p><strong><span style="color: #000000;"><em>&#8220;You are getting a 403.  Which means &#8220;forbidden&#8221;.  This is something on the web server that you&#8217;ll have to figure out.SWFUpload doesn&#8217;t save the file. It just uploads it to your upload_url (upload.php). You need to add PHP code that saves the file. In PHP the uploaded file is found in $_FILE["Filedata"] by default.&#8221;</em></span></strong></p>
<p>Say what? I looked at my server&#8217;s configuration, checked folder permissions, reviewed my JS and PHP code&#8230; <strong>NOTHING</strong>. Then I thought it was something wrong with server POST Payload checks. Normally,<a href="http://www.modsecurity.org/documentation/modsecurity-apache/1.9.3/html-multipage/03-configuration.html" target="_blank"> this security configuration is disabled by default on Apache Servers</a> but my provider &#8216;could&#8217; possibly had this security check on. I had to try and&#8230;</p>
<h3>Solution</h3>
<p>I solved the issue by creating an .htaccess file and writing the following in it:</p>
<p><strong><em>SetEnvIfNoCase Content-Type &#8220;^multipart/form-data;&#8221; &#8220;MODSEC_NOPOSTBUFFERING=Do not buffer file uploads&#8221;</em></strong></p>
<p>Hope this also works for those having the same issue.</p>
<p><em>Happy New Year BTW!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ramirezcobos.com/2010/01/05/swfupload_0_0-error-http-status-403-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to change Paypal&#8217;s front page language</title>
		<link>http://www.ramirezcobos.com/2009/12/22/how-to-change-paypals-front-page-language/</link>
		<comments>http://www.ramirezcobos.com/2009/12/22/how-to-change-paypals-front-page-language/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 11:57:24 +0000</pubDate>
		<dc:creator>Antonio Ramirez</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Paypal]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.ramirezcobos.com/?p=121</guid>
		<description><![CDATA[I am currently developing an application and I wanted to use PayPal&#8217;s checkout method as now it allows us, mere mortals, to use our credit cards without the need of being paypal&#8217;s user. But, I had a huge problem, I explain: My Web project has multiple language support, that means, that a guy can choose]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Picture-111-300x182.png"><img class="alignright size-full wp-image-371" title="Picture-111-300x182" src="http://www.ramirezcobos.com/wp-content/uploads/2010/03/Picture-111-300x182.png" alt="" width="300" height="182" /></a>I am currently developing an application and I wanted to use PayPal&#8217;s checkout method as now it allows us, mere mortals, to use our credit cards without the need of being paypal&#8217;s user. But, I had a huge problem, I explain:</p>
<p>My Web project has multiple language support, that means, that a guy can choose the language he wants to see or experience my site, that a guy can be in Australia and be Spanish and choose to view my site in Spanish. You may wonder why I am explaining so much this, well, it seems that the guys from PayPal didn&#8217;t have that into account as if you do not tweak the form variables correctly, the front page of your checkout process will be displayed in the ASSUMED language by your location: if you are a Spanish in Australia and clicks the button to checkout in my site, PayPal will display their front page in Australian English, no matter who you are Spanish, Italian, or Japanese -can you imagine if you are in Japan and you are not Japanese?. And what does means? YOU LOOSE A SALE!</p>
<p>So, I look around the Web and found nothing at all. Just bits and pieces here and there, nobody gave me any solution at all just the one given by, even, the guys from PayPal:</p>
<p>Include a hidden field type named &#8216;lc&#8217; and set it to the language you wish the page to view displayed (ie for Spanish language):</p>
<pre class="brush: xml;">
&lt;input type="hidden" value="ES" name="lc" /&gt;
</pre>
<p>But that didn&#8217;t work, it just displayed a small dropdown box at the top right corner of the page&#8230; I kept searching the web&#8230; very frustrated I read an article from a guy that said that it was a problem with direct payments as we do not include the shipping information in it, there was nothing to do about it. So after a bit of studying the variables of PayPal&#8217;s Web Integration Manual I decided to give a try to the following set:</p>
<ul>
<li>I will tell PayPal not to ask for shipping, there is no shipping</li>
<li>I will tell PayPal the language I want to use</li>
<li>I will tell PayPal the character set I use for that language</li>
<li>I will tell PayPal also the currency code I want to use (This is extra <img src='http://www.ramirezcobos.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</li>
</ul>
<p>The resulting form was like this and believe me&#8230; <strong>IT WORKS</strong>:</p>
<pre class="brush: xml;">
&lt;form action="https://www.paypal.com/cgi-bin/webscr" id="paypalform" name="paypalform" method="post" style="display: block;" class="boxy-content"&gt;
&lt;input type="hidden" value="2" id="rm" name="rm"/&gt;
&lt;input type="hidden" value="_xclick" id="cmd" name="cmd"/&gt;
&lt;input type="hidden" value="YOUR_PAYPAL_ID" id="business" name="business"/&gt;
&lt;input type="hidden" value="http://YOUR_SUCCESS_URL_PAGE" id="return" name="return"/&gt;
&lt;input type="hidden" value="http://YOUR_CANCEL_URL_PAGE" id="cancel_return" name="cancel_return"/&gt;
&lt;input type="hidden" value="http://YOUR_IPN_URL_VALIDATION" id="notify_url" name="notify_url"/&gt;

&lt;!-- THESE ARE THE IMPORTANT FIELDS TO KNOW --&gt;
&lt;input type="hidden" value="EUR" id="currency_code" name="currency_code"/&gt;
&lt;input type="hidden" value="ES" id="lc" name="lc"/&gt;
&lt;input type="hidden" value="1" id="no_shipping" name="no_shipping"/&gt;
&lt;input type="hidden" value="utf-8" id="charset" name="charset"/&gt;
&lt;!-- END OF IMPORTANT FIELDS --&gt;

&lt;input type="hidden" value="TEST_ITEM_NAME" id="item_name" name="item_name"/&gt;
&lt;input type="hidden" value="TEST_ITEM_NUMBER" id="item_number" name="item_number"/&gt;
&lt;input type="hidden" value="1.50" id="amount" name="amount"/&gt;

&lt;/form&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ramirezcobos.com/2009/12/22/how-to-change-paypals-front-page-language/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
