Thank you for purchasing website review PHP script. If you have any questions that are beyond the scope of this help file, please feel free to email email@example.com. Thanks so much!
Note. You can view framework's requirements by accessing the requirement checker script via the following URL in a Web browser: http://your-domain.com/requirements
Note. If you installed script not in web-root directory then you need to add RewriteBase /subdir/ into .htaccess file after RewriteEngine on
'db'=>array( // Mysql with host: localhost and databse name website_review 'connectionString' => 'mysql:host=localhost;dbname=website_review', // whether to turn on prepare emulation 'emulatePrepare' => true, // db username 'username' => 'root', // db password 'password' => '', // default cahrset 'charset' => 'utf8', // table prefix 'tablePrefix' => 'ca_', // cache time to reduce SHOW CREATE TABLE * queries 'schemaCachingDuration' => 60 * 60 * 24 * 30, ),
// your email which will receive messages from contact form 'adminEmail'=>'firstname.lastname@example.org', ... // Mailer extension 'mailer' => array( 'SMTPAuth' => true, // smtp server's port 'Port' => 25, // server's host 'Host' => 'mail.your-host.com', // username 'Username' => 'username', // password 'Password' => 'password', // letter's charset 'CharSet' => 'UTF-8', ),
<li <?php echo $this -> action -> id == "contact" ? 'class="active"' : ''; ?>><a href="<?php echo $this->createAbsoluteUrl("site/contact") ?>"><?php echo Yii::t("app", "Contact Us") ?></a></li>
Or replace with this one
<li><a href="mailto:email@example.com"><?php echo Yii::t("app", "Contact Us") ?></a></li>
The script takes advantage of PageSpeed Insights. PageSpeed Insights analyzes the content of a web page, then generates suggestions to make that page faster. To make it work you need to configure this API.
Firstly, go to Google Console -> Credentials. Create new key for server (Credentials -> Add credentials -> API key -> Server key) application (if you haven't created yet). Copy API key and paste it into config file:
... 'googleApiKey'=>'', ...Next go to Google Console -> APIs -> PageSpeed Insights API Click on "Enable API".
There is possibility to block any domain using regular expression. The config of rules is under ~root/website_review/config/domain_restriction.php. The file contains a lot of examples.
To see the list of available languages find this line:
... 'languages'=>array('ru'=>'Русский', 'en'=>'English'), ...
Set default app language.
... 'language'=>'en', ...
... 'languages'=>array('ru'=>'Русский', 'en'=>'English', 'de'=>'Deutsch'), ...
'checkForBadwords' => true,and set it true to enable automatic site filter or false to disable.
By default user can get website's review only by submitting a form, but sometimes really need to get it via requesting url. Read below how to do this.
First of all, you need to allow user send requests to parse controller. To do this open:
... // Allow instant redirect 'instantRedir'=>true, ...
To include social sharing plugin into review page, you need to register at addthis.com.
Next go to "Dashboard" and choose your suitable plugin. Click on Get this code and copy js source into our local config file in ~root/website_review/config/main.php
This section is for users who has monthly bandwidth limit or hosted on shared hostings. The fact is that in addition to visitors, your website scanning a lot of bots. They generates a lot of traffic, by clicking on links. The one is "pdf generation" link which is generates PDF review. PDF generation is greedy operation and requires more process time, than HTML page generation. Also it's generates more traffic because PDF takes up more space. So, to reduce CPU usage and decrease traffic you need apply reCAPTCHA credentials. To do this go to official reCAPTCHA page and generate for your domain Site key and Secret key keys. Next open ~root/website_review/config/recaptcha.php file and fill out the config:
'public-key'=>'', // Insert your Site key here 'private-key'=>'', // Insert your Secret key here
That's all. Now user must enter valid CAPTCHA to download review in PDF format.
By default the PageSpeed Insights results stored in a separate PDF file. This implemented in this way, because usually basic review + PageSpeed Insights takes about 50 pages. This is not a small amount of data and to generate PDF file containing all the reviews needs about 50-60 seconds (tested on my local PC with SSD). However if you are using this app for personal usage, you could include all reviews in one PDF file. To do this open main config file and set partialPdf to false:
Also I would like to recommend to set
memory_limit = 128Min php.ini
Some common options you can change.
... // Brand name. Your app name (Will not be translated) 'name'=>'Website Review', // Websites count in "Rating" section 'webPerPage'=>6, ...
... // your website name: for example: http://your-domain.com 'hostInfo' => 'http://your-domain.com', // if you installed script not in root directory, then you need to set baseUrl. For example : /website_review 'baseUrl' => '', ...
NOTE! Script already support multiple sitemap generation. Each sitemap has maximum of 50 000 URLs. If you want to change this number go to: ~/root/website_review/commands/SitemapCommand.php and set any number of $urlCount property.