Posted by: SEO Positive

Posted on: July 13, 2010 8:02 am

-

As a PHP Programmer you’re more than likely to build countless login scripts and constantly have to use sessions and cookies. Lets face it, they’re great for temporarily storing data for use all over your site/application.

But you always hit that snag, why isn’t it working? I can’t set or fetch the session variable or delete that darn cookie! Hours later you realise it was simple, this is a simple PHP tutorial for any session and cookie fans out there.

When you’re using PHP sessions, you must ALWAYS use session_start(); at the top of every page, yes, even above all of the HTML tags or use session_start(); in an include/require file (if you’re using external scripts)

Simply put, when debugging $_SESSION and $_COOKIE the below code, is actually your best friend

session_start();
print_r($_SESSION);
print_r($_COOKIE);

This will print out all of the current items, if they’re available stored within these “superglobals” which are actually just arrays of data that your browser stores.

If you don’t see anything for $_SESSION, you probably didn’t have a session_start(); at the beginning of the referring page, and if you don’t see anything for $_COOKIE it wasn’t set, see below for how to set and delete a cookie as there are multiple ways of destroying cookie data I will show you my preferred method.

$days = 14;//this cookie will last for 14 days
setcookie('Cookie_Name', 'Cookie_Data', time() + ($days * 24 * 60 * 60));
//and to delete a cookie, I use this
setcookie('Cookie_Name', '');

This should all help you’re $_SESSION and $_COOKIE headaches, developers will all panic from time to time as to why their application is not working. And well, its the simple things that make the difference.

Next time, using the APC (Alternate PHP Cache)

Posted by: SEO Positive

Posted on: July 9, 2010 12:50 pm

-

It has been for several months now since the escalation of the battle for internet users supremacy started between Google and Microsoft. This was sparked by Microsoft’s entry to the search engine game by releasing its new search engine Bing. To add to that Microsoft also launched a multi-million ad campaign in preparation for the launch of Bing and when finally launched Microsoft have entered into a deal with Google’s long time search engine nemesis Yahoo in to a partnership. Despite of these moves done by Microsoft, Google remained steadfast and still holds the number one spot in terms of internet users share among search engines. This continuous reign of Google may be attributed to the fact that the search engine giant is also continuously improving its search engine results algorithm in order to give users the most accurate results based on their search terms.

Not to mention the fact that Google was able to acquire several small companies that would help augment the different departments or divisions of the search engine giant. Microsoft, in its effort to again attempt to topple Google from the number one spot, recently released a new application, this time one that would pertain to the next generation in search and that is through mobile search. Microsoft recently released an application that is for the iPhone and the iPod touch, this is the new version of their search application which is said to collide head to head with the mobile application of the search engine giant Google. The search engine application of Microsoft would include a visual scanning features that is similar to that of Google’s Goggles application that is currently being utilised in smartphones running on Android platforms. Microsoft says that their new Bing mobile application also includes social features, one that would show status updates from a persons twitter or facebook account. It also has improvements on its Shopping and Movies sections which includes additional store links, product prices, show times and video trailers.

Posted by: SEO Positive

Posted on: July 8, 2010 3:49 pm

-

We always hear the adage, age doesn’t matter, age won’t slow a person down. However, in the field of Search engine optimisation, age is a factor, domain age that is. Although domain age is a factor it does not lean on a negative connotation, nor does it mean that a domain of advanced age would be slower, domain age in Search engine optimisation gives a very positive result. Many SEO companies and SEO consultants have been trying to develop ways and means to increase their website traffic and their websites’ online reputation. For the building of website traffic this can be done through proper internet marketing and proper implementation of an SEO campaign. For reputation, many SEO companies and SEO consultants have been looking at Google’s page ranking feature to be one of the indicators of a websites’ reputation.

This is because of the fact that page ranking is only bestowed to websites with a solid link and content structure, two of the main criteria that is being looked upon by search engines. However, links and contents are just some of the factors that could affect the outcome of a websites’ page ranking. Domain age or the websites’ age is one of the uncontrollable factors that would determine the page rank of a website, this is actually proven when an experiment is done on newer sites having a large monthly volume of traffic, Google would not rank a new website because Google will give a chance or an advantage to the older and more established websites that has endured for the longest period of time. This process or recognition of domain age is a valid process since websites that have been around for the longest time have weathered many storms and it is very easy for a website to come and go thus it would just be fitting to give advantage to older websites as its length of presence online makes them a lot more stable.

Posted by: SEO Positive

Posted on: July 8, 2010 3:48 pm

-

Google is known to be the most popular search engine company, and throughout the years Google have steadily climbed into power and have been recognised to be the foremost search engine that is utilised by most people. Google came into this position by continuously recognising the needs of the internet community, when calls for accurate search results were voiced out by many internet users Google came into action by improving their algorithms and have been continuously developing their algorithm ever since. Google have also become a part of every aspect of the internet community, through their blogs and newsletters Google is able to inform many internet users about how the company is progressing in terms of its different on-going project development. Google have also entered the area of developing other services for the internet community, these services are in order to help people become a lot more productive in office, school or in their livelihood. Google have released applications such as Google Chrome for the needs of internet users of a faster web browser application, they have also lauched Google Docs for those who cannot afford to pay for a licensed office suite, among others. These are just some of the different applications and milestones in Google’s portfolio where they were able to help the internet public in general.

To add to that portfolio Google have released another application that would help small business owners like SEO companies and SEO consultants. Large corporations and small business owners have one thing in common and that is the need to communicate and collaborate in real-time, however without the proper funding small business owners are not able to maximise sales due to lack of real-time communication. Realising this problem Google have released their Google Voice, this is a cost-effective application that will enable small and medium business owners conduct business communication and collaboration similar to their large company counterparts. Google has given small business owners the avenue to communicate in real time by providing much of the Google Voice’s features for free or at least for some features, cost effective.

Posted by: SEO Positive

Posted on: July 7, 2010 3:23 pm

-

With the integration of new algorithm especially by Google recently, many SEO companies and SEO consultants have been scrambling to optimise the different websites that were entrusted in their stead. The main goal of the change of algorithm is in order for search engine to deliver or return the most accurate result from the search queries of the internet user. It has been a long-time goal of every search engine to be able to return the most accurate or the closest result to that of the search query entered into by the internet user. Recent changes in the search engine algorithm especially with that of Google has a new feature and that is the search engine can now or is now capable of indexing longer keyword phrases. Longer key phrases are also known as long tail keywords and the main purpose of long tail keywords is that it narrows down the search query of the internet user. In the field of internet marketing and the field of search engine optimisation a long tail keywords is considered to be a golden keyword, the reason for which is that those who search using long tail keywords are either experienced users or are users who knows what he or she wants and is set on buying the said item, when found , online. It is because of the nature of those who conduct search using long tail keywords that such keyword is deemed to be golden. In terms of search engine optimisation a long tail keyword is also considered to be very important because of the fact that such keyword is less competitive but is being utilised by a lot of users when searching through search engine. Which means therefore that the keyword is not utilised by a lot of websites however the number of people using that keyword in their search is of considerable number.

It is because of these properties of long tail keywords and the recognition given by Google by incorporating such recognition in its new algorithm the long tail keyword is an essential addition to your website and SEO Campaign.

Posted by: SEO Positive

Posted on: July 7, 2010 3:14 pm

-

The field of search engine optimisation is a continuous process and that is why many SEO companies and SEO consultants’ services do not end after placing backlinks or setting up their blog or after achieving the desired ranking. Maintaining the site’s ranking is an important process and therefore it is imperative that professional SEO companies and SEO consultants should oversee the maintenance of the SEO campaign. Sometimes however due to increased expenses we could not do away with the fact that we have to conduct maintenance in-house, meaning we have to deal with the maintenance of the SEO campaign ourselves to defray costs. One of the main fear of those who conduct in-house SEO is the sudden drop in search engine ranking. Although drop in search engine ranking could be attributed with a lot of factors it is imperative that we should be able to identify the root causes of which in order immediately remedy the problem and return the site in its current ranking. Here are several steps that might help you in solving such problem:

  1. Determine the extent of the damage to your ranking. Based from your daily observations check whether or not the drop in your ranking is sudden or gradual. A drastic or sudden drop in your ranking specifically on the loss of Google unpaid traffic would mean a problem in the robots.txt file wherein a no follow directive might have been incorporated which disables the search engine spiders from indexing your website or crawling your website. If you are tracking your traffic through Google analytics try to determine also the fact that the analytics that was previously installed might not be present anymore.
  2. Compare data properly – it would be a wrong notion to compare your site traffic from month to month especially if your site is one that pertains to the sale of items. This is because of the fact that certain months may have spikes or increase in visitors especially during the Christmas season or any other occasions. It is imperative to compare your data with a year worth of data.

Posted by: SEO Positive

Posted on: July 7, 2010 3:14 pm

-

Previously, we have given some pointers on how to understand the drops in your website traffic and how to decipher traffic drops whether it would be a normal occurrence or it really requires your attention. Recognising the importance of diagnosing the reasons why your site traffic dropped we deemed it important to give you more tips on how to decipher such drop in rankings.

  1. Try to decipher what type of traffic was lost. Do not just rely on checking out Google traffic results it is also worth to note and decipher traffic loss from other search engines and even for other non-paid traffic sources.
  2. Try to determine brand traffic, if you are engaged in internet marketing and advertising usually visitors would come from those advertisements where you have your sites’ brand name as the keyword. If the loss of traffic is due to your brand traffic it means that you have to start intensifying your internet marketing campaign.
  3. Using your analytics try to determine the keywords or phrases that have decreased in visitors. Identify first your strong keywords and key phrases (those bringing in huge traffic) and try to re-intensify your SEO campaign using those strong keywords where you have lost significant traffic, this goes without saying of course that you have to also take care of your other keywords and keyphrases.
  4. Do a self-search using your keywords and key phrase and if your website is not ranked on top this might indicate a problem. You have to determine or investigate further, there may be two causes of this and that is that one your keyphrase may be searched by a few people as compared with the  previous months.
  5. If you have landing pages try to determine which of them have lost traffic  and look for any obvious reasons why your landing page have lost such traffic. Look for duplicate contents or determine also the validity your landing pages’ links.
  6. Lastly Determine whether your site is penalised by the search engines for any violations, if so deal with the problem by following only white hat seo techniques.

Posted by: SEO Positive

Posted on: July 7, 2010 8:23 am

-

While a lot of php programmers still use standard MySQL no problem, I still do, there is MySQLi Which stands for “MySQL improved” and its simply a driver for PHP with more functionality and safer than using your standard MySQL code.

See below for a pretty bog standard PHP class to connect to MySQL

class mysqlCon
{
             private static $connection;

             private function __construct($server, $username, $password, $database)
             {
                          if(!mysql_connect($server,$username,$password))
                                       throw new RunTimeException('Could not connect to MySQL server. MySQL said: '.mysql_error());
                          if(!mysql_select_db($database))
                                       throw new RunTimeException('Could not connect to MySQL database. MySQL said: '.mysql_error());
                          self::$connection = true;
                          return $this;
             }
}
$connection = new mysqlCon('localhost', 'username', 'password', 'database');

Which looks, to most PHP programmers pretty standard. But see below for the MySQLi version of this operation

class mysqliCon
{
             private static $connection;

             private function __construct($server, $username, $password, $database)
             {
                          self::$connection = new mysqli($server, $username, $password, $database);
                          if(self::$connection->error)
                                       throw new RunTimeException('MySQLi said no. It also said: '.self::$connection->error);
                          return $this;
             }
}

Which, as you can see is only half the size, its half the code for twice as much functionality and security.

I recommend a movement to MySQLi because it really is great, there’s not a flaw to it its much easier to use and much easier to learn (And the errors are friendlier)

Posted by: SEO Positive

Posted on: July 5, 2010 10:10 am

-

Google after becoming very successful in being a search engine company have ventured into other areas pertaining to the internet. This venture was done via acquisition of small companies who have offered their sites for sale. One of the biggest acquisition that Google have done in recent years is its acquisition of the video website YouTube. The acquisition did not start off well since for several years YouTube remained to be a “White Elephant” project, offering video uploads and view to the internet public for free. It was only recently that Google was able to find a way for the Video website to generate income streams, and this is done through the incorporation of advertisements on the different videos uploaded. This move did not stop the influx of visitors in the website and this also did not stop video uploaders from uploading their videos instead it encouraged them to upload their videos since Google offered to video uploaders a split in the revenue of the ads that may be clicked by viewers via the videos uploaded on the site, this move started to also take the interest of SEO companies and SEO consultants as it became a rich source of income stream not to mention traffic.

These claims of stronger traffic of for YouTube is strengthened by the comScore report that Google’s YouTube have served a record number of video clips during the month of May. In the U.S. alone there are around one hundred eighty three million U.S. Residents that have watched online videos through YouTube during the month, this amounts to 14.6 billion video clips viewed at Google sites mostly coming from YouTube alone. With 145 million visits YouTube has also ranked first in terms of unique viewers where each have watched an average of 101.2 video clips in the month of May.

Posted by: SEO Positive

Posted on: July 5, 2010 10:08 am

-

Google has been known to be the most sought after search engine, this is obviously due to the fact that the search engine giant is the number one search engine in terms of internet users share among all the other search engines. It is because of this that many SEO companies and SEO consultants would want to have their websites to have backlinks and other SEO strategies incorporated that Google would recognise. Recently, on its webmasters blog Google have released its take on how to earn quality links.

First thing that Google have taken into account in link building is to get involved with a community this means therefore that social media is going to play a very important role in your link building process. According to Google being a member of a community would definitely help in the building of quality links by increasing your online credibility. However, it is not enough to only be a member of the community it is also important to engage in the activities of the community such as answering forums or posting comments, being a proactive member would pay off.

Second, the adage content is king is still applicable however Google specified that your content must be those that can help inform the public or help solve or troubleshoot a problem. Google sees this information to be helping other internet users thus another way to increase your link and reputation.

Third, you should not be so thrilled about automatic submissions, according to Google this may be a useless effort to build your backlinks, that is why directory submissions is actually deemed to be ineffective by Google. In place of which they suggest that you visit successful sites and compare their strategies and get inspiration from it and also to get techniques that would apply to your  SEO campaign.

Finally, Google stated in their blog that it would be best to make it easier for your website visitors to share your content, this means that placing a button like Twitters’ retweet and Facebooks’ like would really go the distance.

Authors
Categories
Archives
Blogroll