Posts

Showing posts from February, 2013

How to connect with MySQL database using PHP

Connecting to MySQL database is very easy. To do this you have to follow some basic steps. Here are the steps:  Create a connection for MySQL database Select the Database Close the Database Create a connection for MySQL database: To do this you can use mysql_connect() function. This function is used to connect with MySQL database. mysql_connect() function takes three parameter. The first parameter is serverName, second parameter serverUsername and the last parameter is serverPassword. We can write this function like this  mysql_connect(serverName, serverUsername, ServerPassword)   We use Vertigo server. In Vertrigo server the serverName is localhost, the serverUsername is root and the serverPassword is vertrigo so we can write the function like this  mysql_connect(localhost, root, vertrigo)  Note: In ZAMMP server there are no password is needed so the server password could be null.  The real PHP code to connect with MySQL database like this  <?php $serverName=”localhost”; $serverU

20+ PHP project idea for damn coders

This is another tune for giving you idea on PHP project . I know a word "implementation is nothing but idea is everything", that is the main case and when I found real life problem I try to think it as a PHP project and also as a problem. I already write two tutorial on PHP project idea and this is another one for you. Before reading this tutorial you can look over this two tutorial 10+ PHP project ideas and Some PHP project idea for absolute beginners  You are a PHP developer, a damn PHP coders or you are a university student is trying to develop at least one PHP project to get well enough experience but you have not came up with beautiful idea ever right! OK it is not a big issue, here along the way I will try to provide you 20+ PHP project idea that will be very helpful.   I will add idea or update the post when I will be able to find any PHP project idea, and also you can share your PHP project idea by commenting. PHP project idea list:  I have created a PHP pr

Integrate WordPress With Magento

Running an ecommerce site enables you to build an online presence all across the globe, not only this it delivers other several amazing benefits as well and nowadays the demand for ecommerce store is also increasing day by day at a very fast pace. Do you want to integrate WordPress into your Magento shopping cart ecommerce store? Here's an effective way of doing so. Although the installation process is a bit technical but in the end you would surely get amazing end results out of it as WordPress and Magento blend quite well together. One of the best ways of integrating WordPress into your Magento shopping cart ecommerce store is by using Lazzymonks Blog Extension for Magento. Below mentioned are some effective steps for setting up WordPress blog into your magento site. Setup WordPress into Magento The first and foremost step to do is to get the extension key by going to the extension page. If in case you are have already tried your luck with installing Lazzymonks WordPress integ

Some PHP project idea for absolute beginners

You want be PHP developers, you want to be an PHP expert, you want to know how to nourish yourself in step by step procedure as a PHP beginner. So this tutorial for you.  PHP Project Idea Fundamentals: I described 10+ PHP project idea in one of my previous tutorial. If you want to be an expert in any section just like PHP expert, C# expert or any other sections, you have to develop your skills gradually by doing some real life project. One of my friend said me, if you want to be an expert in PHP, at first you have to do two or three PHP project otherwise you cannot say you are an expert. After doing lots of research I understand that real life project is the building block of your PHP learning path right! so I am here to give you some PHP project idea that is very essential for beginners. You have just completed our PHP basic tutorials , so you want to develop real life PHP project but you cannot come up with idea. I want to tell you one word idea is very important thing but impleme

Android App Designing: Easy to Implement Tips and Techniques

Although Android platform provides a plethora of challenges but creating apps on it is way too rewarding at the same time. Android is one platform that is seeing an immense growth in today's time. Below we have mentioned some useful tips and techniques to get your hands on Android app designing. Make Use of Fonts Although Android contains two fonts: Roboto and Droid Sans, that are a great fit (especially Roboto) for small screens, but you are not restricted or limited to use only them. Any font (in TTF format) can be packaged within an app. Emphasize on Brand Visual designing is yet another factor that should be given huge importance and attention. Some people live in a myth that using recognized UI design patterns will make their apps less distinctive. This isn't true. These apps are way too effective and impressive. Hence, instead of thinking how to use the app, users should appreciate that how effectively the app helped them solve their problem. Speaking of visuals, the f

Benefits Of Opting WordPress Migration Service

You must have read that many times that before opting a CMS (Content Management System) platform think twice as the chosen CMS will last for whole life with your website. But this is not the thing now, that time has gone long back when you are supposed to stick with the CMS you started your website development project. If you are not satisfied with the performance of your existing CMS platform then this is the right time to search for the one that can fulfill all your desires. Some questions that you need to ask yourself before migrating to some other CMS platform: Which is your preferred alternative CMS platform? Is the chosen platform meets the needs of your website? Which is the most efficient method of migration? WordPress, started as a blogging platform, has became the most popular CMS platform. One can create almost any kind of website with WordPress, be it a political website, corporate website, blog site, eCommerce website or any other. This is the reason what makes WordPress n

Optimizing Joomla for Enterprise Implementations

Some years back, the only purpose for which people used Internet was to check their emails. But, times have changed now; advancement in technology has increased the number of people taking help of the Internet in search of various products, services and information. With these advancements, came some adversities that made it difficult to make your online presence noteworthy. Especially when the competition is at its peak as everyone out there is striving to rank at the top of various popular search engine results. Listed below are a few ways that can help you in increasing the reach of your website by improving its rankings in search engines results i.e. optimizing a Joomla website. Optimizing a Joomla website includes converting a PSD (Photoshop Document) file into Joomla. as search engines are not able to crawl a PSD file, which results in low rankings of a website. So to avoid such problems, it is a must to have an optimized Joomla website. Before we discuss the benefits of optimizi

Designing a Website: Pitch Professional Drupal Developers

Earlier, a website was needed to aware others about the service/ products provided. It was considered an informative tool before times changed. Today, having an informative website is not good enough to make your existence worthy in this highly competitive digital world. Nowadays, websites have become a powerful tool that not only aware your potential customers about the services you provide, but also helps in performing various other online business activities. Various CMS (Content Management System) platforms, have made it very easy for web developers to create a well-functional and feature-rich website and at the same time made it really simple for CMS users to manage and maintain their websites. Drupal, one of the most powerful open-source CMS platforms, is very popular these days among web developers as well as users. The chief reason that has made Drupal this famous, is that it can meet the need of almost all online businesses by creating nearly any kind of website, be it an orga

PHP caching: shm vs. apc vs. memcache vs. mysql vs. file cache (update: fill apc from cron)

Lessons learned: shm/apc are 32-60 times faster than memcached or mysql shm/apc are 2 times faster than php file cache with apc php file cache with apc is 15-24 times faster than memcached or mysql mysql is 2 times faster than memcached when storing more than 400 bytes memcached is 2 times faster than mysql when storing less than 400 bytes php file cache with apc is 2-3 times faster than normal file cache php file cache without apc is 8 times slower than normal file cache Tests were made with PHP 5.3.10, MySQL 5.5.29, memcached 1.4.13, 64bit, 3.4GHz (QEMU): shm 0.031 0.020 0.021 0.021 0.026 0.028 0.032 0.042 0.084 0.155 0.290 0.629 0.110 Total: 1.489, Avg: 0.115 apc 0.025 0.025 0.025 0.026 0.031 0.036 0.043 0.060 0.106 0.171 0.328 0.756 0.097 Total: 1.728, Avg: 0.133 memcache 3.116 3.014 3.005 3.072 3.077 3.910 3.929 4.067 4.308 10.371 15.323 25.013 3.281 Total: 85.488, Avg: 6.576 memcache socket 1.736 1.756 1.981 1.780 1.809 1.907 1.941 1.983 2.225 9.368 14.071 24.897 1.979 Total:

Refactoring ASP.NET MVC Routes

Routing is vital to MVC. Routing defines mappings between URL and ActionMethod - that would handle request to that URL. For example, following route mapping defines that when a user hits "http://mysite/shopping/cart", call OrderController's ShowCart() method to handle this request. routes.MapRoute("cart", "shopping/cart", new { controller = "Order", action = "ShowCart" }); Placing Routes A common place to put route mappings is in  RegisterGlobalFilters method inside Global.asax: public class MvcApplication : System.Web.HttpApplication { public static void RegisterGlobalFilters(GlobalFilterCollection filters) { //Define Routes routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Login", action = "Index", id = UrlParameter.Optional } // Parameter defaults ); } } Often, you would us

Effective Measures to Market an Android App

Today, in this highly competitive digital world, having just a featured app is not enough, in order to achieve success you need to have a winning marketing strategy. To help you with this, we have mentioned some tips to guide you with the process of marketing an Android app successfully. With technology evolving at a fast pace and world becoming an advanced tech-driven world, people no longer use computers or laptops to fulfill their basic technical requirements. Hand-held devices are more often used to turn on the Internet world with the help of numerous mobile apps that have made everybody's life much more easier. Today, the biggest app store is dominated by Android and it is constantly adding more and more apps for its users. It provides rich user experience, flexible app development and feature rich apps, and these are the major reasons why Android has an amazing world wide acceptance. In this highly competitive digital world, having just a featured app is not enough, in order

PSD File to Joomla: A Crafted Conversion

In this tech-driven world, where technology has evolved to an amazing level and where every business wants to have a global online presence, thousands of CMSs (Content Management System) have come into existence which have changed the whole way of controlling and managing a website's content. Certainly, there are many CMS platforms available out there, but to create the most amazing website, one needs to choose the best CMS out of them. Speaking of CMS selection, choosing the “right” CMS for your site is one of the most difficult tasks. Luckily, Joomla is one CMS platform, which is highly popular in present time. Converting PSD file to Joomla is one conversion that enables a site to acquire highly customizable application in addition to the extensibility of Joomla. Surely, PSD (Photoshop Document) to Joomla conversion is not a child's play, it requires the guidance of some reliable, proficient or experienced developer who can carry out the task effortlessly. This post focuses o

Shopping cart tutorial using PHP and MySQL

Hello all, in the whole tutorial we are going to build a simple shopping cart using PHP and MySQL. Building shopping cart is an easy tasks. This tutorial is very efficient for beginners. So here is the contents that will be discussed within the whole tutorial. Creating the Database Building the Registration Form Connecting with Database

Next generation refactoring with syntactical grep and patch from pfff

Image
Refactoring of PHP methods is often difficult: syntax errors or non-existing methods are only detected during runtime wrong method calls or uninitialized variables are only detected during runtime wrong order of parameters often remains undetected not enough unit tests to validate the changes not many resources for refactoring (time + money) We can solve most of these issues by using a few tools for syntactic analysis. You might have already worked with grep to search your code: # find a function in all PHP files (and sub-directories) grep -rin "SomeFunc(" *.php This also finds "doSomeFunc(" as well as strings or documentation containing "SomeFunc(". If you want to find all occurrences of SomeFunc() with exactly 2 parameters or at least 1 parameter, things get complicated. Happily, Facebook has released a few tools to run static analysis and source-to-source transformations on PHP code. The package is named pfff and is available on GitHub . Synta

Drupal Development: One Step Closer to Success

Technology has evolved over the years and so has the world. With the advent of some amazing advanced technologies like Internet, mobile Internet and many more, world has taken a huge turn and has made everybody's lives way too advanced. Not only this, with technology evolving tremendously all businesses are also making new dimensions, people are becoming tech-savvy and world is becoming a tech-diven world. If we talk about Internet, then it has given a lot to lot many people like it has given opportunities for businesses to increase their brand awareness by taking their business across the globe and increasing their reach. In present time, the only dream of every businessmen is to have an attractive, unique, appealing and successful website that gets a huge amount of traffic every single day and also establishes a good web identity. Luckily, Drupal is one CMS (Content Management System) platform that helps these businessmen live their dream. With Drupal one can create user-friendly

Analyze log files from several servers in real-time (update: whois, firewall)

Image
First, we setup a machine to analyze the logs: # install missing packages (e.g. with Ubuntu 12.10) apt-get install netcat logtop # create a ramdisk with 1GB for storing the logs mkdir /ramdisk mount -t tmpfs -o nosuid,noexec,noatime,size=1G none /ramdisk # receive logs on port 8080 ncat --ssl -l -k 8080 > /ramdisk/access.log # open second terminal tail -f /ramdisk/access.log | logtop # clean up the ramdisk from time to time echo >/ramdisk/access.log Second, we setup the web servers: # install missing packages apt-get install netcat # send logs to analyzer-ip:8080 tail -f /var/log/apache2/access.log | ncat --send-only --ssl <analyzer-ip> 8080 Besides access.log, we can also monitor other log files using different port numbers. Let's start watching the requests coming in: Instead of analyzing each line separately, we can also aggregate all requests by client IPs: tail -f /ramdisk/access.log | awk -Winteractive '{print $1}' | logtop Or we can aggregate al

Tips To Market An Android App

Some years back people used to operate desktop computers and laptops for their basic technical needs. But time has changed now advancement in technology made it really easy for people to make their basic needs fulfilled with a handhold device. Various apps out there has made people day-to-day life very easy and hence has became a part of it. Undoubtedly Android has one of the biggest app store that is dominating the app world in present times. Moreover, Android app store is constantly adding more and more apps to their surfeit of apps. The main reasons behind this world wide acceptance of Android are its rich user-experience, featured-rich apps and flexible app development platform. Nowadays, having a featured app is not enough to get success in this highly competitive digital world as many Android market is already have surfeit of similar app. So to make your app success it is must to have a winning marketing strategy. To make that task easy for you, here we have compiled a list of a