Why not? I do this all the time. Just use the ip address with path of the local server (e.g. 192.168.x.x or 10.10.x.x) and put an http:// in front, instead of “localhost”
http://192.168.1.25/path/to/checkId.php
(assumes you have a properly setup local http server with php, along with your local mysql database)