Categories
Uncategorized

Android System, Sign in to network, Use this network as is

Do you also get this annoying notification that you need to sign in to the network? It is not only annoying but also indicates that the Internet connection is actually broken. And you cannot receive any messages, you cannot use the Internet at all. You need constantly press the Use this network as is option. This is very annoying.

Categories
Uncategorized

Recommendations for Google images indexing

Images on your site are very important, it has said a lot about already. Internet users often pay attention to the illustrated sites and ignore the ones where there is only the text. This article focuses on how to correctly place the images on your site that they are guaranteed to be indexed by Google or Yandex.

Categories
Uncategorized

How to install counter on any web-application

Some web applications do not have a common template output, to which you could simply insert the tracking code (Google Analytics or Yandex Metrika). In such applications, HTML-pages are generated in different ways and patterns. To insert the tracking code into such a system, you can use the Apache HTTPD.

Categories
Uncategorized

Forbid site to load in frames (or iframes)

Imagine that you have developed a site that has a good attendance. Then the attacker will want to embed your web site or any of its page into his frame, to manipulate a data, that users enter thinking if they are on your site. This type of attack is known as Clickjacking.

There is a simplified example of malicious code that uses your site:

Categories
Uncategorized

How to insert image to vcard using PHP

Using PHP you can generate VCF-files, which contain contact data, suitable for Outlook. This article briefly discusses the insertion of image (avatar) to this file.

Categories
Uncategorized

How to check ping status in CMD or BAT

It is often necessary to write a batch file that calls to a certain server, for example, when copying files. In this case script is run automatically in the background at a specified interval of time. What if in one of the starts the server will not be available (dropped off network, unreliable channel, etc.)? Then the script will be unsuccessful to contact the inaccessible server, trying to get something from him. The solution to this problem can be considered as a preliminary check on the availability of the server by using the well known program ping. But the ping does not return error status, and the program can not know whether you have connected successfully to the server or not. Here is the code to workaround this shortcoming.

Categories
Uncategorized

Check the number for integer in JavaScript

If you want to check the number to be integer, you can use this function:

isInt = function(field) {
  if (+field != field || field.indexOf(".") != -1) {
    return false;
  } else {
    return true;
  }
}
Categories
Uncategorized

Print and Echo differences in PHP

Very often arises the question, what is the difference between print and echo in PHP? Understanding the difference can help you to use the most applicable construction in each case.