Posts tagged Web

 

Build iPhone Web Apps with iWebKit

1

Iwebkit is the revolutionnairy open source development kit used to create high quality iPhone and iPod touch websites in a few minutes. In the first 4 months of it’s existance the pack has greatly evolved from a basic idea to a project that has reached worldwide fame!

This Open Source Free Development Kit is accessible to anyone even people without any html knowledge and is simple to understand. In a couple of minutes you will have created a full and profesional looking website.

Awesome new and advanced features offered by no pack in the world like a custom popup and iphone-style form elements.

Check out their website: http://iwebkit.net/

And their demo: http://demo.iwebkit.net/

Tweet this!Tweet this!
 

SWFUpload_0_0. Error HTTP Status: 403 Solved

0


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 <input type=”file” /> tag.

The main features that SWFUpload provides are:

  • The ability to select multiple files in the file browser dialog.
  • AJAX-style uploading without a page refresh.
  • Upload progress events.
  • Namespaced classes compatible with other JavaScript libraries (i.e., jQuery, Prototype, etc.).
  • Flash 9 and Flash 10 support. (Flash 8 support dropped in version 2.2.0)

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.

How to use it

I am not going to explain how to use it, if any of you are interested on it, SWFUpload guys have developed a very good site explaining its full functionality.

The problem

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.

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:

“You are getting a 403. Which means “forbidden”. This is something on the web server that you’ll have to figure out.SWFUpload doesn’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.”

Say what? I looked at my server’s configuration, checked folder permissions, reviewed my JS and PHP code… NOTHING. Then I thought it was something wrong with server POST Payload checks. Normally, this security configuration is disabled by default on Apache Servers but my provider ‘could’ possibly had this security check on. I had to try and…

Solution

I solved the issue by creating an .htaccess file and writing the following in it:

SetEnvIfNoCase Content-Type “^multipart/form-data;” “MODSEC_NOPOSTBUFFERING=Do not buffer file uploads”

Hope this also works for those having the same issue.

Happy New Year BTW!

Tweet this!Tweet this!
 

eyeOS a ‘very close’ Web Operating System

0

eyeOS a Web Operating System

I would like to talk to you about an open source Web application that I have followed since its beginnings: eyeOS. This application started with the goal to become a true Web Operating System and now the guys call it Open Source Cloud Computing’s Web Desktop. Even though the idea of having the system files on a server and have ‘dumb’ clients is not new, these guys have created a great tool and nowadays they even work in conjunction with the IT monster IBM.

Maybe the dreamed future of every System Administrator is near, where they do not need to have certain operating system installed on their computers and everything, every little detail, is managed from a server. Client computers just having a ‘web browser’ and a reliable network bandwidth (most LAN do have it) will reduce enormously companies costs and Microsoft’s pocket :)

Even though I think is a great tool I dislike their interface (sorry guys), it looks far too much like Windows and I think… that nowadays we could provide a better and more intuitive interfaces for clients. Not everybody is a guru folks and not everybody needs to learn Windows to use a computer. Best days are about to come but meanwhile, congratulations eyeOS.

ScreenShoots


Tweet this!Tweet this!
 

How to change Paypal’s front page language

3

I am currently developing an application and I wanted to use PayPal’s checkout method as now it allows us, mere mortals, to use our credit cards without the need of being paypal’s user. But, I had a huge problem, I explain:

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’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!

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:

Include a hidden field type named ‘lc’ and set it to the language you wish the page to view displayed (ie for Spanish language):

<input type="hidden" value="ES" name="lc" />

But that didn’t work, it just displayed a small dropdown box at the top right corner of the page… I kept searching the web… 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’s Web Integration Manual I decided to give a try to the following set:

  • I will tell PayPal not to ask for shipping, there is no shipping
  • I will tell PayPal the language I want to use
  • I will tell PayPal the character set I use for that language
  • I will tell PayPal also the currency code I want to use (This is extra :) )

The resulting form was like this and believe me… IT WORKS:

<form action="https://www.paypal.com/cgi-bin/webscr" id="paypalform" name="paypalform" method="post" style="display: block;" class="boxy-content">
<input type="hidden" value="2" id="rm" name="rm"/>
<input type="hidden" value="_xclick" id="cmd" name="cmd"/>
<input type="hidden" value="YOUR_PAYPAL_ID" id="business" name="business"/>
<input type="hidden" value="http://YOUR_SUCCESS_URL_PAGE" id="return" name="return"/>
<input type="hidden" value="http://YOUR_CANCEL_URL_PAGE" id="cancel_return" name="cancel_return"/>
<input type="hidden" value="http://YOUR_IPN_URL_VALIDATION" id="notify_url" name="notify_url"/>
<!-- THESE ARE THE IMPORTANT FIELDS TO KNOW -->
<input type="hidden" value="EUR" id="currency_code" name="currency_code"/>
<input type="hidden" value="ES" id="lc" name="lc"/>
<input type="hidden" value="1" id="no_shipping" name="no_shipping"/>
<input type="hidden" value="utf-8" id="charset" name="charset"/>
<!-- END OF IMPORTANT FIELDS -->
<input type="hidden" value="TEST_ITEM_NAME" id="item_name" name="item_name"/>
<input type="hidden" value="TEST_ITEM_NUMBER" id="item_number" name="item_number"/>
<input type="hidden" value="1.50" id="amount" name="amount"/>
</form>
Tweet this!Tweet this!
 

Javascript Online Compression Tools

0

Picture 9When a Web project is finished, it is time to think how to make it better, faster… how to improve user’s experience. One of the most important things is javascript code compression in order to speed up page downloads and there are a couple of tools around that allows us to do it.

I just include three references:

The Online YUI Compressors

These tools allows us to make use of the famous Yahoo Javascript Compression algorithm. Both of the above references does the same results, there is only a major difference between both: whilst the one created by Mike allows you to paste your script or upload a file to compress, the one created by Rodolphe Stoclin only allows us to upload the file to compress.

The Online Javascript Minifier

This tool can reduce our code by using two different algorithms: the JSMin by David Crockford and the Packer method by Dean Edwards.

Which One to Use?

I personally like those algorithms that do not make any use of the eval function and doesn’t change much the code I program, test, and implement. I think that will only depend of the developer choice.

There is an online tool that help us compare the algorithms. If that helps you to decide which one to use: http://compressorrater.thruhere.net/



Tweet this!Tweet this!
 

Creating Small Urls with PHP

0

bit.lyHave you ever wanted to create small URLs like in Twitter? This service is provided by bit.ly and it is the one I normally use for my projects. It allows you to shorten any long URL (ie. http://www.ramirezcobos.com = http://bit.ly/8zivPq -click on it and you will be redirected here) and also gives you click statistiques.

Nevertheless, there are also other providers that allows you to create a small URL on the fly such as tinyurl.com or to.y. If any of you wishes to create small urls through their PHP code here I got a set of functions (using CURL) for you use on your projects:

function getTinyUrl($url){
		$ch = curl_init();
		$timeout = 5;
		curl_setopt($ch,CURLOPT_URL,'http://tinyurl.com/api-create.php?url='.$url);
		curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
		curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
		$data = curl_exec($ch);
		curl_close($ch);
		return $data;
	}
function getToLyUrl($url){
		$ch = curl_init();
		curl_setopt($ch, CURLOPT_URL, 'http://to.ly/api.php?longurl='.urlencode($url));
		curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
		curl_setopt($ch, CURLOPT_HEADER, 0);
		$data = curl_exec ($ch);
		curl_close ($ch);
		return $data;
	}

Usage

$smallURL = getTinyUrl('http://www.ramirezcobos.com');
echo $smallURL; // will display the small URL

Extras

I include the following function too just in case, as I recommend you to check if URLs are in correct format before using the above functions.

function getParsedUrl($url)
	{
		$parsed_url = parse_url($url);
		if (!isset($parsed_url['scheme']) or $parsed_url['scheme'] != 'http'){
			echo 'Unsupported URL sheme given, please just use "HTTP".';
			exit();
		}
		if (!isset($parsed_url['host']) or $parsed_url['host'] == ''){
			echo 'Invalid URL given!';
			exit();
		}
		$host = $parsed_url['host'];
		$host .= (isset($parsed_url['port']) and  !empty($parsed_url['port'])) ? ':'.$parsed_url['port'] : '';
		$path = (isset($parsed_url['path']) and  !empty($parsed_url['path'])) ? $parsed_url['path'] : '/';
		$path .= (isset($parsed_url['query']) and  !empty($parsed_url['query'])) ? '?'.$parsed_url['query'] : '';
		return 'http://' . $host . $path;
	}



Tweet this!Tweet this!
 

DimDim Internet Video Conferencing

0

DimDim.comDimDim is a Web utility that lets anyone deliver synchronized live presentations, whiteboards and webpages and share their voice and video over the Internet without any download requirements. In short, it is an online Web Conference Tool. If you ever wished to realize a conference that offers more than just video streaming, then DimDim is a good alternative, and cheaper than other systems like Webex.

It has three versions:

  1. The free one (with a limitation of 20 people -did you ever had a web conference over such number?)
  2. The payed one, version PRO (that allows us to have a Web conference with over 50 people and access to stats, separated and faster servers and better security).
  3. And Webminar (up to 1000 participants and with a monthly cost of 75 USD)

Check it out, is worth to see it.



Tweet this!Tweet this!
Go to Top