Archive for the 'PHP' Category

Apr
19

If you are visiting Tunisia for the first time or if you are Tunisian and like many others who don’t know how to get from a destination to another in Tunis city or anywhere in the country, TNTN.info will probably help you. The service is a route finder, you select the first and the last destination and it will give you the different steps to follow to go there. For example from Ariana to Eljem :

1- Metro 2 from Ariana to Barcelone
2- Walk from Barcelone SNCFT train station
3- Train Tunis-Tatatouine until Eljem.

TNTN.info

The service currently gives only static information, but expect in the future an integration with Google maps and more useful information. Did I mention that the service is French only ?

Feb
02

Someone asked me today about Text To Speech (TTS) and how to use it with PHP. Many confuse PHP VoiceXML project to TTS and voice applications, but the answer is more easier. For example if you have windows you can simply use Microsoft TTS, that you can use via COM without installing anything. This is a simple Hello World :

$TTS = new COM("SAPI.SpVoice"); // Load the MS TTS using Com
$TTS->Speak('Hello world!'); // Speak Hello world

But if you are looking for something on other platforms you might look at the freeTTS for Java, Festival, or IBM TTS for more professionals applications and more language support.

Jan
21

I have updated yesterday to the latest MT 3.34, while I was using a beta CSV version of the software, but what’s new is that I heard a lot about FastCGI recently and was excited to give it a try not only for MT, but also for PHP as many developers announced excellent performance.

Until now I have just recompiled Apache, PHP with FastCGI support. The issue I noticed in compile from documentation is that the default apxs always fail to compile mod_fastcgi, so I used another local version situated at /usr/local/apache/bin/apxs. I opted for changing cgi handler to mod_fastcgi from server, but MT was enable to work properly. I didn’t want to change URL structure so if you get it working that would be really great.

Jan
02

Just noticed today an email I received two weeks ago concerning the Islamic calendar PHP class that I’ve written around 2002. Sorry for checking very late, but it was one of the email boxes that I rarely read. Well, Islamic calendar PHP will be probably available in the future versions of MediaWiki (and Wikipedia obviously) in order to improve flexibility of the dates. The codes will be under GNU FDL license, and I have already updated the class to support Unicode.

Update already available at phpclasses project’s page, or you can download updated Islamic Calendar PHP class from phpmagazine.net’s server.

Dec
18

Just launched today, WikiMobs is the free encyclopedia optimized for modern mobile phones. Any feedback is welcomed :-)

WikiMobs

Read more about it at the

Jan
30

Something I was noticing in the PHP community recently that date between two release become more and more shorter. Its somehow going very very fast ! 4 Days only between the 5.1.0 and 5.1.1 ! and the 5.0.5 was released just one month before, the latest 5.1.2 released this month on january 12 …

What I was thinking about is the adoption of PHP5 in production servers, when system admins saw 4 days between two release they will certainly be worried about updating the next stable version. And who knows that its stable ! Was it necessary to release the 5.1.0 ? While it came with new features and not really big security issues.

Certainly we all giving much importance to PHP5 and what it could provide as enterprise solutions for professionals, but there is two things that I was thinking about :
1- Why this forcing concerning the release time of new versions of PHP5
2- And does it help the development of PHP5 ?
Continue reading PHP new release are faster to be adopted by the public

Jan
05

Friday january 6, 2006 will be held the first online meeting of the PHP4arab groups. The meeting will be on MSN group at 17h GMT, if you are interested to assist it’s open ! I’ll make a speech about Code Generators, so if you have something you want to know or to hear about code generators let me know :)
The speech won’t be long, as a first experience of online meeting, it will be followed by materials such graphics and code so you can ask questions. Rendez-vous tomorrow friday 6/1/06 at 17h GMT. To participate just join the group and be on time friday in the chat channel of the group. If you have question about the meeting itself contact one of the coordinators Hani Gamal, Mokhtar Diab (see group page on msn).

Jan
03

amigolo is a new social network that have been just launched. Fully written in PHP, amigolo is a new generation of social network which introduce the power of social software with Blogs, Groups, Tags, Events, Channels, Wiki, Polls, File sharing, Messenging … etc. And certainly lot of Fun !

amigolo.png
What I liked with amigolo is the great features already implemented and the possibility to extend its features. There is for example the possibility to invite your MSN and Gmail friends to build your social network. Social networking is built upon the idea of degrees of relationship to you, so you are the centre of your network and thus you are degree zero. Your friends are one degree away and their friends are two degrees away from you and so on.
Continue reading amigolo Social Network launched

Oct
17

One of the classes that I’m sharing on phpclasses and I never talk about is DBConv or Database Conversion. The idea of the package is to convert SQL from proprietary structure into standard structure which could be used on different database servers.

I use this class specially to convert from Oracle to MySQL, to have a local database that I can work on more easily and keep compatibilities with the original oracle database.

Oracle users generally have this tool called TOAD, I use it to generate a dump of the oracle database. From menu choose Database, then Schema browser. Select tables you want to convert, then right click and choose “Create script” from the menu. The window below will be displayed :

Multi Table script

Continue reading Convert Oracle database Schema to MySQL

Oct
14

One of the functions that might be very useful for web development is to create a protected folder on the fly so you can upload files for example without worrying that anyone can access these files.

/**
* Create .htaccess protected folder
*
* @param $folder folder path
* @return
**/
function smkdir($folder){

if (!is_dir($folder)) {
mkdir($folder,0777);
}

if (!$handle = fopen($folder.”.htaccess”, ‘a’)) {
echo “Impossible d’ouvrir le fichier ($filename)”;
exit;
}
$protect = “AuthType Basic
AuthName “No access”
AuthUserFile .htnopasswd
AuthGroupFile /dev/null
Require valid-user
“;
fwrite($handle, $protect);
fclose($handle);
}


Continue reading Create .htaccess protected folders