Sunday, April 5, 2026

Shaam se ankh men namin si hai

Aj fir ap ki kami si hai

  

Dafn kar do hamen ke saans mile 

Nabj kuchh der se thami si hai

Aj fir … 


Wakt rahata nahin kahin tikakar 

Isaki adat bhi adami si hai

Aj fir … 

 

Koi rishta nahin raha fir bhi

Ek tasalim laajami si hai

Aj fir …

Monday, October 21, 2013

All time favt.

होशवालों को खबर क्या बेखुदी क्या चीज हैं
इश्क कीजिये फिर समझिये, जिन्दगी क्या चीज हैं

उनसे नज़रे क्या मिली, रोशन फिजायें हो गयी
आज जाना प्यार की जादूगरी क्या चीज हैं

खुलती जुल्फों ने सिखाई, मौसमो को शायरी
झुकती आँखों ने बताया, मयकशी क्या चीज हैं

हम नजर से कह ना पाए, उन से हाल-ए-दिल कभी
और वो समझे नहीं, ये खामोशी क्या चीज हैं

इतना ना मुझ से तू प्यार बढ़ा, के मैं एक बादल आवारा
कैसे किसी का सहारा बनू, मैं खुद बेघर बेचारा
इसलिए तुझ से मैं प्यार करू, के तू एक बादल आवारा
जनम जनम से हूँ साथ तेरे, हैं नाम मेरा जल की धारा

मुझे एक जगह आराम नहीं, रुक जाना मेरा काम नहीं
मेरा साथ कहा तक दोगी तुम मैं देस बिदेस का बंजारा

ओ नील गगन के दीवाने, तू प्यार ना मेरा पहचाने
मैं तब तक साथ चलू तेरे, जब तक ना कहे तू मैं हारा

क्यों प्यार में तू नादान बने, एक पागल का अरमान बने
अब लौट के जाना मुश्किल हैं, मैने छोड़ दिया हैं जग सारा

Friday, October 18, 2013

Mysql query for save output in excel sheet

<?php
error_reporting(0);
$hostname='localhost'; 
$user='root';
$pass='';
$dbase='database_name';
$connection = mysql_connect("$hostname" , "$user" , "$pass"); 
$db=mysql_select_db($dbase , $connection);

$filename="filename_".date('d-m-Y')."_info.csv";
$date= date("Y-m-d");
$yesterday = date('Y-m-d', strtotime($date. " - 1 day"));

$qry= "SELECT 'field1','field12',DATE_FORMAT(in_date,'%d-%m-%Y')
as in_date,TIME_FORMAT(in_time,'%H:%i'),DATE_FORMAT(out_date,'%d-%m-%Y') 
as out_date,TIME_FORMAT(out_time,'%H:%i'),shift,remark 
FROM tablename where in_date='$yesterday'
INTO OUTFILE 'c:/foldername/$filename' FIELDS TERMINATED BY ','
ESCAPED BY '''' LINES TERMINATED BY '\n'";


$result = mysql_query($qry,$connection);
if (!$result) {
    die('Invalid query: ' . mysql_error());
}else
echo "Please check file in c:/foldername/$filename";
?>

Monday, October 14, 2013

Start WAMP server and run index file through batch file


Create wamp.bat file and copy following code in it.
this code at localhost will start wamp apache server on specific time as per you schedule it. 
and run this specific file, here index.php file run automatically for the specific purpose , as per your 
requirement.



 
start C:\wamp\wampmanager.exe
start C:\wamp\bin\php\php5.3.13\php.exe -f  C:\wamp\www\index.php

Connect FTP through Batch file and transfer file


Create copy.bat file and copy following code
this code will connect ftp server with its user name and password
this code transfer the local files on to the FTP server, Note this batch file need to scheduled on
windows schedule task to run this specific task


 
@ftp -i -s:"%~f0"&GOTO:EOF

open 210.212.176.115

FTP-Username 

FTP-Password

lcd c:\WEIGHBRIDGE

binary

mput "*.*"

::!move c:\chpdata\data\*.* c:\chpdata\backupdata\

disconnect

bye



pause

Wednesday, October 9, 2013

How to get MAC Address by using PHP

How to get MAC Address by using PHP

 

<?php

$rmIp = rtrim($_SERVER['REMOTE_ADDR']);
$location = rtrim(`arp -a $rmIp`);
//print_r($location);
$location = preg_replace('/\s+/', 's', $location);
$location = split('\s',$location);
$mac="";
$num=count($location);
//var_dump($location);
echo $mac=strtoupper($location[16]);

?>

Scheduling Oracle database backup through Batch file

As per day to day business transactions  saved in a database (Here ref is oracle) . The database
backup in large/small organization is prime importance, follows example depicts how to take backup in routine by using batch file scheduling in windows environment.


Syntax:
EXP userid=`userid/password@sid owner=`schemaowner`
File=`path with filename.dmp `
log=`logfile path with dmp`

Here User ID might be SYSTEM,MANAGER with its password
-sid means  The Oracle System ID (SID) is used to uniquely identify a particular database on a system.


Exporting the Whole schema

Save this 4 lines of code and name the file BUP_NEW_BACKUP.bat

EXP  USERID=SYSTEM/yourpassword@G_PPMS
FILE=D:\backup.dmp OWNER=TRUSTGA(User Name)
LOG=D:\backup.LOG
COPY D:\backup.DMP  \\compname\backup

After saving this file, need to schedule a task in windows environment

To open Scheduled Tasks, click Start, click All Programs, point to Accessories, point to System Tools, and then click Scheduled Tasks.

To schedule a new task:
  1. Double-click Add Scheduled Task to start the Scheduled Task Wizard, and then click Next in the first dialog box.
  2. The next dialog box displays a list of programs that are installed on your computer, either as part of the Windows XP operating system, or as a result of software installation.

    Use one of the following procedures:
    • If the program that you want to run is listed, click the program, and then click Next.
    • If you want to run a program, script, or document that is not listed, click Browse, click the folder and file that you want to schedule, and then click Open.
  3. Type a name for the task, and then choose one of the following options:
    • Daily
    • Weekly
    • Monthly
    • One time only
    • When my computer starts (before a user logs on)
    • When I log on (only after the current user logs on)
  4. Click Next, specify the information about the day and time to run the task, and then click Next.

    Note that the information about the day and time to run the task vary depending on the selection that you made in the previous wizard dialog box. For example, if you chose Weekly, you must indicate the day of the week, the time, and if the task should run every week, every 2 weeks, every 3 weeks, and so on.
  5. Type the name and password of the user who is associated with this task. Make sure that you choose a user with sufficient permissions to run the program. By default, the wizard selects the name of the user who is currently logged on.
  6. Click Next, and then click Finish after you verify the choices that you have made.

 That it! your database backup regularly saved at specified
 location what you write in batch file. Just track that file
 in a daliy basis means rename it manully and check .dmp
 file size for ensuring backup is going right way.