PHP Documentation for Chrome - Look Up PHP Docs Quickly

PHP is a fairly easy language to learn. It isn’t difficult in itself, and there are plenty of resources for it. In particular, the official PHP website provides a reference of PHP functions, where you can look up any PHP function. It’s quite similar to Microsoft’s MSDN. Today I want to introduce a Chrome extension that puts the search feature of the official PHP docs into your browser, so you can look up PHP functions more conveniently~ ...

May 29, 2011 · 1 min

[Google API] Generating QR Codes with the Google Chart API, with PHP Example Code

In this post, I’ll show you how to make QR codes with the Google Chart API. A QR code is the two-dimensional barcode that’s very popular right now. Generating a 2D barcode used to be a hassle, but with the Google Chart API, you can quickly generate a QR code from just a URL. I originally planned to write a post dedicated to the Google Chart API, but I decided to split it up instead~ (I also happened to come across the site Shadow’s Tech Database, which introduces it, and I couldn’t resist writing about it~) ...

February 24, 2011 · 1 min

[PHP] [C++] A Concise Syntax for Explicit Type Casting

PHP and C++ have a very convenient way to cast types. You don't have to memorize a long list of conversion functions. You just put the target type in parentheses in front of the value. However, this approach seems to have some problems, though I'm not really sure what they are XD...

February 15, 2011 · 1 min

[PHP] mb_convert_encoding: Some API Returned the Wrong Encoding? Convert It!

↑↑This is viewed in Chrome with Big5 encoding. The top is before conversion, and the bottom is after conversion. Yesterday, while playing with the Google Weather API, I found that it has a parameter for setting your language. If you don’t set it, the API returns English in UTF-8 encoding. But if you set zh-TW, it returns Chinese, encoded in Big5. So when using this API, I had to re-encode its return value to UTF-8 before I could use it. After all, there aren’t many Big5 websites left, so yesterday I went looking for the mb_convert_encoding function to do the encoding conversion for me~ ...

February 4, 2011 · 2 min

Google Weather API - Get a Full Week of Weather Data

Google Weather API is something I discovered today. I wanted to add a weather lookup feature to the Plurk bot I've been developing recently, so I searched online for ways to get weather data. My original plan was to read the Central Weather Bureau's web pages and parse the data there. But then I found that both Google and Yahoo offer weather APIs. I preferred the Google Weather API, because it returns XML, which is easier to parse. Yahoo, on the other hand, returns HTML... Also, the Google Weather API lets you specify a city name directly. For example, if I want the weather for Taipei City, I just pass "Taipei" to the API. Yahoo's weather API isn't that simple, though. You have to enter a city code, which means I'd need to look up the code for the city I want before I could use Yahoo's API. ...

February 4, 2011 · 2 min

[PHP] Getting the Real Download URLs of Wretch/Yam Music with curl-lib

  The UI I designed is clean^^ This program, getting the real download URLs of Wretch/Yam music, was originally going to become a program that automatically generates blog music code. But since many people already run music code generators, one more wouldn't make much of a difference. So instead of building it, I decided to release the code for everyone to look at. Also, if anyone needs to download music from Yam or Wretch, they can download the program, install it on their own server, and run it there....

January 25, 2011 · 3 min

PHP Probe: Checking How Stable Your Hosting Space Is

I imagine many people building a website start out on free web hosting. You’re probably also curious whether your host is stable, and how fast it is. Today I came across an article on a free site where someone used a PHP probe to check their hosting, so here it is for everyone to try~~~~ First, download the PHP probe ...

June 14, 2009 · 1 min

Source Code Sharing - HOT SCRIPTS

 When you’re writing code, you often need to look for source code to use as a reference, right? Here’s a website that is said to be the largest source code sharing site in the world. I don’t think it’s really the largest, but it’s definitely among the top two :) URL: http://www.hotscripts.com/ When you enter this website, you’ll see the category page. The categories are organized by programming language. The main ones are PHP, CGI, ASP, Perl, Java Scripts .AJAX, C & C++, Ruby On Rails (RoR), Python, and so on, with source code for each. You can pick the language you want to use and then browse through it slowly. Or you can use the search function in the upper-right corner. But don’t type Chinese. Because this is a foreign website, there isn’t much Chinese code. You can also search within certain categories, or search everything (the one that says All………..). Just select it from the dropdown menu in the search box. Once you’ve found the program you want, you can take a quick look at its description. If you want to download it, just click the Download button in the window. One more thing to note: some programs are paid. Usually the ones marked with a (Sponsor) badge are paid. This website also offers account registration. In fact, I never needed to register an account when I used it. ...

May 2, 2009 · 2 min