GetDotted Domains

Viewing Thread:
"Webmaster Utilities, Tools & Tips! - Mostly by Hmmm..."

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Wed 04/07/07 at 15:55
Moderator
"Are you sure?"
Posts: 5,000
Here are a couple of simple but effective tips I use day-to-day. If you have some similar nuggets why not post them here...

Google ‘counter’

So you’re are working away on your search engine placement and you can now see your site in the search results. But you are quite a long way down the page (you’ve set your Google preferences to show you 100 results at a time) and would like to know exactly what number you are in the results – without having to manually count your way down!

All you need to do is add this bit of code to a bookmark/favourite in your browser:


javascript:var p=document.getElementsByTagName('*');var j=1;function gc(){for(i=0;i<p.length;i++)* SPACE*{if(p[* SPACE*i].className=='g'){p[i* SPACE*].innerHTML=j+'. '+p[* SPACE*i].innerHTML;j++;}};};gc();


In IE on the ‘general’ tab give it a meaningful name – ‘Google Counter’ for example. On the ‘Web Document’ tab past the above code for the URL field.

Tip: The easiest way to do this is to create a favourite for any old site, and then modify the entry using the info above.

To use it, simply perform a search in Google then use the ‘Favourite’ you’ve just created and all the entries will be renumbered for you.
If you visit your site first then your pages will be highlighted in the list making them easier to spot.


Web page ‘last modified’ date and time

Ever viewed a web page and wondered when it was last updated? Well this tip will display the date and time for you! (NB. This only works on standard HTML pages, non-HTML pages will return the current data/time – but it still comes in very handy.)

The command is set up and run in the same way as the Google Counter above.
This time create a ‘Favourite’ with the title ‘Last modified’ and then paste this code in the URL/address field:

javascript:alert* SPACE*(document.lastModified)

Now when you’re viewing a page simply use the ‘Favourite’ and the date and time will be displayed (American format) in a popup box.

Remove * SPACE* in your code - added to allow forum post!

As the code is rather hard to read with all the "* SPACE*" added to allow the code to be posted, I've also put the code here:
www.hmmm.ip3.co.uk/tips

7/11/2008
Changed the Google script above.
The Google results format has changed: 'DIV' > 'li'.
Changing the script to '*' seems to work with both formats.

Hope you like them...
Sun 08/07/07 at 16:57
Moderator
"Are you sure?"
Posts: 5,000
Another nugget

Lots of developers already know of, and use, the Web Developer Firefox extension from Chris Pederick [URL]http://chrispederick.com/work/web-developer/[/URL] so that you can view all sorts of useful information about a web page - from the CSS definitions to the JavaScript in use.

I've recently started using a similar tool for IE, called Debugbar [URL]http://www.debugbar.com/[/URL] (Free for home use). Again lots of useful tools from HTML Validation to a 'colour picker'.

Both highly recommended...
Thu 05/07/07 at 10:26
Staff Moderator
"Aargh! Broken..."
Posts: 1,408
Ok well use filemtime instead then:

<?php
function remote_filemtime($url){
$uri = parse_url($url);
$uri['port'] = isset($uri['port']) ? $uri['port'] : 80;
$handle = @fsockopen($uri['host'], $uri['port']);
if(!$handle)
return 0;

fputs($handle,"HEAD $uri[path] HTTP/1.1\r\nHost: $uri[host]\r\n\r\n");
$result = 0;
while(!feof($handle))
{
$line = fgets($handle,1024);
if(!trim($line))
break;

$col = strpos($line,':');
if($col !== false)
{
$header = trim(substr($line,0,$col));
$value = trim(substr($line,$col+1));
if(strtolower($header) == 'last-modified')
{
$result = strtotime($value);
break;
}
}
}
fclose($handle);
return $result;
}
}
?>


Will return a unix timestamp.

Who said I was posting remote timestamps anyway!:)
I was posting a useful 'nugget'.
Thu 05/07/07 at 08:37
Moderator
"Are you sure?"
Posts: 5,000
Hi Eccles,
The 'Last Modified' tip is so that you can see when someone elses page was last updated, not your own!

The idea is you are visiting a site and would like to know when the page was last updated and there isn't any last updated date displayed on the page.
Wed 04/07/07 at 18:50
Staff Moderator
"Aargh! Broken..."
Posts: 1,408
With PHP you can easily append a last modified date to your page with something like:

<?php
echo "Last modified: " . date ("F d Y H:i:s.", getlastmod());
?>

This would output something like:
Last modified: July 04 2007 18:51:59.

It will update every time you modify the file.
Wed 04/07/07 at 15:55
Moderator
"Are you sure?"
Posts: 5,000
Here are a couple of simple but effective tips I use day-to-day. If you have some similar nuggets why not post them here...

Google ‘counter’

So you’re are working away on your search engine placement and you can now see your site in the search results. But you are quite a long way down the page (you’ve set your Google preferences to show you 100 results at a time) and would like to know exactly what number you are in the results – without having to manually count your way down!

All you need to do is add this bit of code to a bookmark/favourite in your browser:


javascript:var p=document.getElementsByTagName('*');var j=1;function gc(){for(i=0;i<p.length;i++)* SPACE*{if(p[* SPACE*i].className=='g'){p[i* SPACE*].innerHTML=j+'. '+p[* SPACE*i].innerHTML;j++;}};};gc();


In IE on the ‘general’ tab give it a meaningful name – ‘Google Counter’ for example. On the ‘Web Document’ tab past the above code for the URL field.

Tip: The easiest way to do this is to create a favourite for any old site, and then modify the entry using the info above.

To use it, simply perform a search in Google then use the ‘Favourite’ you’ve just created and all the entries will be renumbered for you.
If you visit your site first then your pages will be highlighted in the list making them easier to spot.


Web page ‘last modified’ date and time

Ever viewed a web page and wondered when it was last updated? Well this tip will display the date and time for you! (NB. This only works on standard HTML pages, non-HTML pages will return the current data/time – but it still comes in very handy.)

The command is set up and run in the same way as the Google Counter above.
This time create a ‘Favourite’ with the title ‘Last modified’ and then paste this code in the URL/address field:

javascript:alert* SPACE*(document.lastModified)

Now when you’re viewing a page simply use the ‘Favourite’ and the date and time will be displayed (American format) in a popup box.

Remove * SPACE* in your code - added to allow forum post!

As the code is rather hard to read with all the "* SPACE*" added to allow the code to be posted, I've also put the code here:
www.hmmm.ip3.co.uk/tips

7/11/2008
Changed the Google script above.
The Google results format has changed: 'DIV' > 'li'.
Changing the script to '*' seems to work with both formats.

Hope you like them...

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

I am delighted.
Brilliant! As usual the careful and intuitive production that Freeola puts into everything it sets out to do. I am delighted.
Simple, yet effective...
This is perfect, so simple yet effective, couldnt believe that I could build a web site, have alrealdy recommended you to friends. Brilliant.
Con

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.