paddy_fields Posted March 31, 2014 Share Posted March 31, 2014 (edited) May be missing something simple here, but I've written a CURL script to post data to Reed.co.uk (job board). Reed returns the text 'SUCCESS JobID=1' which is to show it is working... which is great. Problem is I want to be able to now use that JobID and put the details into my database after the CURL request is sent, but I can't see how I would store the '1' as a variable? Would this even be possible as it is the Reed server just outputting text? Edited March 31, 2014 by paddyfields Quote Link to comment https://forums.phpfreaks.com/topic/287430-storing-the-response-from-an-api/ Share on other sites More sharing options...
Solution paddy_fields Posted March 31, 2014 Author Solution Share Posted March 31, 2014 (edited) Worked it out curl_setopt($ch, CURLOPT_URL, 'https://www.reed.co.uk/recruiter/HttpManagement.aspx'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $result = curl_exec($ch); Edited March 31, 2014 by paddyfields Quote Link to comment https://forums.phpfreaks.com/topic/287430-storing-the-response-from-an-api/#findComment-1474570 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.