gomymobi.com: Knowledge Base

All usable global PHP functions

You may use these global functions in anywhere in your files


Returns a translated strinng to current language.

$str index of string, or string need to translate

Return: String


Check if current request to your website is AJAX request or not. By default, $post_method = true will check if request is a POST query.

Return: TRUE / FALSE


Check if provided string is a valid domain or not.

Return: TRUE / FALSE


Check if provided string is a valid email address or not.

Return: TRUE / FALSE


Check if provided URL is a valid image file or not.

$check_header set this parameter TRUE to retrieve and check by file headers

Return: TRUE / FALSE


Check if your current server is localhost or not.

Return: TRUE / FALSE


Check if current session is a signed-in user or just a guest.

Return: TRUE / FALSE


Check if provided string is a valid URL address.

Return: TRUE / FALSE


Get copyright content of website.

Return: HTML String


Get current currency code of website, such as USD, EUR.

Return: String


Get current currency symbol of website, such as $, €.

$currency if this parameter is empty, function use current currency code of website

Return: String


Get web path to thumbnail of frontpage.

$slug if this parameter is empty, return unavailable default image

Return: String


Get an attribute of a plan.

$plan_string must be value string of plan setting or plan id

$type attribute want to retrieve value, if this parameter is empty, return an aray of all attributes. Supported types: price_monthly, price_3months, price_6months, price_yearly, price_first, price_first_to_all, max_sites, traffic_counter, online_shop, support_chat, custom_domain, support_email, no_ads, plan_color, name, max_stores, max_products, max_categories, max_tags

Return: String / Array


Format a provided price, follow rules of system settings in Payment tab.

$price price want to format

Return: String


Get an attribute of a plan.

$site_settings must be value string of plan setting or site id

$type attribute want to retrieve value, if this parameter is empty, return an aray of all attributes. Supported types: id, name, subdomain

Return: String / Array


Get current domain of website or domain of provided string.

$str if this parameter is empty, function return domain of current website

$no_sub if TRUE return domain name without http

$no_http if TRUE return main domain name without sub-domain

$no_ext if TRUE return domain name without extension

Return: String


Get web path to thumbnail of client website.

$site if this parameter is empty, return unavailable default image

Return: String


Retrieve web path to sites of clients.

$site must be array of site or site id

Return: String


Get an array of supported languages of web app. This function scans directory includes/languages/ to return list of language files.

Return: Array


Get an attribute of a website theme.

$theme_settings must be value string of theme setting or theme id

$type attribute want to retrieve value, if this parameter is empty, return an aray of all attributes. Supported types: name, price_per_time, price_lifetime

Return: String / Array


Get web path to thumbnail of website theme.

$slug if this parameter is empty, return unavailable default image

Return: String


Retrieve details of an user.

$email must be valid email or user id

$type attribute want to retrieve value, if this parameter is empty, return an aray of all attributes. Supported types: id, name, avatar, account_type, email_payout, settings, date_format, plan_id

Return: String / Array


Format provided number, follow rules of system settings in Payment tab.

Return: String


Use this function to show dialog of warnings or alerts to current users, normally this function used for AJAX requested.

$title title of dialog

$content content of dialog

$color color of dialog

$more more custom content want to append to dialog

CAUTION this function can only used in web app interface, because it uses many CSS & JavaScript resources.

Return: No, request will end after this function executed


Use this function to load phpmailer library. Once return TRUE, you may use to send emails with your GMail/YMail account.

Return: TRUE / FALSE


Convert a timestamp (in future) to meanful string.

$time_point timestamp to convert

$date_details if TRUE, append specified date into result

Return: String


Convert a timestamp (in past) to meanful string.

$time_point timestamp to convert

$short_format return short format of result

Return: String


Convert a string to nicer look-a-like URL.

$shorten maximum length of returned string. 0: do not cut the string

Return: String



don't hesitate to contact us if your thing is outside of this section
by using contact button above or send directly to hello@gomymobi.com with subject: [contactgmm]
if could not receive our reply within 24 hours, please resend ticket again