1. Create an A/ AAAA record and click on the double arrows icon. You will see the following pop up. Then click on the "Activate" button.
2. Another pop-up with your Dynamic URL (that will be replaced in the scripts provided below) and some script files for different environments will be shown.
3. Here is an example Batch Script with cURL you can use with Scheduled tasks (Task Scheduler). Copy and paste the script into a Notepad and save it as .BAT file.
@echo off
set URL=https://ipv4.cloudns.net/api/dynamicURL/?q=YourGeneratedString
:: Executing the cURL request
curl -k %URL% >nul 2>&1
:: Checking if the request was executed successfully
if %errorlevel% neq 0 (
echo Error executing the cURL request.
exit /b %errorlevel%
)
exit /b 0
4. Go to Control Panel > All Control Panel Items (or System and Security) > Administrative Tools > Task Scheduler
5. Select "Task Schedule Library" from the left side.
6. Click on "Create Basic Task" from the right side.
7. Fill in the task name, and if you want, you can add a description.
8. Choose when the task to start.
9. Choose an action for the task that will be performed.
10. Browse and choose the .BAT file you saved in step 3.
11. Save all and finish the task setup.
The manual steps mentioned above can be set up in one script that, once run will do the same and generate a response .txt file:
@echo off
set URL=https://ipv4.cloudns.net/api/dynamicURL/?q=YourGeneratedString
set OUTPUT_FILE=response.txt
:: Executing the cURL request
curl -k -o %OUTPUT_FILE% %URL%
:: Checking if the request was executed successfully
if %errorlevel% neq 0 (
echo Error executing the cURL request.
exit /b %errorlevel%
)
echo The response has been saved to %OUTPUT_FILE%
:: Create a Scheduled Task
schtasks /create /tn "MyCurlTask" /tr "%~f0" /sc minute /f
if %errorlevel% neq 0 (
echo Error creating the Scheduled Task.
exit /b %errorlevel%
)
echo Scheduled Task was created successfully.
exit /b 0
* Parameters Explained: