Resources

Code Ascetic – SEO Tracking in 4 Lines of Code

I am going to save you all a bunch of headaches and time staring into the sky for the SEO God’s to grant you an effective way to track the conversion from traffic to lead. It is as simple as a few lines of PHP code. I am sure there are equivalents in the other server side scripting languages that someone can kindly post in a reply. Here is the Snippet. if (is_null($_COOKIE[‘referer’])) setcookie(“referer”, $_SERVER[‘HTTP_REFERER’]); if (is_null($_COOKIE[‘entrance’])) setcookie(“entrance”, $_SERVER[‘PHP_SELF’]); What does this do? It checks if there is a current cookie for both the website passed Referer value and if there is a landing page value. If not, it grabs the referer from the last website the person has been too (including organic google search) and the page that they landed on, for instance, index.htm or /affordable-health-insurance/ becomes the value of $_COOKIE[‘entrance’] An easy way to check how your cookies are being set is through this simple PHP Script. You can save a file as test.php and include only the following code: print_r($_COOKIE); This prints the cookies you have set in order. Note: Most Dynamic CMS will already have a bunch of Cookies set that you can take advantage of once you figure out their name value through that smalls cript. The key to web programming is being able to do the most actions with the least amount of code and processing cycles / memory usage. This is similar to being an code ascetic, the more you can go without will bring you to a state of efficiency not many can achieve.  Keep this method for your records! Keep this ideology in your coding! Funny, I reduced this from 6 lines to 4 when i redid this Website and copied content over 😉

Read more

Why “GET” Can Be a Problem Over “Post”

This has to do purely with browser limitations. I recently encountered a major error using a Dialer management system that uses massive GET requests that fill the header with every parameter. I tried to create a custom query and save it so that I would be able to use it again. Unfortunatly it would return a error in internet connection page. I called up the company to find out what was going on. As usual, it is a problem they have never seen before and I was able to create an issue that can be a major problem to them in the future. The problem was that You can only have up to 2083 characters in the url for IE. I was trying to create a query with about 40 states included as well as other custom fields in their search feature. Knowing this it makes me wonder why even bother with the lack of security of PHP GET over POST. POST is cleaner, easier to manage and limits what the user can do without clear access. This makes for better programming and the necessity to check for problems and redundancies. The solution is simply resolved by switching to firefox which allows for longer URL Strings in the Header…but their software was “built” for IE. Ah well.  

Read more