Fuel prices in Europe are different from a country to another, due to production costs and taxes. There are many clients traveling by car around Europe or simply requiring a transport of loads across the European continent, and these are just a few reasons to offer an updated widget in your website with fuel prices in Europe.
WidgetLab.net lists below a range of widget codes that can be implemented into any website to deliver free and updated fuel price info 🚚, available in multiple languages and currencies for price values.
ONE IMPLEMENTATION
You implement the widget code one time and we take care of the rest. The content gets updated automatically, no other coding and changes afterwards.
FREE FOREVER
The content provided is free to implement. Getting this from other sources will require to pay for access to their services along with any development work.
SEO BEST
It can also improve your SEO work as content will be seen as originating on your website. Search engines will index the content and rank your pages for it.
To show the latest fuel prices in Europe, you can copy and paste below widget code in your webpage, where you wish the fuel price comparison table to appear (select your implementation platform):
1. Copy below widget code in a Notepad file
<div><?php $html = ""; $url = "http://widget.widgetlab.net/logistics/data/fuelprice-YY.xml"; $xml = simplexml_load_file($url); $description = $xml->channel->item->description; $html .= "$description"; echo $html; ?></div>
2. Edit the parameter YY in the URL source on line 3 of the code, with one of the parameters you want, listed in Parameters table below
3. Paste the edited code in your .PHP webpage of your website, where you wish the widget to appear.
4. Visit your website and see how the widget shows the top scorers table
1. Copy below widget code in a Notepad file
<div><?php $html = ""; $url = "http://widget.widgetlab.net/logistics/data/fuelprice-YY.xml"; $xml = simplexml_load_file($url); $description = $xml->channel->item->description; $html .= "$description"; echo $html; ?></div>
2. Edit the parameter YY in the URL source on line 3 of the code, with one of the parameters you want, listed in Parameters table below
3. Paste the edited code in your .HTML / .HTM webpage of your website, where you wish the widget to appear.
4. As HTML/HTML files do not natively run PHP code, you need to add the following code line in the .htaccess file from the route of your website
AddType application/x-httpd-php .html .htm
If there is no file, you can create one. The .htaccess code may be different from a web hosting to another, so in case above code does not work, please view your hosting FAQ or contact their support and ask for correct .htaccess settings to run PHP code in HTML/HTM files
5. Visit your website and see how the widget shows the top scorers table
1. If you are using WordPress as the platform of your website, you need to install a plugin like Insert PHP that can run the php code in your WordPress posts/pages
2. After installing above WP plugin, go to PHP Snippets section from your WordPress admin, and create a New snippet.
3. Copy the code below in the snippet code area
$html = ""; $url = "http://widget.widgetlab.net/logistics/data/fuelprice-YY.xml"; $xml = simplexml_load_file($url); $description = $xml->channel->item->description; $html .= "$description"; echo $html;
4. Edit the parameter YY in the URL source on line 2 of the code, with one of the parameters you want, listed in Parameters table below
5. Hit “Publish” button to save & publish the snippet.
6. Copy the Snippet shortcode shown in the PHP Snippet section (under the form of “[wbcr_php_snippet]: PHP snippets error (not passed the snippet ID)“). Paste the shortcode in your WP post, where you wish the data to appear.
7. Visit your website and see how the widget shows the top scorers table
1. If you are using Joomla as the platform of your website, you need to install an extension like Sourcerer that can run the php code in your Joomla articles
2. After installing above Joomla extension, copy the code below in a Notepad file
{source}<div><?php $html = ""; $url = "http://widget.widgetlab.net/logistics/data/fuelprice-YY.xml"; $xml = simplexml_load_file($url); $description = $xml->channel->item->description; $html .= "$description"; echo $html; ?></div>{/source}
3. Edit the parameter YY in the URL source on line 3 of the code, with one of the parameters you want, listed in Parameters table below
4. Paste the edited shortcode in your Joomla article, where you wish the data to appear.
5. Visit your website and see how the widget shows the top scorers table
Parameters: Content Language (Currency values)
Edit YY with:
Data widgets available in this page are provided by EUlogis.com