Php Scrip to gather info from API and enter into mySQL
- or -
Post a project like this1443
£30(approx. $38)
- Posted:
- Proposals: 4
- Remote
- #2811031
- Awarded
Description
Experience Level: Entry
Design 3 API scripts to take information from an API and enter certain information into a MySQL database
Each call must be 2 seconds apart due to server restrictions, can use Cron and a php file
Project 1
API Call 1
$variable = ID 1-10000 (1st call is 1, 2nd call is 2 and so on until 10,000)
https://api.XXX.com/XXXX/{ID $variable}?selections=&key=XXXXXXXX
Data1 (ID), Data 2, Data 3 required
IF no data or Data 2 = 0 ignore the data from the call
Call 2
https://api.XXX.com/XXXX/{$API1:Data3}?selections=&key=XXXXXXXXX
Use info from call 1 Data 3
Data 4, Data 5 required
Call 3
https://api.XXX.com/XXXX/{$API1:Data3}?selections=XXXXXX&key=XXXXXXXXX
Use info from Call 1 Data 3
Data 6 required
$variable must scroll through the numbers 1 - 50000 with each call
Not all calls will have information, so it must ignore empty calls or a call with Data 2 = 0
So the script must do call 1 with {ID 1}, (Wait 1.5 seconds) call 2 with {data 3 from call 1} and call 3 with {data 3 from call 1}
and enter information in a database
Then run the script again with ID 2,
Then run the script again with ID 3
etc
However if Call 1 returns no information or Data 2 = 0, then it jumps to the next ID number without doing call 2 and 3.
Information gathered for the Database will be
Data1 (ID $variable number) (Key Value), Data 2 (Number), Data 3 (Number), Data 4 (upto 20 letters/numbers), Data 5(Upto 20 letters/numbers) Data 6 (Number)
Once this script has done calls 1 - 10,000 to gather all main information a second script will gather 1 piece of information
There should be approx. 5500 records gathered from script 1
API Call
$variable = 1-10000 (This should only call a number from the database (Data 1, ID), i.e. if script one didn't get any information from ID 2, 5 or 7, the second script should ignore calling ID 2, 5 and 7.
https://api.XXX.com/XXXX/{$variable}?selections=&key=XXXXXXXX
This call only needs to return data 2, but I don't want it to update the value, I want a new column creating and the information added to the new column.
Project 2
Final script is separate from the above project.
API Call
Call 1
$variable = ID 1-1000 (1st call is 1, 2nd call is 2 and so on until 1,000) *ability to change the variable figure i.e. 1-1000 or 5000-6000
https://api.XXX.com/XXXX/{ID $variable}?selections=&key=XXXXXXXX
Data1 (ID), Data 2
IF Data 2 = 100000 enter data 1 (ID) and Data 2 into a database and do API 2
API Call 2
https://api.XXX.com/XXXX/{$API1:Data1}?selections=XXXXXX&key=XXXXXXXXX
Use info from Call 1 Data 1 (ID)
Gather Data 3 and data 4 from this call
Database
Data1 (ID $variable number) (Key Value), Data 2 (Number), Data 3 (upto 20 letters/numbers), Data 4 (upto 20 letters/numbers)
Once we agree a price, I will send a sample of the 3 API call information for you to see.
Any more information please just ask, but should be very simple for anyone that is proficient in php/mySQL and understands API calls.
Each call must be 2 seconds apart due to server restrictions, can use Cron and a php file
Project 1
API Call 1
$variable = ID 1-10000 (1st call is 1, 2nd call is 2 and so on until 10,000)
https://api.XXX.com/XXXX/{ID $variable}?selections=&key=XXXXXXXX
Data1 (ID), Data 2, Data 3 required
IF no data or Data 2 = 0 ignore the data from the call
Call 2
https://api.XXX.com/XXXX/{$API1:Data3}?selections=&key=XXXXXXXXX
Use info from call 1 Data 3
Data 4, Data 5 required
Call 3
https://api.XXX.com/XXXX/{$API1:Data3}?selections=XXXXXX&key=XXXXXXXXX
Use info from Call 1 Data 3
Data 6 required
$variable must scroll through the numbers 1 - 50000 with each call
Not all calls will have information, so it must ignore empty calls or a call with Data 2 = 0
So the script must do call 1 with {ID 1}, (Wait 1.5 seconds) call 2 with {data 3 from call 1} and call 3 with {data 3 from call 1}
and enter information in a database
Then run the script again with ID 2,
Then run the script again with ID 3
etc
However if Call 1 returns no information or Data 2 = 0, then it jumps to the next ID number without doing call 2 and 3.
Information gathered for the Database will be
Data1 (ID $variable number) (Key Value), Data 2 (Number), Data 3 (Number), Data 4 (upto 20 letters/numbers), Data 5(Upto 20 letters/numbers) Data 6 (Number)
Once this script has done calls 1 - 10,000 to gather all main information a second script will gather 1 piece of information
There should be approx. 5500 records gathered from script 1
API Call
$variable = 1-10000 (This should only call a number from the database (Data 1, ID), i.e. if script one didn't get any information from ID 2, 5 or 7, the second script should ignore calling ID 2, 5 and 7.
https://api.XXX.com/XXXX/{$variable}?selections=&key=XXXXXXXX
This call only needs to return data 2, but I don't want it to update the value, I want a new column creating and the information added to the new column.
Project 2
Final script is separate from the above project.
API Call
Call 1
$variable = ID 1-1000 (1st call is 1, 2nd call is 2 and so on until 1,000) *ability to change the variable figure i.e. 1-1000 or 5000-6000
https://api.XXX.com/XXXX/{ID $variable}?selections=&key=XXXXXXXX
Data1 (ID), Data 2
IF Data 2 = 100000 enter data 1 (ID) and Data 2 into a database and do API 2
API Call 2
https://api.XXX.com/XXXX/{$API1:Data1}?selections=XXXXXX&key=XXXXXXXXX
Use info from Call 1 Data 1 (ID)
Gather Data 3 and data 4 from this call
Database
Data1 (ID $variable number) (Key Value), Data 2 (Number), Data 3 (upto 20 letters/numbers), Data 4 (upto 20 letters/numbers)
Once we agree a price, I will send a sample of the 3 API call information for you to see.
Any more information please just ask, but should be very simple for anyone that is proficient in php/mySQL and understands API calls.
Martin D.
100% (2)Projects Completed
2
Freelancers worked with
2
Projects awarded
22%
Last project
28 Apr 2020
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies