
A basic small PHP program with two simple curl commands in it
- or -
Post a project like this2139
$35
- Posted:
- Proposals: 4
- Remote
- #2506279
- Awarded
Description
Experience Level: Entry
This very small project (which should take a PHP Programmer just a few minutes to write) requires copying the basic function of two separate one line shell scripts which run a simple curl command in each of them and output the data to a shared log file.
Below are the two shell scripts along with the one curl-get.txt file that provides very simple parameters that each curl script uses and then outputs to one log file called result.log
I will do all the testing for you.
Thank you
John
Shell scripts:
--------------
#1 shell script
#!/bin/bash
SPTH='/home/user/result.log'
curl -w "@curl-get.txt" -so /dev/null -s "https://robolinux.org/">>$SPTH
#2 shell script:
--------------------
#!/bin/bash
SPTH='/home/user/result.log'
curl -w "@curl-get.txt" -so /dev/null -s "http://download.robolinux.org">>$SPTH
curl-get.txt file:
----------------------
content_type: %{content_type}
,
response_code: %{http_code}
,
download_size: %{size_download}
,
time_namelookup: %{time_namelookup}
,
time_connect: %{time_connect}
,
time_appconnect: %{time_appconnect}
,
time_pretransfer: %{time_pretransfer}
,
time_redirect: %{time_redirect}
,
time_starttransfer: %{time_starttransfer}
,
time_total: %{time_total}\n\n
Below are the two shell scripts along with the one curl-get.txt file that provides very simple parameters that each curl script uses and then outputs to one log file called result.log
I will do all the testing for you.
Thank you
John
Shell scripts:
--------------
#1 shell script
#!/bin/bash
SPTH='/home/user/result.log'
curl -w "@curl-get.txt" -so /dev/null -s "https://robolinux.org/">>$SPTH
#2 shell script:
--------------------
#!/bin/bash
SPTH='/home/user/result.log'
curl -w "@curl-get.txt" -so /dev/null -s "http://download.robolinux.org">>$SPTH
curl-get.txt file:
----------------------
content_type: %{content_type}
,
response_code: %{http_code}
,
download_size: %{size_download}
,
time_namelookup: %{time_namelookup}
,
time_connect: %{time_connect}
,
time_appconnect: %{time_appconnect}
,
time_pretransfer: %{time_pretransfer}
,
time_redirect: %{time_redirect}
,
time_starttransfer: %{time_starttransfer}
,
time_total: %{time_total}\n\n

John M.
100% (25)Projects Completed
18
Freelancers worked with
15
Projects awarded
86%
Last project
16 Jan 2021
United States
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
Hi John, I didn't understand what is required to be done. Do I need to access these shell scripts in PHP function or something else? Thanks
838933
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