Tuesday, August 25, 2009

Ten top php scripts for your website by Bob Ryan

PHP makes it easy to add powerful features to your website with minimal effort through the use of scripts. If you have CakePHP installed, you can use the Paypal Payments Component to set up Paypal to receive payments and donations. CakePHP also lets you display all the latest from your Twitter feed with a script that you can copy and paste from their sites Articles section. Another great feature of CakePHP is that it can allow you to harness the power of jQuery to allow users to upload and crop images. Use this to allow users to upload avatars or post an image for their friends. This script can be found in the "Snippets" section of their site. Another great script provided by CakePHP is the AutoLogin component. Now, a user to your site will have the choice of whether or not they have to log in with each visit. Tired of getting spam in the comments section of your site? Commentia is yet another CakePHP script that helps filter out spam. Other PHP frameworks can provide most of these features. Say you want to see exactly what pages on the site your visitors are viewing most? Take a look at IDLogger, a click-tracking script. The coolest feature of this script is that all the data is returned in real time - you can even track individual users as they move from page to page. Usercart2 makes setting up an online shop a walk in the park. phpBB will give your visitors a bulletin board with which to interact on your site. Set up a blog - or even give users their own blogs - quickly and easily with PostNuke. Finally, keep your news page up-to-date with CuteNews, an easy and powerful way to add and edit news updates.

Read more...

Thursday, August 20, 2009

Connection handling in php by ahsan hashmi

Internally in PHP a connection status is maintained. There are 3 possible states:

0 - NORMAL

1 - ABORTED

2 - TIMEOUT

When a PHP script is running normally the NORMAL state, is active. If the remote client disconnects the ABORTED state flag is turned on. A remote client disconnect is usually caused by the user hitting his STOP button. If the PHP-imposed time limit (see set_time_limit()) is hit, the TIMEOUT state flag is turned on.

You can decide whether or not you want a client disconnect to cause your script to be aborted. Sometimes it is handy to always have your scripts run to completion even if there is no remote browser receiving the output. The default behaviour is however for your script to be aborted when the remote client disconnects. This behaviour can be set via the ignore_user_abort php.ini directive as well as through the corresponding \"php_value ignore_user_abort\" Apache .conf directive or with the ignore_user_abort() function. If you do not tell PHP to ignore a user abort and the user aborts, your script will terminate. The one exception is if you have registered a shutdown function using register_shutdown_function(). With a shutdown function, when the remote user hits his STOP button, the next time your script tries to output something PHP will detect that the connection has been aborted and the shutdown function is called. This shutdown function will also get called at the end of your script terminating normally, so to do something different in case of a client disconnect you can use the connection_aborted() function. This function will return TRUE if the connection was aborted.

Your script can also be terminated by the built-in script timer. The default timeout is 30 seconds. It can be changed using the max_execution_time php.ini directive or the corresponding php_value max_execution_time Apache .conf directive as well as with the set_time_limit() function. When the timer expires the script will be aborted and as with the above client disconnect case, if a shutdown function has been registered it will be called. Within this shutdown function you can check to see if a timeout caused the shutdown function to be called by calling the connection_status() function. This function will return 2 if a timeout caused the shutdown function to be called.

One thing to note is that both the ABORTED and the TIMEOUT states can be active at the same time. This is possible if you tell PHP to ignore user aborts. PHP will still note the fact that a user may have broken the connection, but the script will keep running. If it then hits the time limit it will be aborted and your shutdown function, if any, will be called. At this point you will find that connection_status() returns 3.

Read more...

Saturday, August 15, 2009

Web development companies of Sydney fosters effective rise in online sales by Grace Alexa

In web technologies Australia have been a frontrunner and it is interesting to note that that this country was first to effectively implement electronic commerce. From real estate to retail sector and from newsagents to the trans-state railways, all have interactive web portals. The web development companies of Sydney are now of have high repute, their reputation is not only limited within Australia but it has spreaded across the planet. The Australian website design and website development companies offer cheap but lucrative solutions.

There are plenty of web site development companies and selection of the proper one is indeed a major job. Selection matters and we all weren't to get the best web based presence. This is nothing but a common fact that web presence is now must to do business better. In the recent past even after global economic slow down, online trade remained unchanged. There are different stages of web development and it is good idea to have basic overview of the processes that these Sydney web development companies follow.

Foremost the web development companies send the functional consultants to know the client's requirement better. As the prominent web development and design companies if Sydney focuses high on the client's expectations, each specification of the client is taken seriously. A close comparison is drawn between the competitor sites to judge the best and innovative way of developing a site. As several tools and software are in use while developing a site, the different options of selection of these tools are provided before the clients. As the client specifies the, the developmental process begins.

In case of any change in use of tools and technologies, the clients are informed immediately. And it is only after the approval from the client's end, the Sydney web development companies progress. There are several models of system development and the educated Sydney web developers proceed only as per the system development life cycle. In web sites, look and feel matters a lot and the Sydney web development service providers recruit highly skilled and trained designers and developers who have a strong sense of artistry.

In case of web hoisting, the Sydney web development companies offer cheap rates. Often in case of hosting in Linux platform, special rates are provided. For the client's convenience, different web development companies of Sydney maintain toll free numbers. In case of any urgent requirement the client can punch in these numbers and can inform. So, it can be summarized that the Sydney web development companies offer amazing services at best rates.

There are several companies that offer web based solutions and especially in the city of Sydney, there are plenty of web development companies. Self study along with suggestion from the people who have already taken assistance of these companies can provide a clear insight. This indeed helps to be in the safer side, web development involves investment and a wrong investment without the desired return may be just wastage of bucks.

The community newspapers and the local tabloids might provide information on the different web solution providers of Australia. In Sydney the newsagents may help to obtain a proper newspaper that provides address and details of the different web developers. Still, the final decision making rests upon the shoulder of service seeker.

Read more...

Monday, August 10, 2009

Persistent Database Connections in PHP by ahsan hashmi

Persistent connections are links that do not close when the execution of your script ends. When a persistent connection is requested, PHP checks if there\'s already an identical persistent connection (that remained open from earlier) - and if it exists, it uses it. If it does not exist, it creates the link. An \'identical\' connection is a connection that was opened to the same host, with the same username and the same password (where applicable).

People who aren\'t thoroughly familiar with the way web servers work and distribute the load may mistake persistent connects for what they\'re not. In particular, they do not give you an ability to open \'user sessions\' on the same link, they do not give you an ability to build up a transaction efficiently, and they don\'t do a whole lot of other things. In fact, to be extremely clear about the subject, persistent connections don\'t give you any functionality that wasn\'t possible with their non-persistent brothers.

Why?

This has to do with the way web servers work. There are three ways in which your web server can utilize PHP to generate web pages.

The first method is to use PHP as a CGI \"wrapper\". When run this way, an instance of the PHP interpreter is created and destroyed for every page request (for a PHP page) to your web server. Because it is destroyed after every request, any resources that it acquires (such as a link to an SQL database server) are closed when it is destroyed. In this case, you do not gain anything from trying to use persistent connections -- they simply don\'t persist.

The second, and most popular, method is to run PHP as a module in a multiprocess web server, which currently only includes Apache. A multiprocess server typically has one process (the parent) which coordinates a set of processes (its children) who actually do the work of serving up web pages. When a request comes in from a client, it is handed off to one of the children that is not already serving another client. This means that when the same client makes a second request to the server, it may be served by a different child process than the first time. When opening a persistent connection, every following page requesting SQL services can reuse the same established connection to the SQL server.

The last method is to use PHP as a plug-in for a multithreaded web server. Currently PHP 4 has support for ISAPI, WSAPI, and NSAPI (on Windows), which all allow PHP to be used as a plug-in on multithreaded servers like Netscape FastTrack (iPlanet), Microsoft\'s Internet Information Server (IIS), and O\'Reilly\'s WebSite Pro. The behavior is essentially the same as for the multiprocess model described before. Note that SAPI support is not available in PHP 3.

If persistent connections don\'t have any added functionality, what are they good for?

The answer here is extremely simple -- efficiency. Persistent connections are good if the overhead to create a link to your SQL server is high. Whether or not this overhead is really high depends on many factors. Like, what kind of database it is, whether or not it sits on the same computer on which your web server sits, how loaded the machine the SQL server sits on is and so forth. The bottom line is that if that connection overhead is high, persistent connections help you considerably. They cause the child process to simply connect only once for its entire lifespan, instead of every time it processes a page that requires connecting to the SQL server. This means that for every child that opened a persistent connection will have its own open persistent connection to the server. For example, if you had 20 different child processes that ran a script that made a persistent connection to your SQL server, you\'d have 20 different connections to the SQL server, one from each child.

Note, however, that this can have some drawbacks if you are using a database with connection limits that are exceeded by persistent child connections. If your database has a limit of 16 simultaneous connections, and in the course of a busy server session, 17 child threads attempt to connect, one will not be able to. If there are bugs in your scripts which do not allow the connections to shut down (such as infinite loops), the database with only 16 connections may be rapidly swamped. Check your database documentation for information on handling abandoned or idle connections.

Read more...

Wednesday, August 5, 2009

What is Offshore Web Development? by Geeta Rao

In this time squeezed scenario, who doesn't want to gain optimum profits? It is possible! Only, we need to be little vigilant about the happenings with IT market. Offshore software development is catching up nowadays like wild fire in IT market.

The word offshore software development suggests the method of outsourcing the work or projects to some offshore countries. As it indicates software is developed by a company of some other country then it is recognized as offshore software development. The procedure is acknowledged as outsourcing of software development. The basic intention behind this is to make profit out of restricted funds.

Offshore software development services have the lion's share on the international platform of the world. This mounting technical market provides you with all the profits to inflate your business to a zenith, amplifying your net profit. It has become a forced feature of IT companies to provide pioneering and the most current inventive solutions for the clients with pace and ace. Abundant opportunities make you grow in the customized market of software and website development areas. The market of software development services has carved a niche across the world.

IT companies are reaping excellent profits with their effective efficiency in custom software development, web application development, ecommerce software solutions, outsource help desk support, consulting and global staffing. These companies have pools of dedicated and devoted expertise. These expertise offer client -centric, economical and most satisfying solutions globally.

Are you looking for a company to hire offshore software development services in UK? Not to worry, there are number of companies logging on the internet, Silver Touch Tech is one of them. You need to choose the company suiting your time and budget as well. User friendly internet has made it very easy to find companies which offer custom web development and implementing outstanding e-commerce and CMS solutions. In this technology obsessed market you will get the best deserving sure shot results. Visit www.silvertouchtech.co.uk for more services.

Here the author Geeta Rao writes about offshore software development and about the companies offering such offshore services like custom software development, web development and web design services UK & ecommerce shopping cart solutions in UK. For more information visit http://www.silvertouchtech.co.uk

Read more...

Saturday, August 1, 2009

The Difference Between PHP and JavaScript by Bob Ryan

PHP and JavaScript are both scripting languages commonly used in web development. The big difference between the two is where they are most often employed. JavaScript is the primary language for execution by the client side, i.e. the browser. PHP, a recursive acronym for PHP: Hypertext Processor, is typically implemented on the server side. As such, it is insulated from the variances in browsers and desktops that has handicapped JavaScript.

Server-side scripts for web pages are also coded in languages like Perl or C, but PHP has gained popularity in the role. One advantage PHP enjoys over alternatives is that it was created for scripting web pages, and thus has features for performing a number of typical web design functions included. Another plus is that PHP was designed to coexist with HTML; the acronym originally meant Personal Home Pages. When used to output text, PHP is embedded within the HTML code, whereas in the case of Perl, the opposite situation usually exists -- the HTML would be produced by Perl code. The net effect is that the PHP and HTML solution is cleaner and more readable.

PHP does well in terms of execution time performance. PHP developers have made optimization a priority. As with database improvements, performance gains made on server-side scripts greatly enhance the efficiency of a web site. Unlike languages that compile code in advance and keep binary executables for processing requests, PHP compiles scripts when they are used. To save the cost of having to compile the same code for every request, a code cache is used to reduce the compilation required.

Although either PHP or JavaScript could be used on the opposite side of the web client-server relationship, neither is truly general purpose. Both are best suited to the respective niche where they evolved.

Read more...

  © Blogger template The Business Templates by Ourblogtemplates.com 2008

Back to TOP