Delphi

Desktops Are An Unmatched Productivity Powerhouse

Mobile apps may be in vogue but with the global pandemic disrupting workplaces everywhere desktop devices bring the office to wherever you are working from this week. Microsoft has reported there are over 1.3 billion devices running Windows 10 and they are working on shipping Windows 11. Some work can be done on just a mobile device but for other information economy activities such as software development, graphic design, and global finance there is no better place to be productive than on your favorite desktop device. In this article we are going to explore how desktop devices have a productivity edge that has been honed over the decades. Does having multiple monitors make you more productive? Repeatedly, studies over the years have shown that having multiple monitors increases productivity. While some mobile devices support large screens or even multiple screens that is not the normal configuration most people use. Desktops (and laptops), on the other hand, generally have a large primary display screen and in addition the devices ship frequently with multiple monitor support built into the motherboard. To learn more about taking full advantage of the desktop UI and UX experience you can get a free ticket for Desktop UX Summit 2021 where the focus is on a “desktop first” experience, what is meant by that and why it’s important. Does using hot key combinations make you more productive? CTRL-C and CTRL-V on Windows are tried and true key combinations for copying and pasting content. Hot keys like this on a keyboard give you a productivity boost over using the same function via the mouse or a touch screen. Software development tools like Embarcadero RAD Studio have built in support for building your own custom keyboard combinations into your apps. In addition to TShortcut, system wide accelerator keys can be configured to enhance productivity. Can adding peripherals make you more productive? Desktop and laptop computers have been around for decades and there are many different kinds of peripherals that have been created for them. Everything from special mice to joysticks to drawing pads to custom instruments and ever smart phones themselves. Specifically, as one example, for graphic design work, drawing pads, or large screened mobile devices connected to a desktop can significantly boost productivity. Not only can peripherals be added to laptop and desktop devices but multiple peripherals can be added all at the same time to a single machine. You could even connect more than one smart phone device to a desktop computer for syncing and management. There are multiple software libraries for Embarcadero RAD Studio that offer direct access to all these types of peripherals. Does app size really matter? Networks and hard drives are fast these days. Despite this the size of your app still matters in this context. Embarcadero Delphi can create a graphical application for Windows devices that is roughly 2MB in size. That is smaller than some web pages! You can read an analysis of such an application in our Delphi vs. WPF vs. Electron comparison. This small-sized executable is easily copied over the network or even executed across the network. Additionally, it has no dependencies! Large mobile device applications, sometimes hundreds of megabytes these days, even at 4G speeds can take significant time to download on a mobile device. Waiting for a […]

Read More

What Is It Like To Be A Developer Sunil Kumar Arora?

Hello. This article is part of a new series where we speak with professional software developers, ask them what it’s like to write code for a living, and perhaps gain a few insights into the software development industry along the way. Today we’re talking to Sunil Kumar Arora also known as “Digitiger”. Sunil is a based in Shillong, Meghalaya, India. He is an Embacadero MVP and long-time Delphi developer. Hello Sunil, thanks for talking to us. Thank you for the opportunity. Could you tell us a little about yourself? I think of myself as one who continues to attempt to travel the road less traveled, and step out of comfort zones, time and again. Still a child at heart who enjoys fantasizing & also passionate to learn pure and rational sciences, my real professional journey has its roots in Software development, Sales & Marketing and above all managing and nurturing relations of all sorts. I think I am an analytical, insightful, & highly disciplined problem solver with a demonstrated ability to identify & secure project resources & provide the quality leadership that invokes committed professional participation from all involved. Maintaining meticulous attention to detail, inspiring team accomplishment, & delivering quality, on-time project execution are areas in which I am reported to excel. As much as I care about human relations, I feel that the approach to work and quality of work is equally important. I have had accountability for the design, implementation, and execution of development / Support projects for all technological platforms including SMAC. During that time, I have developed a solid reputation for successfully and profitably managing numerous concurrent projects through all project phases from conception through completion within targeted cost, schedule, and compliance parameters. Sustaining a high-performance reputation, maintaining quality standards, and minimizing corporate costs and liability have been a consistent result of my professional commitment. Last but not the least, my empathy and compassion also drives me to voluntarily remain engaged as a social worker through several organizations/NGOs including FOMI (Friends of Mentally Ill), Rotary Club of Shillong and many others. Which Embarcadero product(s) do you use a) the most b) regularly? Even though I use RAD Server, Interbase and so on, Delphi has been the most regularly used Embarcadero product I have been using since very long. In fact, I started using Delphi with version 2 sometime around 1996 if my memory serves me right. How and/or why did you become a developer? You may laugh but as a matter of fact I feel my two main habits / likings are the main reasons for me becoming a developer. One is my passion for creativity and second is my laziness. Because I love to be creative but also like to get things done in easiest possible with least efforts or confusion so becoming a software developer perhaps was most logical option. Do you think you will ever stop being a developer? If so, what would be next? I do not think that in real sense there would be a full stop till the time my brain is working, yes, the quantum would surely decrease sooner or later. In fact, if I compare quantum of work or time spent by me in development related activities say about ten years back with what I do now, it […]

Read More

Made With Delphi: This Powerful Load Shedding Schedule App

This beautifully designed and engineered app really puts the superb cross-platform capabilities of the Delphi FireMonkey FMX platform to work on mobile devices running either Android or iOS. Delphi keeps South Africans forewarned of potential electrical outages Eskom is a South African public utility supplying both commercial premises and regular consumers with electricity. At times of extreme demand it is sometimes necessary for Eskom to use “load shedding”. Load shedding is a procedure where the electricity supplier tries to prevent the power delivery circuits from incurring damage due to overloading. Overloading is really quite simple: the amount of electricity which can be generated and safely delivered is finite. Apart from the obvious physical output limitation on the generators themselves, powerlines to deliver that electricity also have a maximum capacity before they will become damaged by overheating and sometimes, in extreme cases, catching fire or exploding. When the amount of electricity being used by consumers reaches the point where it is unsustainable and is approaching that point where an overload could happen the electricity generating company will actually temporarily cut off the power to selected regions for the greater good of the overall client base. This reduces the load and in turn averts disaster. Knowing if your power is going to be disconnected can save lives Obviously, in our high tech world, electricity is the lifeblood of much of modern life. Not just for entertainment such as TVs, games consoles, and computers but, in hotter countries, the air-conditioning is vital. If the air conditioning stops working the inability to cool down can actually result in heat-related sickness and even deaths. Likewise, some private consumers can have other electrical devices like CPAP machines, home kidney dialysis units and other similar medical appliances which operate on electricity and without it can lead to life-threatening and potentially fatal situations developing. Obviously electrical outages are inconvenient at best and seriously impacting or disastrous at worst. A planned outage or least some forewarning of the outage and, better still, a heads-up on when power will be restored can take much of the danger out of electrical disconnections and provides those likely to be affected with some space to take steps to mitigate the problems that might occur. GTM’s Delphi app can genuinely help avoid danger, reduce frustration and prevent a drama becoming a crisis In the words of the developer: “The GTM loadshed app will take all the confusion out of the Greater Tzaneen Municipality’s load shedding schedule”. According to GTM, the app’s features include: – By defining your area the app will tell you if you are subject to load shedding or not.– Indicates whether Eskom is load shedding and, if so, at which stage.– Receive notifications on Eskom stage changes as well as your area’s load shedding status.– Receive notifications when your area’s load shedding is about to start.– Provides contact information for GTM for power related queries. Developer Website GTM LoadShed Google Play GTM  Apple App Store GTM Screenshot Gallery

Read More

Protect Your App With This Free Anti-Hacking Tool In 2021

Hackers around the world are using advanced tools to abuse your source code They can extract sensitive information from your application and cause major financial damage. So, it can be very important to obfuscate your Delphi program. It will make the code very difficult to analyze for the hackers. So, they can’t abuse or add malicious functions to your application. In this post, you will find the details of obfuscating the Delphi programs with an open-source Delphi code obfuscator, called Pythia. This a new Delphi code obfuscator tool for 2021 We have written about code obfuscators before on this blog, both for Delphi code obfuscation and to protect C++ apps from reverse-engineering too. Both of those options were slightly more mature commercial solutions which some commenters said they were not happy with since, although perfectly usable, they believed that they were a little out of date and for a paid product that was a problem. Well, this article is about a code obfuscation tool which is Open Source so you can see exactly what and how it does in the work of obfuscation. Yes, the code is also from a few years back (if it works without bugs, why change it?) – however, because it’s Open Source you can also examine the code, fork the repository, and make improvements or change the way the obfuscation works to create your own unique custom obfuscation which would then further thwart reverse engineering. What is an open-source Delphi Code Obfuscator? Open-source Delphi code obfuscator is a free tool that makes your code complex by adding an extra layer of obfuscation. As a result, the hackers will have a very tough time comprehending your program. So, they can’t steal sensitive data from your application. Also, they can’t reverse engineer your code. Why should you use an open-source Delphi Code Obfuscator? Helps you to save money Hides sensitive information by generating random values Protects intellectual property or trade secrets from the hackers What is the best open-source Delphi Code Obfuscator in 2021? The best open-source Delphi code obfuscator in 2021 is Pythia. It is available for free. The license used means you can use it with the code of your commercial Delphi applications without spending any money. Also, you can alter and redistribute Pythia freely within the guidelines of the original license. How Pythia Protects Your Delphi Program Pythia protects your program by modifying the Delphi Form (DFM) data and Virtual Method Tables (VMT) data of existing binary files in such a way that it’s rendered useless for hackers. However, it doesn’t change the functionality of your program. It keeps everything the same while obfuscating the key information. So, any person attempting to reverse engineer your program will face a very difficult time. Let’s take a look at an example. Before Obfuscation: Take a look at StringGrid1 of the DFM Data tree. It has a property, called Left. What will happen when it is obfuscated? After Obfuscation: As you can see, StringGrid1 has been changed to NzJaIGRG5Hb. Also, the Left property has been changed to BTtK. By obfuscating the data, Pythia is helping you to conceal important values. So, hackers can’t steal key information. Should I use Pythia? Pythia helps you to obfuscate binaries created with Delphi. As a result, your competitors and the lurking […]

Read More

How To Use A C++ DLL In Any Delphi Program

There is a glorious wealth of useful C++ libraries available on the internet. We have featured many great uses of C++ here on this blog too. C++ is typically extremely high performance. If we can have the source code of the C++ library, we can create a package which will then allow us to use the C++ in our Delphi programs. Often though the source code of the C++ library is not available. In commercial C++ libraries, it is common to get only a few C++ headers and the static library file (.lib) without any of the accompanying .cpp source files. So, in this case, when we want to use those C++ libraries in our Delphi application, we can use a Proxy DLL to make it possible. How to create a Proxy DLL to connect C++ DLL and Delphi? To connect Delphi to a DLL, the DLL should expose a simple Windows API style API instead of C++ things. We can use any of the C++ compilers to compile the Proxy DLL. Embarcadero Dev-Cpp Open Source Compiler Visual Studio Let’s take a simple example. Let’s think we have a DLL file and a harder file with this declaration and no .cpp file with the implementation. You can refer to the source code of this example in this link: https://github.com/PacktPublishing/Delphi-High-Performance/tree/master/Chapter%208/StaticLib1 #pragma once class CppClass { int data; public: CppClass(); ~CppClass(); void setData(int); int getSquare(); }; #pragma once class CppClass {   int data; public:   CppClass();   ~CppClass();   void setData(int);   int getSquare(); }; Here’s how to use a C++ library in a Delphi program with a proxy dll Now we need to create the proxy DLL. Create a new C++ DLL project with your preferred IDE. It will automatically add “dllmain.cpp” file. But we need another unit to wrap the static library. Add new unit called “StaticLibWrapper.cpp”. Now we should include the header file of the static library we want to import in our project. #include “stdafx.h” #include “CppClass.h” #include “stdafx.h” #include “CppClass.h” Now copy the header file of the static library to the project folder. Now we should include the static library in our project. To do that add the static library folder to the library directories: Or in Visual Studio goto “Configuration Properties | Linker | General | Additional Library Directories settings”. How to mark C++ DLL functions as “exported” Now we define a Macro to mark DLL functions are exported. #define EXPORT comment(linker, “/EXPORT:” __FUNCTION__ “=” __FUNCDNAME__) #define EXPORT comment(linker, “/EXPORT:” __FUNCTION__ “=” __FUNCDNAME__) Next, implement the IndexAllocator class to cache the C++ objects. This class contains an array of pointers. It has three functions as “Allocate”,  “Release” and “Get” to store the pointer in the cache, release the cache, and get a pointer by index. bool Allocate(int& deviceIndex, void* obj) bool Release(int deviceIndex) void* Get(int deviceIndex) bool Allocate(int& deviceIndex, void* obj) bool Release(int deviceIndex) void* Get(int deviceIndex) Then we need to Initialize and Finalize functions to allocate and deallocate IndexAllocator objects. extern “C” int WINAPI Initialize() extern “C” int WINAPI Finalize() extern “C” int WINAPI Initialize() extern “C” int WINAPI Finalize() Then we create an instance of CppClass class and store it in the cache with this function. extern “C” int WINAPI CreateCppClass (int& index) extern “C” int WINAPI CreateCppClass (int& index) In this statement, we use “C” to make sure the same name is exported and […]

Read More

Made With Delphi: This Brilliant Soccer Strategy Mobile App

The game of soccer is deceptively simple; guide the ball, using only your feet or head, and try to get it into your opponent’s net. Yet that simple set of instructions belies a game of great skill and cunning strategy worthy of any Army general or chess grandmaster. To get that leather sphere pounding in the back of the net requires guile and an understanding of physics and innate geometry combined with hand-to-eye coordination and a substantial level of fitness from the players. It may be called “the beautiful game” but it’s also the fiendishly frustrating game too. A Delphi mobile app for soccer coaches With Soccer Playview coaches and players can view animated plays, drills and practice plans on their cell phone or tablet. Soccer plays, drills and practice plans can be created with the Soccer Playbook program from Jes-Soft, which is free to try and available at http://www.jes-soft.com/soccer/index.html. We’ve featured other apps from Jes-Soft before and how they’ve really put the cross-platform capabilities of RAD Studio Delphi’s FMX FireMonkey framework to excellent use. The app allows users to create strategic ‘plays’ and practice plans on their desktop computers. These can then be saved to a cloud drive such as G-Drive or DropBox. The saved plays can then be opened on the mobile device from those cloud locations. It’s a real shining example of Jes-Soft’s skills but also the true power and overwhelming flexibility of Delphi and FireMonkey. Website Soccer Playview Google Play Soccer Playview Screenshot Gallery RAD Studio is the power behind Jes-Soft’s superb app. It allows them to realize their creativity and bring their app to market, reliably and affordably. Why not download a free trial copy of RAD Studio today and see what it can do for you?

Read More

How To Create A Cross-Platform News App With Delphi

procedure TNewFormFrame.BtnRefreshClick(Sender: TObject); begin   inherited;   RESTRequest1.Execute;  // send request to endpoint     var JSONValue: TJSONValue;   var JSONArray: TJSONArray;   var ArrayElement: TJSONValue;     // after using object we just free them within the Lists   RctList := TList.Create;   ImgList := TList.Create;   LblTitleList := TList.Create;   LblDescpList := TList.Create;     try     JSONValue := TJSONObject.ParseJSONValue(RESTResponse1.Content);     JSONArray := JSONValue.GetValue(‘data’);  // articles are stored in the data array in the JSON response       for ArrayElement in JSONArray do     begin         {$region ‘Create news card’ }       RctNewsCard := TRectangle.Create(vrtscrlbx1);       RctNewsCard.Parent := vrtscrlbx1;       RctNewscard.HitTest := False;       RctNewsCard.Fill.Color := TAlphaColorRec.Ghostwhite;       RctNewsCard.Fill.Kind  := TBrushKind.Solid;       RctNewsCard.Stroke.Thickness := 0;       RctNewsCard.Align := TAlignLayout.Top;       RctNewsCard.Height := 400;       RctNewsCard.Width  := 389;       RctNewsCard.XRadius := 15;       RctNewsCard.YRadius := 15;       RctNewsCard.Margins.Top := 5;       RctNewsCard.Margins.Bottom := 5;       RctNewsCard.Margins.Left := 5;       RctNewsCard.Margins.Right := 5;       RctList.Add(RctNewsCard);  // add to the TList instance       {$endregion}         {$region ‘create image and load image from the url’ }       NewsImage := TImage.Create(RctNewsCard);       NewsImage.Parent := RctNewsCard;       NewsImage.HitTest := False;       NewsImage.Align := TAlignLayout.Top;       NewsImage.Height := 225;       NewsImage.Width  := 389;       NewsImage.Margins.Top := 5;       NewsImage.Margins.Left := 15;       NewsImage.Margins.Right := 15;       NewsImage.Margins.Bottom := 5;       NewsImage.HitTest := False;       NewsImage.MarginWrapMode := TImageWrapMode.Stretch;       NewsImage.WrapMode := TImageWrapMode.Fit;       ImgList.Add(NewsImage);         // load images to the newly created TImage component       var MemoryStream := TMemoryStream.Create;       var HTTPClient   := TNetHTTPClient.Create(nil);       var HTTPRequest  := TNetHTTPRequest.Create(nil);       HTTPRequest.Client := HTTPClient;       try         var ImageURL := ArrayElement.GetValue(‘image’);         HTTPRequest.Get(ImageURL, MemoryStream);         MemoryStream.Seek(0, soFromBeginning);         NewsImage.Bitmap.LoadFromStream(MemoryStream);       finally         FreeAndNil(MemoryStream);         FreeAndNil(HTTPClient);         FreeAndNil(HTTPRequest);       end;       {$endregion}         {$region ‘create title and summary texts in the News Card’ }       LabelTitle := TLabel.Create(RctNewsCard);       LabelTitle.Parent := RctNewsCard;       LabelTitle.Align := TAlignLayout.Top;       LabelTitle.Height := 27;       LabelTitle.Width  := 359;       LabelTitle.HitTest := False;       LabelTitle.AutoSize := True;       LabelTitle.Font.Size := 22;       LabelTitle.Margins.Left := 15;       LabelTitle.Margins.Right := 15;       LabelTitle.Margins.Top := 5;       LabelTitle.Margins.Bottom := 5;       LabelTitle.Text := ‘Title: ‘ + ArrayElement.GetValue(‘title’);       LblTitleList.Add(LabelTitle);         LabelDescription := TLabel.Create(RctNewsCard);       LabelDescription.Parent := RctNewsCard;       LabelDescription.Align := TAlignLayout.Client;       LabelDescription.Height := 131;       LabelDescription.Width  := 359;       LabelDescription.HitTest := False;       LabelDescription.AutoSize := True;       LabelDescription.Font.Size := 15;       LabelDescription.Margins.Left := 15;       LabelDescription.Margins.Right := 15;       LabelDescription.Margins.Top := 5;       LabelDescription.Margins.Bottom := 5;       LabelDescription.Text := ‘Summary: ‘ + ArrayElement.GetValue(‘description’);       LblDescpList.Add(LabelDescription);       {$endregion}     end;   finally     RctList.Free;     ImgList.Free;     LblTitleList.Free;     LblDescpList.Free;   end; end;

Read More

Welcome to the future of software development, again

I have some good news for you, the future of software development has arrived! Well, to be precise, the next possible big thing in the future of software development is here… again. Works anywhere, just add RAM I have this mental block about the name Electron. I’m not entirely sure why it is but whenever I try to remember the name of this ubiquitous web framework my little gray cells shout “Eclipse” and, try as I might, I can’t conjure up the correct name in the appropriate moment during the chatty to and fro of a webinar. I think I have a theory though on why this is happening; my unconscious mind is trying to prevent me from crossing over to the dark side to use Electron to create cross-platform applications. What is wrong with using Electron? Look, there’s nothing wrong with using Electron as such. I’ve actually used Electron and produced an app which was, in effect a website encapsulated by the Electron framework and runtime. But, that said, it is a voracious eater. It will consume every part of your machine’s RAM and CPU resources if left to its own devices. If you don’t believe me just run a quick web search for “electron problems”. The pros of Electron are that it can be a quick route to market. If you have a web app it’s not a massive task to wrap that website or web app with the Electron framework. Also, it implements an auto-update system which means you can push out new versions and improvements with fairly low friction. A web developer is not necessarily an application developer A couple of problems crop up. Behind the scenes of almost every Electron app is the beast which is Node.js – bringer of NPM, the Node Package Manager. The NPM is a superb repository of add-ons, components, modules and time-saving Nodestuffs. Electron / Node developers can get a package for almost everything. If you’re a web developer who has some JavaScript knowledge the NPM can allow you to pull in components to save you a ton of work. Isn’t using NPM a bit like installing Delphi Components? Well, yes it is. Except with one very specific difference: Delphi is compiled down to native code with an optimizing compiler. If you include 1000 Node packages – either deliberately due to some form of overzealous optimism, or inadvertently due to one package having a dependency on another which depends on another five which all depend on another six packages – then you will have 1000 Node packages in your app even if all it does is display a page saying “hello world” in flashing magenta. If you do the same in a Delphi app you will get a lot of unnecessary junk included – but Delphi’s compiler and linking mechanism will exclude a massive amount of things you pulled in but don’t actually get used. It can’t totally protect you from yourself and your component-hoarding kitchen-sink ways but it will definitely save you from creating a Gigagbyte app when it only needed a few MB at most. Low code is the Next Big Thing Right. Low Code apps. You’ve seen some of them and, yes, they can be great for creating apps usually either by answering questions in a wizard […]

Read More

How To Capture Highly Customizable Website Snapshots

Screenshotlayer is a lightweight REST API built to deliver high-quality PNG, JPEG & GIF visual website snapshots through a simple and easy to use interface. We’re going to make use of that API to create a really powerful website snapshot app. Website snapshots, in Delphi, using the Screenshotlayer API The Screenshotlayer API is easy to integrate and works without requiring a queue. With the Screenshotlayer API, you can create a reliable web snapshot automation service. You can capture daily, weekly or monthly, and create an archive if you need. In this post, we will integrate Screenshotlayer API into a cross-platform desktop and mobile application using the Delphi FireMonkey Low-Code Wizard. What is the Screenshotlayer API? The Screenshotlayer API is a world-class RESTful web service to capture highly customizable snapshots of any website in seconds. Just give the website URL, and the web service returns you a screenshot of the website. It offers advanced options, for instance: Set preferred thumbnail dimensions and viewport Inject your CSS Specify a capturing delay Export to AWS S3, FTP  and more How to use Screenshotlayer API? Capturing a snapshot using the Screenshotlayer API is simple. Each API request is based on the following URL and can be configured with different parameters. To make a simple request, you should pass the API access key and URL of the website that you want to take a screenshot of. Moreover, based on how you wish to configure your screenshot, you can choose from several optional parameters: fullpage – take a full height of the target website width – specify your preferred thumbnail width in pixels viewport – specify your preferred viewport dimensions in pixels format – screenshot output format secret_key – your secret key, an MD5 hash of the target & secret word (optional) delay – specify a delay before a screenshot is captured (in seconds) export – export snapshot via custom FTP path or using your AWS S3 user details Let’s see an example of a request Depending on your subscription plan, you can have more secure data streams and features or limits. For instance, higher-level subscription plan users can establish a secure connection. You can have maximum API performance, and the request limit is higher. URL Encryption – If you need a more secure connection, you can utilize the secret key for every API request. First, you need to specify the secret key on the dashboard. My secret key, of course, is the word “delphi”. Then we need to combine the URL and secret keyword into one string and create an MD5 hash out of the string. After that, you can give that value in the query. The Screenshotlayer API Features By default, screenshots are rendered based on the height of the selected viewport. You can alternatively request the full height of the target website with the parameters that we talked about above. CSS Injection – The Screenshotlayer API enables you to inject a custom CSS stylesheet into the target website by appending an existing CSS file URL to the API’s css_url parameter. TTL (Caching Time) – By default, website snapshots are cached for 30 days. Using the ttl parameter, you can specify a custom caching time lower than the default setting. Furthermore, you can have a fresh screenshot of the target website by using the force parameter, which refreshes the target website. How to export website snapshots to AWS S3 or […]

Read More

How To Add IP Address Intelligence Services To Your Apps

Have you ever wanted your apps to have the power to examine an IP address and then find out everything you possibly could about it such as what time zone is local to the IP, what currency they use or what internet service provider is used? This capability is called IP address intelligence and it can add a powerfully rich package of knowledge to your applications allowing you to customize how you present information to your users. In this post you will be learn how to quickly and easily integrate IP address Intelligence into your Delphi desktop and mobile applications. We are going to use a service called IPApi, which is one of the market-leading solutions for all your IP Intelligence requirements in one place. Why would we want to find out information about an IP Address? The IP address is often tied to an individual user. If you know information about that IP address you can customize some of the information, services or even the user interface to better meet the needs of your users. For example, if you find out that the current time for the IP address is night time then you might want to offer different services to those you offer during their daytime hours. Knowing the local currency in use where the IP address is hosted allows you can offer that as a default for purchases. Lastly, you may want or need to restrict some of app’s features if an IP address is located in a different country, possibly for security reasons or to comply with local laws or copyright compliance. With proper IP address intelligence information all of this should be possible. What is the IPApi service? The IPApi service is a powerful IP lookup RESTful web service that helps to find a different set of information using only the IP address. You can do more fascinating things with IP addresses. For instance: Content Personalization based on location Time Zone Lookup Language Redirection based on geolocation Currency and Fraud detection and more The IPApi platform is platform agnostic and offers accurate information. IPApi say their RESTful web service is “trusted by 30,000+ businesses worldwide”. How do I start getting information about an IP address in my application? Head over to the IPApi official website to sign up. There is a Free plan to test it out. IPApi Example Plan Details How do I use IPApi to get information about an IP address? After you sign up, you will have an API access key. And you can utilize that API access key to send requests to the endpoint.  Here is an example of calling to the endpoint: And depending on your subscription plan, you get different sets of data in your response: { “ip”: “161.185.160.93”, “type”: “ipv4”, “continent_code”: “NA”, “continent_name”: “North America”, “country_code”: “US”, “country_name”: “United States”, “region_code”: “NY”, “region_name”: “New York”, “city”: “Brooklyn”, “zip”: “11238”, “latitude”: 40.676, “longitude”: -73.9629, “location”: { “geoname_id”: 5110302, “capital”: “Washington D.C.”, “languages”: [ { “code”: “en”, “name”: “English”, “native”: “English” } ], “country_flag”: “http://assets.ipapi.com/flags/us.svg”, “country_flag_emoji”: “🇺🇸”, “country_flag_emoji_unicode”: “U+1F1FA U+1F1F8”, “calling_code”: “1”, “is_eu”: false }, “time_zone”: { “id”: “America/New_York”, “current_time”: “2018-09-24T05:07:10-04:00”, “gmt_offset”: -14400, “code”: “EDT”, “is_daylight_saving”: true }, “currency”: { “code”: “USD”, “name”: “US Dollar”, “plural”: “US dollars”, “symbol”: “$”, “symbol_native”: “$” }, “connection”: { “asn”: 22252, “isp”: “The City of New York” […]

Read More