Convert PHP script to Python ( save XML file on local machine )
$10-30 USD
Completed
Posted over 5 years ago
$10-30 USD
Paid on delivery
Hi
I need someone to convert below code in PHP into Python code.
Script is to get xml feed from php file and save on local machine where Python is running.
--------------------------------------------------
When making your request you will need to send your XML Feed ID with a POST field named user_id. Listed below is an example using php of how you can do this using the PHP CURL function
$userData=array('user_id' => 'USER_ID');
$url='[login to view URL]';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $userData);
$data = curl_exec($ch);
curl_close($ch);
Hello
I can easily change the php code to python, simply using curl with python instead of with php.
Please let me know if you have any questions
thanks
$10 USD in 1 day
5.0 (30 reviews)
3.2
3.2
3 freelancers are bidding on average $20 USD for this job
Hi,
I have extensive experience with both PHP and Python. I can work in Python 2 or 3 depending on your requirements.
I have written lots of scripts that download/save files to the local filesystem with Python, so I think I would be a great fit for this job.
I look forward to working with you.
Joe