Website Worth Calculator - PHP Script Documentation

Get Website Cost

Thank you for purchasing Website Worth Calculator PHP script. If you have any questions that are beyond the scope of this help file, please feel free to email Thanks so much!

Note. You can view framework's requirements by accessing the requirement checker script via following URL: 
Note. If you installed script not in web-root directory then you need to add RewriteBase /subdir/ into .htaccess after RewriteEngine on

Database Settings

The main Web application configuration file located in ~/root/protected/config/main.php
Open this file and configure database settings. Find following lines and set up your own MySQL settings

// Mysql host: localhost and databse name catalog
'connectionString' => 'mysql:host=localhost;dbname=sitecost',

// whether to turn on prepare emulation
'emulatePrepare' => true,

// db username
'username' => 'root',

// db password
'password' => '',

// default cahrset
'charset' => 'utf8',

// table prefix
'tablePrefix' => 'sc_',

// cache time to reduce SHOW CREATE TABLE * queries
'schemaCachingDuration' => 60 * 60 * 24 * 30,

'enableParamLogging' => true,

SMTP Mail Client

You need set up SMTP account. This is an important part of the application, because mail server is used for different notifications, contact form, user registration and etc. Once you have created your account, you should fill out config file with SMTP credentials.
Open config file (~/root/protected/config/main.php), find following lines and enter your credentials
'mailer' => array(

'class' => 'ext.mailer.EMailer',

// Mail server protocol
'Mailer' => 'smtp',

'SMTPAuth' => true,

// Mail server host
'Host' => '',

// Mail server port
'Port' => 25,

// Username
'Username' => '',

// Password
'Password' => 'pass',

// Encoding
'CharSet' => 'UTF-8',
Once the previous step has been done, you should set email which will receive messages from contact form, name and email of notifier
'adminEmail'=>'', // This email will be receiving message sent by contact form
'notificationEmail' => '', // Notifier email
'notificationName' => 'GetWebsiteCost Team', // Notifier name

Facebook API

To get number of likes, shares you must create facebook developer account and facebook web app. Read here how to do it: Once you create www app, get app id and app secret from Facebook Developer Dashboard and put them into ~root/protected/config/facebook.php

Google reCaptcha

Go to reCaptcha admin page. Register a new site (choose reCAPTCHA v2). Click on "Keys" tab and copy Site Key and Secret Key. Paste copied credentials at main config file (~root/protected/config/main.php).

'recaptchaPublic'=>'Site Key',
'recaptchaPrivate'=>'Secret Key',

Google Server Key

Go to Google Console. Create a project if you have not created it yet and generate Server Key Next, enable following APIs:

  • Safe Browsing APIs
Add key to main config file (~root/protected/config/main.php)
'googleServerAPIKey'=>'SERVER-API-KEY', // Google Server API key

HTTPS Support

In order to get full support of HTTPS you must have Free Unbranded account or Paid account. If you have Free Unbranded account, then paste verification HTML provided by Pagepeeker before verification process.


'pagePeekerVerify'=>'Verification html',
You can find a table below describing different cases

Pagepeeker account type Configuration
Free Unbranded Account
'pagePeekerVerify'=>'Verification html',
Basic Account
Advanced or Premium Account


Please set encryptionKey to any random 24 characters length string:
'securityManager' => array(
	'encryptionKey' => 'pnkRVLZC6Oj87H2G8qmsNN',

Cron jobs

This app very closely linked with cron jobs, because it has to generate sitemap, check website which are on sale, remove expired data. You have possibility to do this in three different ways:
  • Via command line
  • Using 3rd party services to run commands via browser
  • Via Admin Panel

1. Let's begin with command line:

When script being executed via command line, the web server has no idea what website host is. You must help him in this matter. Open ~/root/protected/config/console.php file and configure it.
// your host name (With protocol): for example:
'hostInfo' => '',

// if you installed script not in root directory, then you need to set baseUrl. For example : /sitecost
'baseUrl' => '',
Next you need is to add following lines into your cron job shedule:
0 0 * * * /usr/bin/php /path/to/web/root/protected/cron_sitemap.php >/dev/null 2>&1
NOTE! Script already support multiple sitemap generation. Each sitemap has maximum of 50 000 URLs. If you want to change this value, go to: ~/root/protected/commands/SitemapCommand.php and change $urlCount property.
0 0 * * * /usr/bin/php /path/to/web/root/protected/cron_onsalechecker.php >/dev/null 2>&1
0 0 * * 0 /usr/bin/php /path/to/web/root/protected/cron_garbagecollector.php >/dev/null 2>&1

0 0 * * *

0 0 * * 0

Time and date for your task.
0 0 * * * - every day at midnight; 
0 0 * * 0 - every Sunday at midnight
/usr/bin/php path to php command
/path/to/web/root/protected/cron_sitemap.php physical path to script
>/dev/null 2>&1 this mean that all output from this command should be shoved into a black hole. I.e just do nothing with output.

2. Using 3rd paty service as cron job:

There are a lot of 3rd party services you can find, which will send requests to defined URLs every X time.
Open main config file and find following line:
Set up your sicret key (ex. "abc")
'cronKey' => 'abc',
Now, to run cron job commands you need to request following URLs:
Pay attention! GET variable "key" must be equal to what you have set in config file. In our case it's "abc"
Note. If you installed script in sub-direcotry, then URL should look like this: http://your.domain/subdir/index.php?r=cron/sitemap&key=abc

3. Via admin panel:

You can execute these commands via admin panel. Go to:
Tools->Sitemap generation
Tools->Run widget checker
Tools->Run garbage collector
How to Log in into Admin Panel read here:

Admin Panel

Once you configured main settings, it's time access admin panel. Go to: http://your.domain/admin
If you can't reach URL, then open main config file (~/root/protected/config/main.php) and set
Now you're not depend on Rewrite module. To access admin panel go to http://your.domain/index.php/admin
By default root user has following credentials:
Password: admin
To change Email click on User icon and choose "Profile" from drop down menu.
To change password click on User icon and choose "Change password" from drop down menu.
That's all. Application has been set up and only you're able to access Admin Panel with root permissions. Read FAQ to find out more about app configuration.
Note! If you do not remember root login or password, the only way to recover is to run query:
UPDATE sc_user SET role='root', password='4dec0c215ba6008a2da7072c1d5a34c0', salt='a3f61195aac72cba69f20b471b8fa319', email='' WHERE id=1;

How to setup MOZ API?

To take advantage of MOZ API you have to register free account and copy API credentials from your dashboard into config file: ~root/protected/config/moz.php

return array(

I want to verify my website in Google webmaster panel and insert Google Analytics

You can put verification meta tag and analytics code in main template which is included on each page. You can find it here: ~/root/views/front/layouts/main.php

How to setup Google adsense?

There are two specially selected advertising space, which combined with website design. They are displayed at the top and at the bottom of document.
Note! Make sure your ads banners are adaptive.
So, you can place banner code in config file:
'bannerTop'=>'', // Top banner source
'bannerBottom'=>'', // Bottom banner source
Note! Pay attentions at quotes, not to cause a syntax error
The banners located in main layout file: ~/root/protected/views/front/layouts/main.php

How to block domain?

There is possibility to block any domain using regular expression. The config of rules is under ~root/protected/config/domain_restriction.php. The file contains a lot of examples.

How to creaty category?

Users are able to sell website only if there are categories. You can manage categories in admin panel. Go to Manage Categories section. Click on Create Category. Fill out the form and click on create. Next you need to translate category name. To do this click on Manage Categories, choose needed category and click on Manage translation. Click on Create Translation to translate into needed language.

How to translate application into new language?

There are 2 ways:

  1. Go to Localization->Manage Languages. Click on Create Language. Fill out the form. If you want to copy translations from old language to new, then choose something from Make copy dropdown list. Next go to Localization->Manage Translations. For easy management, phrases are categorized. Click on Manage translation next to each category. You will see the list of phrases belonging to the selected category. Click on Translate Phrase. Fill out the form and click Translate Phrase. Do the same thing for each category and phrase inside it.
  2. Go to Localization->Manage Languages->Export translation. Save file into your hard drive. Extract all CSV files, open and translate.

    Important notes! The delimiter is ,(comma) and enclosure is " (double quote).
    Then archive all translated CSV file into archive and go Localization->Manage Languages->Import. Select your archive and click Import.
After translation you must flush cache. To do this go to: Tools->flush cache

The final step is to translate config file which contains list of countries. Go to: ~root/protected/extensions/ecountrylist/countries create file and name it as you named new language's ID. For example: no.php (where no is new language id). Copy content from en.php into recently created file and translate country names.

I found phrase that has wrong translation. How to fix?

Go to Localization->Manage Translations->Find phrase/translation. Fill out the form and click on Search button. Next click on Translate phrase and set your own translation.

After translation you must flush cache. To do this go to: Tools->flush cache

I want to remove website. How to do this?

Go to Manage Websites, find website by domain and click on Trash Icon. Next re-generate sitemap by clicking  on Tools->Sitemap generation

I do not see website location on google map.

Go to -> APIs, enable "Static Maps API". Next go to Credentials, copy API KEY and isnert it in config file

'googleMapsAPIKey' => '', // Google maps API


I want that website worth would be displayed in euros, not in dollars.

Open main config file (~root/protected/config/main.php) and set:


If you want that the price should be displayed before currency sign then set:

'pricePattern'=>'{price} {currency}',


How to re-calculate website estimate price?

On FrontEnd all results are being cached for 24h. You can change this value in config file:

'webdataCache' => 60 * 60 * 24, // Cache estimate price for X seconds

On BackEnd click on Manage Websites, find needed website and click on re-calculate icon. There is no cache rule for BackEnd.


I do not see share button on website estimate page

We are using service to display share buttons. To get share buttons do following steps:

  1. Sign in into Dashboard
  2. Go to Property Settings and setup new property
  3. Copy sharethis.js Javascript code and paste into shareJS
  4. Go to Share buttons -> Inline Share Buttons, do customizations. Copy the code and paste into shareHTML
  5. Save config file and upload changes
  6. Finally we need to verify account. To do this click on "Verify Manually" button and paste an URL of website review. For example:

'shareHTML'=>'', // HTML for share buttons
'shareJS'=>'', // JS for share buttons
Note! Pay attentions at quotes, not to cause a syntax error


I get the error, that website contains bad word. What to do?

This happens when BOT finds a stop words in website's HTML. The full list of these words you can find here: ~/root/protected/config/badwords.php
If you want to disable badword checker, then open config file and set:
'checkForBadwords' => false,

How I can generate report without filing form?

Note!Make sure the CAPTCHA protection is disabled
You need to request following URL to generate report without filing form:[domain]
Where: - domain which must be analyzed
en - language id
1 - whether to do instant redirect or no (if 0, then JSON object will be returned)

Or you can request friendly URL:

How to protect website worth generation against bot attack?

Set captcha to true in main config file (~root/protected/config/main.php), to protect website against bot attack.

Or false to disable


How to change decimal and thousand points?

You can change them in main config file (~root/protected/config/main.php)
'decPoint' => ',', // Decimal point
'thousandsSep' => '.', // thousand separator

How to import new translation?

    You need to do following steps when new language has been added. For instance, let is be Dutch. The Dutch language ID is nl
  1. Firstly copy country array ~/root/protected/extensions/ecountrylist/countries/nl.php
  2. Next, create new language in admin panel (Admin panel -> Localization -> Manage Languages -> Create New Language).
  3. Flush cache (Admin Panel -> Tools -> Flush Cache)
  4. Go to Admin panel -> Localization -> Manage Translations -> Import Translation
  5. and import new translation. In our case you can find it in ~root/protected/messages/
    Note! Make sure "Force import" is selected
  6. Flush cache (Admin Panel -> Tools -> Flush Cache)

How to import modified translations?

  1. Go to Admin panel -> Localization -> Manage Translations -> Import Translation
  2. Choose language and import each file from ~root/protected/messages/ directory.
  3. Flush cache (Admin panel -> Tools -> Flush cache).
You can not run this script on a free web hosting, because their IPs banned on Google, Twitter, Facebook because of a spam. 
Also, I am not responsible if your server's IP will be banned and script will not be able to get information from public API's.