MaggsWeb:7

www.maggsweb.com

Posts Tagged ‘ SEO ’

How to resubmit generated sitemaps automatically (using cron) or on an event (like re-generation of the sitemap).

<?php
pingSE(urlencode($url),'google');
pingSE(urlencode($url),'bing');
pingSE(urlencode($url),'ask');
?>

And the function goodiness….

<?php
 
function pingSE($sitemap,$service){
 
  switch ($service) {
    case 'bing':
      $ping = "http://www.bing.com/webmaster/ping.aspx?siteMap=$sitemap";
    break;
    case 'ask':
      $ping = "http://submissions.ask.com/ping?sitemap=$sitemap";
    break;
    case 'google':
      $ping = "http://www.google.com/webmasters/tools/ping?sitemap=$sitemap";
    break;
    default:
      return false;
}
 
$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL,$ping);
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
$run = curl_exec($curl_handle);
   $response = curl_getinfo($curl_handle);
curl_close($curl_handle);
 
   if ($response['http_code'] == 200){       
       echo "Sitemap successfully submitted";       
   }
 
}
?>

I used to do this in about 6 lines.

$urlValues = explode(“/”, trim($_SERVER['SCRIPT_URL'], “/”));

Creating a ‘Search Engine Friendly’ URL automatically from another field, ie: the Title
[More]

SEO is becoming more and more important, and URL’s need to be more visible. Here’s a function for creating a ‘slug’ which I used as an add-on to a site, using the page title.
[More]

SEO Myths

January 4, 2010 | Comments | Miscellaneous

10 Myths about SEO (Search Engine Optimisation) that any webmaster should know; and all clients should be aware of.

[More]