Global DNS - PHP

Contents

1. How to add WordPress Blogs?

2. How to use direct DNS Server IP in Global DNS?

3. Where can I add files like sitemap.xml, robots.txt?

4. [Quick Fix] 405 Error

5. Fix "405 Method Not Allowed"

6. How to setup server for Global DNS?

7. How to add static pages?

8. How to add HTML Code?

1. How to add WordPress Blogs?

From TMail v5.2, tSMS v1.2 & Global DNS PHP v1.3, you can integrate your WordPress Blogs! You can either show blogs right on the homepage using the short-code OR you can create a new page and put the short-code to show the blogs.

 

Here is the short code to show your WordPress Blogs on TMail: 

[blogs url="https://harshitpeer.com/blog"]

 

Below are all parameters details

url

URL of your WordPress Blog from which you want to show blog post

This is the only REQUIRED parameter. 

context Scope under which the request is made; determines fields present in response.

Default: view

One of: viewembededit

page Current page of the collection.

Default: 1

per_page Maximum number of items to be returned in result set.

Default: 10

search Limit results to those matching a string.
after Limit response to posts published after a given ISO8601 compliant date.
author Limit result set to posts assigned to specific authors.
author_exclude Ensure result set excludes posts assigned to specific authors.
before Limit response to posts published before a given ISO8601 compliant date.
exclude Ensure result set excludes specific IDs.
include Limit result set to specific IDs.
offset Offset the result set by a specific number of items.
order Order sort attribute ascending or descending.

Default: desc

One of: ascdesc

orderby Sort collection by object attribute.

Default: date

One of: authordateidincludemodifiedparentrelevancesluginclude_slugstitle

slug Limit result set to posts with one or more specific slugs.
status Limit result set to posts assigned one or more statuses.

Default: publish

categories Limit result set to all items that have the specified term assigned in the categories taxonomy.
categories_exclude Limit result set to all items except those that have the specified term assigned in the categories taxonomy.
tags Limit result set to all items that have the specified term assigned in the tags taxonomy.
tags_exclude Limit result set to all items except those that have the specified term assigned in the tags taxonomy.
sticky Limit result set to items that are sticky.

 

Note: This short-code uses WP JSON API for extracting blogs from your WordPress site.

2. How to use direct DNS Server IP in Global DNS?

3. Where can I add files like sitemap.xml, robots.txt?

You can add this file inside the folder called "public" which will be inside your root directory.


4. [Quick Fix] 405 Error

You may be facing an issue where the map is not loaded at the first visit but works after doing a browser refresh.

We're working on a fix for this, but here is a quick fix. You can add the below code to Global JS in Admin Panel -> Settings -> Advance

if(localStorage.getItem('firstvisit') == null) {    
    localStorage.setItem('firstvisit', 'no');    
    location.reload();
}


5. Fix "405 Method Not Allowed"

If you're getting this error in your Global DNS, then just check if you're using right Longitude and Latitude values.


Here are the minimum and maximum values for them

Longitude: -180 to +180
Latitude: -90 to +90


If your values are within the range and you're still getting error, please create a ticket and we will get this sorted out ASAP!


Cheers!

6. How to setup server for Global DNS?

Setting up a server for Global DNS is a 3 step process.

Step 1: Get the files for server

Step 2: Put the files on server

Step 3: Add server details on your site.


Keep on repeating all above steps for each server that you add.


Step 1

You have to visit this website here and follow below process:

  1. First field takes the purchase code you received from CodeCanyon after buying Global DNS

    1. If you're using WordPress, put the secret in second field which you generated while setting up Global DNS. You can find this key in WP Dashborad -> Global DNS -> Settings
    2. If you're using PHP Script, just type "NOSECRET" in second field.
  2. Next field will take the server url, where you will put the server files. 
  3. If you are have a website hosted on above site, you can tick the last checkbox. Incase if that's a blank website, don't check it.

Finally, you click on "Download File" button, this will prompt you to download a file.zip and also system will provide you a URL at the top, don't forget to copy that URL.


Step 2

You will have to login to your server via FTP or cPanel -> File Manager. Upload the zip file in public_html or similar folder. And make sure you delete the zip file after extracting it.


Step 3

Now, goto your WordPress or Global DNS Standalone site where you had installed Global DNS and goto Server section. Put appropriate details and URL as the one which you copied in Step 1. 


And that's it! You can also refer to the video below which shows how to create a server for Global DNS.


7. How to add static pages?

In case if you need to add static pages to the website, you can do so by uploading the HTML files to the root/public folder. So, if your root folder is public_html, you will need to upload the HTML files to the public_html/public folder.

Once you upload the HTML files, you can access them by visiting yourwebsiteurl.com/file.html

8. How to add HTML Code?

You may want to add some HTML code as well, so here is how you can do it.

Just add a start tag [html] and end tag [/html] before and after your HTML code respectively. So, if you want to add

<a href="https://google.com">hello</a>

then change it to something like below

[html]<a href="https://google.com">hello</a>[/html]