Mobile Search Engine

On June 27, 2009, in Mobiles, Web Application, by phpsolutions

Best Search Engines

wap.google.com
search.yahoo.com
m.ask.com
surfwap.com
www.guruji.com
tajonline.com/std-codes
indiapost.gov.in

Happy Searching……  🙂

Run C program in Linux

On June 27, 2009, in Linux, Tips, Tricks, by phpsolutions

This is the simple C file “phpsolutions.c” to execute on linux terminal

#include

int main()
{
int i;
for(i=0;i<=5;i++)
{

printf(”n%d %s”,i,”phpsolutions.co.in”);

}
printf(”n”);
return 0;
}

Output:

[root@localhost ~]# gcc phpsolutions.c
[root@localhost ~]# make phpsolutions
cc phpsolutions.c -o phpsolutions
[root@localhost ~]# ./phpsolutions

0 phpsolutions.co.in
1 phpsolutions.co.in
2 phpsolutions.co.in
3 phpsolutions.co.in
4 phpsolutions.co.in
5 phpsolutions.co.in
[root@localhost ~]#

Run Java program in Linux

On June 27, 2009, in Linux, Tips, Tricks, by phpsolutions

This is the sample java file “Phpsolutions.java” to be executed on linux command line…..

import java.lang.*;
import java.io.*;

public class Phpsolutions
{

public static void main(String args[])
{
System.out.println(”phpsolutions.co.in”);
}

}

Output:

[root@localhost ~]# javac Phpsolutions.java
[root@localhost ~]# java Phpsolutions
phpsolutions.co.in
[root@localhost ~]#

wine – run Windows programs on Linux

On June 27, 2009, in Linux, Tips, Tricks, by phpsolutions

wine – run Windows programs on Linux/Unix

wine program.exe [arguments …]
wine –help
wine –version

wine loads and runs the given program, where the program is a DOS, Win-       dows 3.x, or Win32 executable (x86 binaries only).

This will display all the output in a  separate  win-dows (this requires X11 to run).

Install wine on linux (RedHat, Fedora, CentOS…)

# yum install wine

# man wine

Example:

# wine /opt/test.exe

Xmanager

On June 22, 2009, in Linux, Tips, Tricks, by phpsolutions

Xmanager is a powerful and easy-to-use PC X server that runs on Windows platforms. It allows you to bring remote Unix/Linux desktops to your Windows PC seamlessly. You can also run remote X applications securely through the SSH (Secure Shell) protocol even when your Windows PC is inside a private network and a firewall is between your PC and the remote server.

xmanager

xmanager

Xmanager is used in various fields of work including large-scale craft and semiconductor designing and server management in an IDC (Internet Data Center). It is widely used by server administrators of universities and corporations, and personal users who simply want to connect to remote hosts over the internet. Xmanager is an easy and powerful PC X server designed to satisfy the needs and wants of these various users.

Source: http://www.netsarang.com/products/xmg_detail.html

Lab Tips

On June 21, 2009, in Linux, Mysql, PHP, Tips, Tricks, Web Services, by phpsolutions

Database:
1. Delete all information from databse related to, if deleting user or any content from CMS.
2. Use PDO, ADO, Pear, Zend etc. library to connect to database.
3. Take regular backup for database.
4. Use better naming convension.

Folders:
1. Use better naming convension.
2. Take regular backup for folders.
3. Protect project’s folder to unauthorized access, just put index.html or use apache security.
4. Folder name are case sensitive on servers like linux.
5. Don’t use 0777 permission on any folder use 0755.

Files:
1. Use better naming convension.
2. Use better documentation for web files, apply comments for coding and indent it.
3. Make consistency in DB, Filesnames, Variables, Page design.
4. Take regular backup for files.
5. Use caching for file to make site speed more fast.
6. Create debug files .txt, .log, .html etc. (fopen() | fwrite()) for tracking logical bugs.

Images:
1. Use version number in image URL to avoid image caching.
(<img src=”san.jpg?ver=123″ alt=”san” />)
2. Images should have Etags, Max Age and far future expired header for caching.
3. Use a global funtion to display images ( draw_images($src, $attr); )

Class:
1. Use better naming convension.
2. Use encryption class (md5, sha, base64 etc. with salt) for storing password and important data into database.
3. Spidering web page (Curl, Pear etc.) is used for getting content of web page.

Functions:
1. Use function or include files for multiple use of web data to make reusability, integrity and productivity.
2. Use PHP session ID, remote IP and page name on increment views/hits.
3. Make function to load CSS, JS, Links, Forms & Elements, Images, Iframes etc. on webpage. (load_css_file(), load_js_file()….)
4. Looping should be start from Left to Right…

Variables:
1. Use better naming convension.
2. Use defined variables/constants for folder names, DB table names, Files and global variables (avoid hard coding, be happy coder).

CSS:
1. Avoid inline CSS on pages because it effect the page load time & speed also it matter in W3C validation.
2. Combine multiple CSS file in a single file with cached version.
3. Avoid conflict in CSS.
4. Avoid CSS expressions.
5. Use CSS Sprite for images.

JS:
1. Avoid inline JS on pages because it effect the page load time & speed also it matter in W3C validation.
2. Combine multiple JS file in a single file with cached version.
3. Use valid syntax for browser checking in javascript.
4. Avoid duplicate JS function.

Ajax:
1. Minimize the errors in HTML closing tags etc.
2. Use proper hyrarchy for HTML tags.
3. Use Math.random() in Ajax URL as parameter.
4. Send URL as parameter after encodeURIComponent() similar to urlencode() in PHP.
5. Use file_get_contents($url) for first time filling Ajax DIV.
6. Use new window to display javascript alert debug messages as append messages in log files.
7. Use Ajax Cached version.

WebPage:
1. On login page username/password should be case sensitive.
2. Open terms of use page in popup window on registration page.
3. Use better UI for Errors/Success messages.
4. Use cancle button near submit button.
5. Use captcha code on pages by session value to avoid Spams.
6. Put valid ALT values in IMG tags.
7. Use Enter button event on form’s submit control.
8. Use scrolling DIV on webpages for better GUI.
9. Use returnto parameter for redirecting page after login.
10. Use remember option on login page.
11. Use valid/correct statements in error/success/warning messages.
12. Use dynamic Title and Meta tags on page.
13. Use error pages like 404, 500 etc. by .htaccess
14. Use good NO/Blank image for image not found.
15. Use htmlspecialchars() in strings displayed on webpages for W3C validations.
16. Use favicon for webpages for better GUI.

Emails:
1. Use good words like Dear, Regards, Thanks etc. in emails.
2. Attach some links, images, videos etc. for proper understanding.
3. Use reference and ref. # in emails.

Tools:
1. Use IDE like APTANA, Dreamweaver, Zend Editor.
2. Use DW’s context menu for HTML/PHP code to avoid W3C errors/warnings.
3. Use FireFox plugins for development (Web Developer, Firebug, Scribefire, ColorZilla, FireFTP, S3Fire, ElastoFox, Gtalk, GrabScreen, YSlow, FireShot etc.) for site’s speed, performance and optimization.
4. Make sure we are using secure FTP, Email Client….
5. Command Line tools (putty, CMD etc.) are very good utilities for batch processes and large files.

Search:
1. View source and display function (echo, print etc.) are very useful for finding bugs and faults.
2. Try to search visual concept like jQuery, Ajax etc. on google images search engine.
3. Use google operator for getting better results.

Keep browsing, happy coding…………

Tagged with: