|
|
FREE Web Design QuoteTell us about your project and get your web design quote here. Contact Refresh:158 Torquay Road Fax: 0870 80 30 989 Google Maps Click Here Featured Website ProjectClient: Whispurr Luxury Lingerie Description: Website Design News |
Snazzy Automatic Sitemap Generation with Images in PHPSnazzy Automatic Sitemap Generation with Images in PHPUsing a few lines of code you can automate the creation of your sitemaps, with images embedded with the following code sample: Firstly, we need to set-up our main variables, including the server name and the header area of our sitemap file. These will be contained in $server and $header for simplicity. $server =
"http://www.yourserver.com/";
Next we'll need a function to get our images with details from our website.
Now, we'll place our webpages in an array, with a page title.
After our pages have been added, we'll now want to loop through the array, grabbing the images from it, appending data to our sitemap file for each page.
Finally. We'll need to write all this out to a well named file on our server, in this case, lets call it sitemap.xml
This script should help you out with using googles newer features for sitemaps although some improvements will be useful to add-on, including the following:
Download the FULL Script here Viewed 1284 times since 15 Apr 2010 |
Why Refresh Creations?All our websites we create are secure and customer editable. We tailor our admin system to your website for a simple-to-use, effective form of website management. Contact Now
Recent Tweets |
Contact Refresh Creations Now on 0845 09 42 987
Legal |
Web Design Services |
Refresh Creations Website Design |
|---|---|---|