Cloudflare API
It is necessary to write a script for PowerShell or CMD (Windows) or, as a last resort, PHP, considering that the script will take a very long time to execute and that on servers the execution time is limited, so the task should be broken down into batches.
The essence of the task
There are 10,000 domains scattered randomly across 30 cloud accounts.
For all cloud accounts, there are both global API keys and API tokens with open rights to edit the necessary data (screenshot 1).
Using the cloud API, the following task needs to be implemented:
1) Take a domain, check it against the list of tokens in search of the cloud account where the domain is located.
2) Check Redirect Rules. If there are any rules (regardless of what they are and what name they have), delete them first.
3) Next, create a new rule
{
"action": "redirect",
"action_parameters": {
"from_value": {
"preserve_query_string": false,
"status_code": 307,
"target_url": {
"value": ""
}
}
},
"description": "Redirect to goy",
"enabled": true,
"expression": "(ip.geoip.asnum ne 15169 and ip.src.asnum ne 15169 and ip.geoip.asnum ne 20940 and ip.src.asnum ne 20940 and ip.geoip.asnum ne 15180 and ip.src.asnum ne 15180 and ip.geoip.asnum ne 36040 and ip.src.asnum ne 36040 and ip.geoip.asnum ne 15192 and ip.src.asnum ne 15192 and not starts_with(http.request.uri.path, \"\"))",
"version": "8"
}
4) Provide the option to simply delete all rules without creating a new one.
Applications 2
-
3853 24 0 Good day,
I am ready to take on your project. I have experience working with PowerShell, CMD, and PHP to create scripts that run efficiently even with long execution times. I can develop a script that breaks the task into batches to optimize execution time.
To address your task of working with 10,000 domains and 30 cloud accounts, I can propose the following plan:
1) Checking the domain against the list of tokens in the cloud accounts.
2) Removing existing Redirect Rules and creating a new rule with the specified parameters.
3) The ability to delete all rules without creating a new one.
… My rate is $16 per hour. To start working, I will need a more detailed description of the project requirements.
Sincerely,
Maxim
-
8193 63 1 Good afternoon!
I am ready to help you with this project. I look forward to discussing all the details and starting work!
-
1671 11 0 I will create a cmd utility in Golang, the process can be split into different threads.
-
96232 1273 1 10 Hello. I am ready to implement the script in Python or Node.js. In what format are your tokens and domains currently stored? In json?
-
8778 60 0 1 Good afternoon, I am ready to implement your project. I write in Python and hold 3rd place on the platform. I have experience in implementing similar projects.
Portfolio:Freelancehunt
Write to me, we will discuss the details and I will start working.
Current freelance projects in the category PHP
Looking for a Bitrix24 specialist / CRM integrator to set up automation.Our company works with CRM Bitrix24. We need a specialist who can set up automatic addition of phone numbers to leads/orders in two formats. Automation must be correctly configured for two countries: the Republic of Moldova and Romania. Task: When creating a lead or order in… PHP, Web Programming ∙ 5 hours 5 minutes back ∙ 20 proposals |
Add a scrolling marquee to the header of the website
16 USD
https://crazybox.com.ua/uk?srsltid=AfmBOopQRUXCCmxx699n57B3eP1XmwcYxJxwPh9qV9WcVjLjS_J2pK5s here is an example of how it looks, it needs to be made similar to theirs and on this one it needs to be done https://rollershop.com.ua/ opencart ocStore 3.0.3.7. and there should be… PHP, Web Programming ∙ 22 hours 24 minutes back ∙ 83 proposals |
Website optimizationOptimization of the website jdgreta.co.uk on Shopify. SEO audit attached to the project. Main tasks - - Fix all meta data - Complete the technical specifications for the programmer (since this project combines tasks for both the programmer and SEO, if you are not a company -… HTML & CSS, PHP ∙ 1 day 1 hour back ∙ 30 proposals |
Horoshop SpecialistNeed a specialist who can correctly set up the product Feed. Problem: Currently, over 13,000 products are being uploaded with the same type value (e.g., "everything for manicure and pedicure"). Because of this, it is impossible to segment products in Google Ads and set different… PHP, Website Maintenance ∙ 2 days 3 hours back ∙ 21 proposals |
Make sure that order emails from the store do not go to spam.Currently, there is a store on OpenCart, and order emails are landing in spam. We need to ensure they go to Inbox (ukr.net gmail) and check it. The hosting provider wrote: Poor email delivery may be related to a low sender reputation - IP or domain. In this case, we can advise… PHP, Web Programming ∙ 3 days 4 hours back ∙ 47 proposals |