Apr 29 2011

Grab audio from youtube

You are to extract audio from youtube. You don’t want the video because the uploader upload ^%*&^%^% video. but you know the audio is great. in other words, you want to extract song from youtube video that is *%^*^&*^.

i use this:

http://www.youtube-mp3.org/

it’s an online tool. simply paste the link there and click convert. after a while, a download link of your mp3 files will magically appeared. just click and fantastically bombastic plastic you will be downloading the mp3

up to now, there is/are no bloody damn popup/ads appear. they just have that ads on the web. no such things as popup. as for now.

Apr 16 2011

gallery

play around til almost 6am. hahaha. it’s not that play. trying to comeout with something called photo gallery chap dok tau benda. dumped here as for my reference and maybe for yours too.

a.php is the page that display all the thumbnail image. the idea is when we click the thumbnail, new link opened and displayed full-size image.

a.php contains:

<?php
$imgno = “0”;
$file = fopen(“images.txt”, “r”) or exit(“Unable to open file!”);

while(!feof($file))
{
$templine = fgets($file);
$templine_exp = explode(“///”, $templine);
$tempgif = str_replace(“.jpg”, “.gif”, $templine_exp[0]);
echo $imgno;
echo “<br/><a href=b.php?id=” . $imgno . “><img src=” . $tempgif . “></a><br/>”;
$imgno++;
}
fclose($file);
?>

b.php is the page that will display single full-size of image. this script however display thumbnail image because full-size image is to big and i’m not that rajin enough to resize because i just want it to work as for now.

<?php
$img_no = $_GET[“id”];
$lines = file(‘images.txt’);
foreach ($lines as $line_num => $line) {
}

$images = array_reverse($lines); //reverse array.
$imgdetail = explode(“///”, $images[$img_no]); //every detail goes into array. [0]=filename, [1]=Description

//displaying images
$dispgif = str_replace(“.jpg”, “.gif”, $imgdetail[0]);
echo “<img src=” . $dispgif . “></a><br/>”;
echo $imgdetail[1];

?>

images.txt is the “database”. this is where we store images details. it contains:

4.jpg///Test gambar 4
3.jpg///Test gambar 3
2.jpg///Test gambar 2
1.jpg///Test gambar 1

now is why i dun resize the full-size. actually i tried. but my hosting didn’t support imagick class php. if i want to use imagemagick i need to execute it as system using exec, system func in php.

sekian, selamat pagi.

Apr 09 2011

kerja

sometimes it doesn’t take to be at office to do work. or even it doesn’t take to work for a work to be done.

sometimes it takes more time to finish a work. sometimes time is just not enough to finish a work.

sometimes work demand for times.

there is no time with no work. need to know what is work and what is not. you are not working if you are not doing. no work if no do.