Showing posts with label projects. Show all posts
Showing posts with label projects. Show all posts

July 29, 2011

July 23, 2011

Blogger visitors stats [ incomplete ]

No comments:
I made a little something for myself  to track visitor info. and better understand what they want to read on my blog.

I am going to let guys try it too. Here it is : http://djurva.info.ru.com/stats/ It collects user data like refere,ip,useragent,time of visit etc and displays them to site admin. You can see the implementation on left sidebar of this blog.

How does it work ? You embed the image on a target page and it keeps collecting data for you to analyze. ( that simple )

The script is in alpha phase only so bug reports are welcomed.

Do comment if you try it. :)
Read More

July 08, 2011

Songs.pk grabber [ Updated on 7.7.11 ]

38 comments:
This is just an update.

A minor change was brought in regexp of function extract_songs(); :P

Read about the previous version of this script here: http://technoslab.blogspot.com/2011/03/songspk-grabber.html

Demo (provided by a user in a comment below)

mp3.playvm.com/

Download: Songs_pk_grabber_with_tagedit.rar (rar/346kb)

Please register/then login on the forum to download the script.
Read More

July 01, 2011

PHP - lame encoder mp3 conversion

4 comments:
Uses PHP - lame to change ID3 tags and convert bitrate of a mp3 file.

You can change album,artist,trackno,genre,year,comment,artist,art and bitrate.




Link to lame encoder : Click here

Enjoy guys !
Read More

May 29, 2011

Multiple file upload - like cPanel

5 comments:
This is a multiple file upload script like one we have in cPanel.

Features :

  • Public mode.
  • Private mode ( secured by password )
  • Multiple file uploads simultaneously.
  • Secured file uploads.
  • Easy to customize and use.


Read More

May 15, 2011

PHP video conversion script - updated on Jan 2012

392 comments:

** THIS PROJECT HAS BEEN DISCONTINUED ** 


Video workshop 2.3 - screenshots

Video workshop - v2.3
( updated on January 2012 )

This is a video conversion PHP script created by me. It uses mencoder/ffmpeg for encoding videos from one format to another.

Supported extensions :
  • Flv
  • Avi
  • 3gp
  • Mov
  • Mp4
  • Mp3
There are various conversion options that let you change video bitrate,audio bitrate,video dimensions,audio frequency and audio channels.

Features: 
  • Direct upload videos or fetch a URL and upload to server.
  • Convert videos to other supported formats.
  • Convert video to audio.
  • Watermark videos.
  • Generate screenshots of a video at specified position ( in seconds).
  • View conversion command and logs.
  • Simple authentication - Login / Logout mechanism.
  • Extend the script to add more formats by editing configs and optionally adding CLI commands.
Requires : FFmpeg and MenCoder installed on server.

The script is best suited for video based sites hosted on a  VPS / dedicated server.

Installation : Follow readme.txt and then upload all files to your webhost.
Read More

May 08, 2011

PHP function to edit mp3 tags

7 comments:
This is a PHP function that can be used for altering meta data ( tags ) of a mp3 file.

It makes use of getid3 so make sure that it's available in same folder.

Read More

May 01, 2011

Selecting every checkbox on current page - Javascript

No comments:
This Javascript snippet can be used to selected every checkbox on a page. Use ? On Firefox, I used it to select all spam messages which were clogging my junk folder. I launched scrathpad ( Shift+F4 ) and pasted the Js snippet, then ran the script ( CTRL+R) and all check boxes were selected. Then I just sat back and hit the "Trash forever" button. Obviously you can use it for something else.
Read More

April 29, 2011

Get technical specifications of all mobiles available so far

2 comments:
I've installed a new feature named Spec-O-Scope.

It will allow you to view technical specifications of every cellphone available in the market.

If you like the specifications, please view the original website for more ( Links available in the footer on that page )

This plugin was coded by me. Enjoy !!

You can access it from here : http://technoslab.blogspot.com/p/spec-o-scope.html

A link to that page has also been attached to the navigation menu.
Read More

April 28, 2011

Video watermarking using PHP and Mencoder

19 comments:
This took me sometime to figure out, mostly because I'm a non linux based user. I had been working on a site that heavily interacted with user uploaded videos and this called for a need to watermark videos in order to prevent them from getting leeched.

Like any other guy, I firstly thought about using ffmpeg. My search for video watermarking using ffmpeg landed me to pages that talked about vhook module but unfortunately, newer versions of ffmpeg didn't had support for vhook and the video filters that had to replace vhook were/are still under development. ( see here )

My next move was to search for an alternative. I looked for CLI based tools like mencoder and even considered using wine ( bad idea though. ). After lots of research and googling, I finally figured out that mencoder could be used to add subtitles to vidoes and that was it.

I made myself a quickly subtitles file and named it watermark.srt, grabbed a font from my fonts dir and a video file.

I used following command to watermark the video

CLI code :

mencoder a_samp.avi -o b_samp.avi -ovc xvid -xvidencopts fixed_quant=3 -oac copy -sub "watermark.srt" -font "verdana.ttf" -subpos 98

Watch closely. -sub option defines the subtitile file to be used, -font option defines the font file to be used and -subpos defines the position of subtitles file. Rest of the options are for video format and output file name. In this code, we are converting a_samp.avi to b_samp.avi and while doing so, we are copying audio stream as it is but altering video stream using -ovc option. We're also applying subtitles file on the video using verdana font. Note that watermark.srt and verdana.ttf files must be present in current directory. ( Or specify their absolute path  )
( Read more on mencoder options. ) You can get more info about srt files here.

Sample srt file :

1
00:00:1,000 --> 00:00:20,000
Text1

2
00:00:21,000 --> 00:20:30,000
Text2

Explanation :

The srt file simply tells the player to display Text1 between 1 to 20 seconds and Text2 between 21 to 30 seconds and you can easily get a font. Use clear and simple fonts like verdana,arial etc


How to do this in PHP ?


Call a function to execute the command. Eg.shell_exec();exec();system();passthru();



Output :

Fig: Video after watermarking.

Links :

[1]. Download Mplayer / Mencoder
[2]. Mencoder documentation
[3]. Mencoder on wikipedia
Read More

April 17, 2011

Nth thumbnail generation using PHP

4 comments:
This is a small project of mine.

This script generates thumbnail of nokia theme files (.nth) using PHP. It's ideal for wap / web portals that server nokia themes to it's users.

These theme files are simple compressed archive with theme info enclosed in a xml file named 'theme_descriptor.xml'

Follow comment to get an idea of what the script does on each step.


Read More

April 14, 2011

Upload videos to youtube.com via PHP script

4 comments:


A sample script that uploads a specified video to youtube.com under your account.

Setup and obtain API details.

Setup the script and execute it.


Read More

April 13, 2011

Posting to blogger.com via PHP

5 comments:
The following PHP script can be used to post to your blog hosted at blogger.com.

Fill in the credentials, execute the script and the post will appear immediately on your blog.




Download the required file: http://framework.zend.com/download/gdata
Read More

April 07, 2011

TOP 5 hosts for your project.

No comments:

There are many websites which give you the platform for hosting your project codes online. I thought it would be nice to share a list with you.



#1. GoogleCode


The best place to keep your code is to put on the most trusted internet brand. Google Code not only hosts your code source but also provides various resources to you. Here you can find API and toolkits for various streams including the open source programs. It has a feature called code playground where, live online coding can be done and output can be seen. Google code is good platform for developers and for project hosting.


google code 600x93 [List] 5 Best Sites for Hosting Code Online


#2. Sourceforge



An open source code hosting site, here you can easily upload your code and downloads other code of your interest. The most popular code hosting site has suffered from many problem too. It is good site for getting open source software code. There is a high number of downloads of code through it daily.


sourceforge Copy 600x154 [List] 5 Best Sites for Hosting Code Online


#3. Codeplex


The codeplex is hosted by Microsoft but is not under it control. This is also a legitimate site for hosting your code. It is best when came for the .net projects. You can create, search,modify,download and uploads various projects here with simplicity. It too is an open source web host. The rawr is one of it best feature.


codeplex 600x132 [List] 5 Best Sites for Hosting Code Online


#4. Github


The Github provides the option of hosting the code as public or private. They took $7 per month for the private hosting. It supports for the multiple team management make it more versatile. Here you will able to plan your code and price it as well.


github [List] 5 Best Sites for Hosting Code Online


#5. Launchpad



The Launchpad is developed and maintained by the same company which supports Ubuntu Canonical Ltd. This as is open source and code hosting is done by so-called Bazaar. Answer tracking and mailing list helps the member interaction. It too supports for the translation as well.


launchpad 600x70 [List] 5 Best Sites for Hosting Code OnlineTry out these sites which host code and do drop in your comments if you have more services to add to the list. icon smile [List] 5 Best Sites for Hosting Code Online




Read More

April 05, 2011

No comments:
MySQL dumper function - used to create standard mysqldump file for a whole database of selected table(s).

- For multiple Tables, table names must be comma separated value.
- For all tables, use "*" in place of table name.
- Prevent the script from timing out / running out of memory in case your database is huge.

Read More

March 08, 2011

Extremely simple jQuery tooltip

4 comments:



Here's a very simple jQuery tooltip which converts title of a link to tooltip.


  • Converts all link's title to tooltip.
  • Very easy to implement.
  • Tooltip can have images / icon as well.
  • Easy to customize and alter looks using css.



Include jQuery in your pages :

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>


Now, define the tooltip as follows :

<script>
function d(x){
return document.getElementById(x);
}
function implementtt(){
links = document.getElementsByTagName('a');
num = links.length;
for(i=0;i<num;i++){
elem = links[i];
if(elem.getAttribute('title')==null || elem.getAttribute('title')==''){

}
else{
title = elem.getAttribute('title');
elem.setAttribute('onmouseover','tt(this,"'+title+'")');
elem.removeAttribute('title');
}
}
}

window.onload=function(){implementtt();}

function tt(x,y){
$('#tt').show();
$('#tt').html(y);
$(x).mousemove(function(e){
Px = e.pageX;
Py = e.pageY;
d('tt').setAttribute('style','position:absolute;top:'+Py+';left:'+Px+';');
});
$(x).hover(function(){},function(){$('#tt').hide();})
}
</script>


add some style to your tooltip : ( used some css3 )

<style>
#tt{
position:absolute;
background:rgb(50,50,50);
color:rgb(255,255,255);
opacity:0.8;
-moz-border-radius:5px 0px 5px 0px;-webkit-border-top-right-radius:5px 0px 5px 0px;-khtml-border-radius:5px 0px 5px 0px;
padding:5px;
margin-top:15px;
margin-left:15px;
font:9px verdana;
z-index:99;
}
</style>


and finally, add the tooltip container to your page :

<span id='tt'style='display:none;'></span>


and there you go. All the link title(s) of your page would be transformed into a beautiful,easy to customize tooltip. You can add images and more..

Click here for demo

Read More

March 07, 2011

PHP - Mysql sanitizer function

5 comments:
This is my sanitizer function that I use on every variable before placing them in a query.
Hope you like it.
Read More

March 06, 2011

FFmpeg class - Generate video screenshot using PHP

5 comments:
Generate video screenshot using PHP

Usage :

  • First param is video path.
  • Second param is the number of screenshots to be taken.
  • Third param is the path to ffmpeg executable.
  • The script must have execute permission.
  • You should have a directory named thumbs with write permission.
  • You can watermark the resulting image and merge then all to get a single screenshot.


Download : ( code hosted at pastebin.com )

Read More

March 05, 2011

PHP visitor counter script [ no SQL - flatfile based ]

3 comments:
- Shows total visits ( page loads ) and total number of currently online visitors.
- Doesn't require a database for storage / uses text file.
- Very easy to implement and use.




Download
Read More

March 03, 2011

Songs.pk grabber ( Grab and serve all Bollywood songs from your site now )

34 comments:



I've coded a nice little songs.pk grabber and I want to share it with you all :

Click here for online demo

It can boost you traffic because all famous bollywood songs would be directly available on you site.

Features list :
  • Serve direct links from songs.pk
  • Transfer the mp3 to your server and then serve it.
  • Transfer the mp3 to your server, alter / remove meta data of audio files ( tags like album artist, comments etc ) and the serve it.
  • Completely CSS based template for easy modification and customization of looks.
Drop in your comments about the script or request a new feature. Dependencies : - GetID3 used for editing mp3 tags. Download : See pastebin.com's link given below in a comment.

NEW UPDATED SONGS.PK GRABBER SCRIPT WITH TAG EDITING

Read More