Zainals ver 2 sneak peek preview !

27 02 2007

May not be clear but cant bother resize em in then link them today .

The past week been my depression week for no reason and i just wish to know what is happening with moi =\ .
Anyway , give me your feedback !







New breed of tutorials ,

22 02 2007

Here is how the web is advancing …

you dont need to seek written tutorials anymore , why would you do that when you are able to watch a video of your selected tutorial(s) ?

Tutorial Vid 

Long live Web 2.0 !

Experiment: Yahoo Flash Search API …

12 02 2007

YahooAPI in Action

As you can see in the example above i was able to build my own search service using Yahoo API .
Many other things can be achieved using Yahoo’s API including :

  • Build a Flickr Application.
  • Create a Yahoo! Messenger Plug-in.
  • Create a Trip Planner Search Application.
  • Perform a Yahoo! Search with ActionScript 2 and ActionScript 3.
  • Use the Yahoo! Maps Flash API.
  • Create a Yahoo! Music Jukebox plugin.
  • Mash up the API.

More APIs on :

* Flickr API
* Upcoming API
* MyWeb APIs
* Answers API

You can also check the other PL/Techs APIs like PHP , all can be found on Yahoo Developer 

tubetorial , Learn the easy way !!!

12 02 2007

We all know how the internet is now affecting everything …
Its advancing in a crazy way , News , RSS , Videos , Songs , Listen , Learn , Interact , watch , vidCams , i can go on forever .
its the new way to promote your business and your ideas …

Long story short … TubeTorial.

Free Videos on :

  • google adsense
  • Optimzie wordpress
  • learn HTML
  •  Easy money with google Adsense
  • how to increase commentsand views with 1 Plugin
  • Make money with RSS feeds .
  • and much more of Videos !!

Why not giving it a try , Free Vids , makes everyone happy …

Simply the best Bookmark !!

26 01 2007

Every Developer/Designer should have this on the top of the their bookMarks !

the site includes :

  • Tutorials ( Everything  Flash , php , ajax , css etc )
  • Site reviews ( best sites ever)
  • free useful tools ( fonts , code snippets )
  • and much MORE !

I cant say more that You’ll have to see it  your self !! 

Getting WordPress posts into Flash!

25 01 2007

flash worspress flashblog

After reading few documentation about some APIs & classes used with wordpress, i was able to get flash to read the titles and arrange them with their links .

not only that , its now possible to get the post title , post link , post entry(description) etc …
This will be one of the elements that i ‘ll be using in my ZAINALS ver 2 🙂

lovely eyh ?

Sending email attachments in PHP Using phpmailer class !

10 01 2007

A friend of mine asked me for such a script that will attach Jpg Images and send it to a particular email , so i started one from scratch .
The Basic idea is to upload the images to the server and then use phpmailer class to attach the files and send them .
The files can be found @Zainals
PHPMailer Class can be found @
To Learn more about file uploads visit Plus2Net

Make sure you have a directory called upload and set its chmod to 777 .

oh well , sharing is caring eyh ?

first of all we need to setup the form that will interface with the users , i have found this multi browse code @ : Plus2Net
$max_no_img=5; // Maximum number of images value to be set here
echo "<form method=post action=attach.php enctype='multipart/form-data'>";
for($i=1; $i<=$max_no_img; $i++){
echo "<tr><td>Photo $i: </td><td>
<input type=file name='images[]' class='bginput'></td></tr>";


And now for the PHP Part , excuse the sloppness :
//Variables Declaration
$name = "the Submitter";
$email_subject = "Images Attachment";
$Email_msg ="A visitor submitted the following :\n";
$Email_to = ""; // the one that recieves the email
$email_from = "";
$dir = "uploads/$filename";
$attachments = array();
//------Check TYPE------\\
function checkType() {
while(list($key,$value) = each($_FILES[images][type])){
if($value != "image/jpeg" AND $value != "image/pjpeg" AND $value != "") {
exit('Sorry , current format is <b>'.($value).'</b> ,only Jpeg or jpg are allowed.') ;
//-------END OF Check TYPE--------\\
//---CheckSizeFunction ---\\
function checkSize(){
while(list($key,$value) = each($_FILES[images][size]))
$maxSize = 5000000;
if ($value > $maxSize) {
echo"Sorry this is a very big file .. max file size is $maxSize Bytes = 5 MB";
else {
$result = "File size is ok !<br>";
//-------END OF Check Size--------\\
//==============upload File Function============\\
function uploadFile() {
global $attachments;
while(list($key,$value) = each($_FILES[images][name]))
$filename = $value;
//the Array will be used later to attach the files and then remove them from server ! array_push($attachments, $filename);
$dir = "uploads/$filename";
$success = copy($_FILES[images][tmp_name][$key], $dir);
if ($success) {
echo " Files Uploaded Successfully<BR>";
}else {
exit("Sorry the server was unable to upload the files...");
//==== PHP Mailer With Attachment Func ====\\
function SendIt() {
global $attachments,$name,$Email_to,$Email_msg,$email_subject,$email_from;
$mail = new PHPMailer();
$mail->IsSMTP();// send via SMTP
$mail->Host = "localhost"; // SMTP servers
$mail->SMTPAuth = false; // turn on/off SMTP authentication
$mail->From = $email_from;
$mail->FromName = $name;
$mail->WordWrap = 50;// set word wrap
//now Attach all files submitted
foreach($attachments as $key => $value) { //loop the Attachments to be added ...
$mail->Body = $Email_msg."Name : ".$name."\n";
$mail->IsHTML(false);// send as HTML
$mail->Subject = $email_subject;
echo "Message was not sent <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
echo "Message has been sent";
// after mail is sent with attachments , delete the images on server ...
foreach($attachments as $key => $value) {//remove the uploaded files ..

I know the that its hard to read the script of this blog , The PHP file is available @ Zainals

Im a CoffeeCup Ambassador !

7 12 2006

CoffeeCup Web Design Software

as quoted

“you have been selected as one of the few that I would like to personally invite to become a CoffeeCup Ambassador. This is an exclusive club of our biggest fans, best users, and closest friends.”

So what is CoffeCup ?

CoffeeCup Software started in a real Coffee House 1996. Our first program was the HTML Editor. Over the last 10 years we have created a lot more Web Design & Flash Software. Our philosophy has always been to create software and services so you can make better Websites. We are dedicated to helping you by offering extraordinary support so we can succeed together. Consider us a partner and a friend, because we really are about Fresh Software and Warm People.

But how can it Help me ?
As in for me , i created a jukebox that would take several weeks in development , in just 2 minutes ! check it out Zainals JukeBox (web Mp3 Player) * I only uploaded 1 song .

You can modify the skin , select between a range of KooL skins and upload em directly to your website … easy eyh ?

Why wait … go download the trials and check em out now  Get CoffeeCup Web Design Software

Get X & Y resolution using flash …

3 12 2006

Been a while since i posted anything about flash ( lazy cow moo) heh !

Ever wanted to keep/save information about your site visitors ?
I think its important to keep an eye on visitors resolutions , so when you get to design a website , you’ll know what dimensions you’re going to use . ( including Operating system and IP ).

now lets start with MySQL DataBase , We’ve got several ways to operate & manipulate Mysql DB , either using shell/Command line or simply use PhpMyAdmin

Lets start with creating a database :

CREATE DATABASE `information` ;

Now lets build the table & fields :

CREATE TABLE `resolution` (
`X` INT(10) NOT NULL ,
`Y` INT( 10 ) NOT NULL ,
) ENGINE = innodb;

Okay enough with mysql , now lets jump to flash & create 2 loadvars() , one to send and one to recieve , then we’ll use System.capabilities object to get the X & Y Resolution and the Operating system running on the visitor machine.
After collecting the information we’ll need to send it to the database using PHP , i’ll show you how ,later in this tutorial .

Flash :

loadObject = new LoadVars();
rcvObject = new LoadVars();
loadObject.Width = System.capabilities.screenResolutionX;;
loadObject.Height = System.capabilities.screenResolutionY;
loadObject.OS = System.capabilities.os;
//send it

rcvObject.onLoad = function() {
if(this.Result==’connected’) {
trace(‘wopsy, something went wronge !!’);

trace(loadObject.Width +’ By ‘ + loadObject.Height + ‘ Using : ‘ + loadObject.OS);

Aight , now lets build the PHP script that will make flash communicate with the database.
It will recieve the loadvars objects and will encapsulate them into php variables :

$host = ‘localhost’;
$user = ‘root’;
$pass = ”;
$db = ‘information’;
$Width = $_POST[‘Width’];
$Height = $_POST[‘Height’];
$OS = $_POST[‘OS’];

$DB = mysql_connect($host,$user,$pass) or die(mysql_error());
mysql_select_db($db)or die();

$query = “INSERT INTO `resolutions` ( `ID` , `X` , `Y` ,`OS`)
NULL , ‘$Width’, ‘$Height’ , ‘$OS’

$result = mysql_query($query)or die(mysql_error());

echo ‘Result=connected’;
echo’some went wrong’;

you can always add more information ( you will need to add more fields into your database) such as time , referrers & ip ..   e.g:


$ip = (getenv(HTTP_X_FORWARDED_FOR))
:  getenv(REMOTE_ADDR);

Referrer: track where you visitors are coming from :

$refer = $_SERVER[‘HTTP_REFERER’];

Time & Date : that will be within the mysql query using mysql function NOW();

$query = “INSERT INTO `resolutions` ( `ID` , `X` , `Y` ,`OS`,`IP`,`time`,`referrer`)

VALUES (NULL , ‘$Width’, ‘$Height’ , ‘$OS’ , ‘$ip’ ,NOW(),’$refer’

thats it 😀
in case you are wondering how are you going to view the details , you can use the grid component within flash to view them with the help of PHP off course .
something like THIS!

i will show you how to do this on my next tutorial

Variables … Why they write/type them this way anyway ?

24 11 2006


Been doing a lil reasearch about variables naming and naming space in programming language , i finally found what i was looking for , a good article about variables naming convention… thought I’d share :

In computer programming, a naming convention is a set of rules for choosing the character sequence to be used for identifiers in source code and documentation.

Reasons for using a naming convention (as opposed to allowing programmers to choose any character sequence) include the following:

  • to make source code easier to read and understand with less effort;
  • to enhance source code appearance (for example, by disallowing overly long names or abbreviations);

The choice of naming conventions can be an enormously controversial issue, with partisans of each holding theirs to be the best and others to be inferior.

ReadMore >>