Active Bulletins are In Effect
adwhub.ca
ADW Internet Solutions


My name is Andrew Winter, and I have been what I like to refer to as a web hobbiest for more than twenty years. Specializing in simple, brochure-type websites, I’ve been building websites for friends and family for many many years. I’ve added PHP & MySQL programming to help in my design projects, and have created several web applications mostly in the field of Broadcast Communications. Almost all of my websites are mobile-friendly using a mobile-first technology called Bootstrap.

I created ADW Internet Solutions, to help showcase my work and offer my services to other hobbyist and small businesses who may want a web presence, but need a little help, or can’t afford developer rates. I can help you establish an online presence that is not only simple, but functional, informative, and will compliment your business passion. It would be my pleasure to speak with you about how I can help your business reach its online goals.



Simple Internet Solutions
| | |

ACTIVE BULLETIN JANUARY 16, 2021 22:00:00

This website is under construction. Some links and other functionality may be unfinished or have unexpected results. If you need to contact us, please reach out via email. Thank you for your patience as we build better tools to assist you.

Quote Generator Script


My Quote Generator simply displays a random quote from a collection of quotes compiled in a json file. You can add or delete quotes as you wish by simply editing the json file directly.


1: Download quotes.json.




2: Create quote_generator.php in same directory and paste this code in it.


<?php

function getQuote() 
{
  srand(mktime());
  $quotes = file_get_contents("quotes.json");
  $quotes = json_decode($quotes, true);
  $seed = rand(0, sizeof($quotes)-1);
  $current_quote = $quotes[$seed];
  return($current_quote);
}

?>


3: Paste the following code where you want your random quote to appear.


<?php
  require_once("quote_generator.php");
  $quote = getQuote();
?>


The $quote variable now contains your random quote to display on your website
The syntax is as follows:

  • Actual Quote: $quote["desc"]
  • Byline: $quote["byline"]
Use whatever CSS styles you want to and add the quote text using inline php.
Example: <?php echo $quote["desc"]; ?> or <?php echo $quote["byline"]; ?>