Archive for the ‘PHP’ Category

Zainals.com re-built ..

Wednesday, August 1st, 2007

Zainals Best flash design

In a desperate try to change the way i design websites i had the guts this time to use brighter colors rather than dark colors like you have seen before and im really impressed with the final render . I got out of the boxy model websites .
The good thing now is that i can integrate PHP & MYSQL into my designs to create Dynamic sites like the news and the portfolio , the layout is a liquid design or so called full flash browser that resizes some of the content and centers the main content in the middle depending on user resolution …
oh ya …You have to listen to that track on my website now it ROCKS !

www.zainals.com

Like Moe ( Munther ) said , i like your designs but they are all dark , so thanks moe that got me started a new design era =] …

Play youtube videos in flash tutorial

Wednesday, July 4th, 2007

Like i promised many of you , here is a quick video tutorial on how to load youtube videos in flash , the only thing is im running out of time and i have many other projects to deal with so its a kinda fast so Listen and watch carefully , if you have a question regarding the tutorial you can always post a comment .

Things to remember :

  • AbdulQabiz youtube php engine that is downloadable with the example sourcecode ( Many thanks to him ) .
  • Dont forget to get your own developer ID since all the rest requests requiers the dev id e.g:
    http://www.youtube.com/api2_rest?method=youtube.users.get_profile&dev_id=YOUR_DEV_ID
    NOTE THAT YOU WONT NEED A DEV_ID IF YOU WILL MANUALLY ADD THE YOUTUBE VID LINKS .
  • Read the INTRODUCTION and the DOCUMENTATION .

Things to consider :
The application i built at http://www.zainals.com/xperments/youtube is reading the XML file from youtube , now i didnt explain much about that because its a different topic but if you would like , i can make another video about xml when im free , but for the time being google it , you can find many tutorials at kirupa gotoandlearn.com and tutorialvid.com

Unfortunatly youtube disabled or changed their crossdomain xml file as mentioned on abdulqabiz blog , and will have to use some sort of a proxy script e.g :

<?php
$dataURL = "http://www.youtube.com/api2_rest?method=youtube.videos.list_featured&dev_id=YOURDIV_ID";
//note that this will not follow redirects
readfile($dataURL);
?>

Enjoy the following vid … Enlarge the vid for a clearer preview …

OK … I need testers !

Sunday, July 1st, 2007

i need you people to test the demo application running live on my server …

http://www.zainals.com/final_project/

click on register ( not the bottom one ) , after registering , click on login> Upload your images … thats it , an email should be sent to you when registering with a link to your gallery ..

e.g , you register under the name xyz then the path to your gallery is http://www.zainals.com/final_project/xyz .

NOTE : the site might take time to load , preloader still not added … so be patient :-)

Flash gallery experiment …

Thursday, June 28th, 2007

this is a part of my final project which im about to finish , the project name is ” The Gallery ” .

The project is based on flash interface front end , php mysql backend , it allows users to register > creates a link for their own gallery , the user then can upload jpegs which gets resized depending on the size of the picture , then saves em into the Database .

Features also includes user CP ( upload & Delete images ) , Admin CP ( Approve new uploaded images )

Click on the image to view the gallery , it still needs some tweaks ( and do not start annoying me about the weightlifter ;) )

Flash Gallery

Flash PHP integration demo

Sunday, June 17th, 2007

Made this quick , nothing planned just came straight from my brain to the vid lol .
So excuse my mistakes and my terms …

http://www.tutorialvid.com/viewvideo/516/Flash_PHP_MYSQL_integration_Demo/

Get wordpress posts in flash …

Monday, March 26th, 2007

got flooded recently with emails requesting a tutorial on how to get wordpress posts into flash , now i dont have enough time to make a tut , but i will go through it in here quickly so pay attention .

Important links :
XML-RPC on Wordpress
XML-RPC home
XML-RPC tutorial press

———————————————-
Now as far as i remember i downloaded the movable type class from here http://www.dentedreality.com.au/bloggerapi/

download the MTC ( movable type class ) and extract them in your folder on your webspace ( should support php) .

Now open up a new php document call it what ever you want , i called it test.php copy & paste the following code :


include_once("class.mtclient.php");
$username = "USERNAME"; //Blog user name
$password = "PASS"; // Blog Pass
$host = "zainal.wordpress.com"; //change this to your wordpress site
$path = "/xmlrpc.php";//"/path to xmlrpc , keep it as it is , sometimes it needs
// the full path e.g www.abcd.com/blog/xmlrpc.php
// create a new blog
$blog = new mtclient($username, $password, $host, $path);
//get last 6 posts ...
$myBlogs = $blog->getRecentPosts($username , 6);
//cant remember why i kept the counter ….
//OH YA the counter will be used to plot user_data e.g user_data1 , user_data2 , notice the &
// mark below its what flash will read and split data based on ” | ” ….
$counter = 1;
// loop through the MultiD array
for ( $row = 0; $row < 6; $row++ )
{
//At this end you can always Produce XML doc , or as in my case i added "|"
// so i can split Data in flash later on ...
print "&user_data$counter=".$myBlogs[$row][title].'|'.$myBlogs[$row][link];
$counter++;
}
?>

now you can get more than title and link here is an explanation :

/* usage:

requires the following files to be in the same directory:
class.bloggerclient.php
xmlrpc.php

re-implements the following methods with metaWeblog
which returns strings “description”, “link”, and “title”
instead of a single “content” string.

getRecentPosts
getPost
newPost
editPost

also adds the special movabletype methods
which allow category assignment and retrieval
and for listing of supported methods

getCategoryList
getPostCategories
setPostCategories
supportedMethods

example:

include_once(”class.mtclient.php”);

$username = “myusername”;
$password = “mypassword”;
$host = “www.myhost.com”;
$path = “/path/to/mt-xmlrpc.cgi”;

$blog = new mtclient($username, $password, $host, $path);
$myBlogs = $blog->getUsersBlogs();
*/

flash code :

var sender = new LoadVars();
var receiver = new LoadVars();
high= 22;
u = 0;
url = [];
receiver.onLoad = function(ok){
if(ok) {
loader.unloadMovie();
for (var i = 1; i <= 6; ++i)
{
receiver["dataPacket" +i] = receiver["user_data" + i].split("|");
var Ntitle = receiver["dataPacket" + i][0];
url[i] = receiver["dataPacket" + i][1];
trace ("data " + Ntitle);
trace ("data " + url[i]);
trace('attaching');
_root.attachMovie("box", "box" + i, _root.getNextHighestDepth());
_root["box"+i].btn.ID = i;
_root["box"+i].pTitle.text = Ntitle;
_root["box"+i].btn.onPress = function() {
getURL(url[this.ID],_blank);
}
_root["box"+i].btn.onRollOver = function() {
trace('get some');
}
_root["box"+i]._y = 65 +(high * u);
trace('hight ' + (high * u));
_root["box"+i]._x = 0;
u++;
delete receiver["user_data" + i];
}
}
}
sender.sendAndLoad("http://localhost/movabletypeClass/test.php", receiver, "post");

Like i said earlier , you can always produce XML doc from the test.php and read that in flash , there are many ways you can read external files , it all depends on YOU !
Flash & php source files can be downloaded from here …@ ZAINALS

Zainals ver 2 sneak peek preview !

Tuesday, February 27th, 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 !

zainals2

zainals2

zainals2

zainals2

zainals2

zainals2

New breed of tutorials , tutorialvid.com.

Thursday, February 22nd, 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 …

Monday, February 12th, 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 Upcoming.org API.

More APIs on :

* Flickr API
* Upcoming API
* del.icio.us 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 !!!

Monday, February 12th, 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 …