deleting one day old files from folder using php

We given php  code for Checking directory and deleting one day old files from folder using php, from folder in windows or linux through php language. For deleting the files from folder in any system (windows or linux). I created the PHP script for deleting the old files from system.

Earlier I created the script for deleting files from folder but that was for only linux. Then I created script which will work independently. Following script will work in mac or windows or linux.

deleting one day old files from folder using php

 /***************** Delete one day old files ****************/
 $dir = "C://Inetpub/vhosts/yourdomain/tmpfiles";

 if (is_dir($dir)) {
 if ($dh = opendir($dir)) {
 while ($file = readdir($dh)) {
 if(!is_dir($dir.$file)) {
 if (filemtime($dir.DIRECTORY_SEPARATOR.$file) <     strtotime('-1 days')) { //if 1 days old, delete
<div id=":1o">echo "Deleting $dir.$file (old)\n";
 unlink($dir.$file);
 }
 }
 }
 } else {
echo "ERROR. Could not open directory: $dir\n";
 }
 } else {
 echo "ERROR. Specified path is not a directory: $dir\n";
 }
 closedir($dh);

// Above script is platform independent.</div>

how to use rdesktop command in linux

You can use the windows machine from linux OS. Using rdesktop program this is possible. Here is Linux tutorial, how to use rdesktop command in linux. Windows and Linux have made inroads into organizations around the world.

how to use rdesktop command in linux

 

how to use rdesktop command in linux
how to use rdesktop command in linux

Rdesktop is a Linux implementation of Remote Display Protocol (RDP). Windows uses RDP to connect to other Windows computers via Terminal Services. With rdesktop, you can open a remote control session on a Windows NT/2000/XP machine from a Linux box.

On fedora OS rdesktop utility is already installed. If that utility is not installed then use following command to install rdesktop
#yum install rdesktop

Use following command to use the remote desktop

[siwan@siwank-pc ~]$ rdesktop 192.168.2.45

For Full screen Use following Command.

[siwan@siwank-pc ~]$ rdesktop -f 192.168.2.45

How to minumize the rdesktop?

Use the following command. If you are in full screen mode then press ctrl + alt + enter button to back again.

This is very nice utility for Linux and Windows users. Who need to work on both the OS on same time.

Do access the Linux Drives from Windows

Many times we have dual-boot os in computer. Data like file and videos or songs and important docs are spread under windows or linux.

Do access the Linux Drives from Windows

From linux accessing the windows drive there is no issue but from windows we did not easily access the linux drives.

Ext2 Installable File System for Windows

A bit better than the above tool, this utility can give you both read and write access to Ext2 and Ext3 Filesystems from Windows. Plus, once you have this installed, Windows can use it your Linux partition as a paging file as well.

rfsd: ReiserDriver

ReiserDriver allows access to ReiserFS partitions from Windows. The partitions appear like other filesystems, and can be accessed by any windows application. This is yet in kinda like pre-release stage, and installation should prove tedious for newbies.

DiskInternals Linux Reader

DiskInternals Linux Reader has a Windows Explorer like interface, and can provide access to Ext2 and Ext3 Linux partitions from Windows. You can extract files easily from those linux partitions to your Windows partitions.

How to setup Firefox Profile Manager on Fedora or Linux

How to set up Firefox Profile Manager on Fedora or Linux

Firefox has new functionality called Profile manager which will allow you to switch with multiple Users.
You can create many user profiles in Firefox and save that as per your choice.

setup Firefox Profile Manager on Fedora

Many times on same Firefox some user don’t want some addons or theme. That time we got some difficulties.
For avoiding this issue we can create the firefox profile in firefox.

In windows creating Firefox profile is very easy. Just open windows run window and type “firefox -P”. That sit!

You will see following screens.

Using this you can create the firefox profiles.

Now I am going to show you how to create the firefox profile in Fedora.

Open terminal and just type following command

[siwan@siwank-pc ~]$ /usr/lib/firefox-3.5.6/firefox -ProfileManager
[siwan@siwank-pc ~]$

setup Firefox Profile Manager on Fedora
setup Firefox Profile Manager on Fedora

See following screens.
Note: when you got “choose user profile” window. Don’t forget to uncheck the “Don’t ask startup” checkbox.

Note:  I am using the Fedora 11 here for this example.

Share Thunderbird Between Windows and Linux

Many people are using Thunderbird as a email client.

I am using the Windows xp and Fedora 8 (Dual boot OS) on my System. Two years back i was using Microsoft office Outlook for viewing the emails.

Later on i need to work on Linux also. For email check i always i need to go or restart the system and start the Outlook.

Then i moved to Thunderbird which is Open source and free. Important thing is Thunderbird works on Linux and windows both.

My Tip :Share Thunderbird Between Windows and Linux

I installed the Thunderbird for Windows. First save all settings. Then follow my steps:

1. Open Thunderbird ->Click on Local Folders button(Top left button)

2. Choose or click on-> View settings for this account

3. Choose or click on-> Local Folders

4. First go that location by browsing the explorer and copy the folder and paste into your d:  drive.

5. Restart the thunderbird.

thunderbird

You need installed Samba windows share program in your Linux OS. Samba share is the free linux utility for checking windows files or drive.

Then go to Linux OS. and follow the save stages. Which i mentioned in top.

You will be able to use or check same emails on Windows and Linux.

Enjoy.

learn html basics with notepad

We will learn html basics with notepad. html is a basic web design language here i going to show you how to make simple web page using notepad only. In windows.

learn html basics with notepad

notepad

learn html basics with notepad
learn html basics with notepad

first step
open notepad

goto start >> all programs >> accessories >> notepad

now your notepad is open
in web pages having so many types of code so we have to mention bout which code is write
for, this thing will be eiser to write comment on every new code
comment start with // , when web page is run on browser it’s can’t consider that comment

// html language start with this tag in html language every tag tag have to open
& close so here i am given close tag also

<html> // here is open tag
</html> // here is close

now html have internal two parts one is “head” tag & second one is “body” tag in head tag
have to declare web page title also in upcoming article i will show how we can use body tag
for links
body tag is main part of our html web pages here we can write what i have to show in browser
so first head tag

<html>
 <head>
 <title>first webpage</title> // here is title which can seen in title of browser
 </head>
</html>

now start our body tag

<html>
 <head>
 <title>first webpage</title> // here is title which can seen in title of browser
 </head>

 <body>
 this is my first web page in html language !!
 </body>
</html>

now save this notepad file goto file >> save

name it first “webpage.html” & open it in your favourite web browser