I have searched everything I can think of to make this happen. I am trying to collect data through curl, then send that data to a form which submits it to the database. With the help of this blog and a pre existing product, I managed to get the following code
//extract data from the post
//set POST variables
$cookie_name = "drcuserid";
if(isset($_COOKIE[$cookie_name]))
{
$cookie = $_COOKIE[$cookie_name];
}
$url = 'http://dirtrif.com/test.php';
$fields['username'] = $vbulletin->userinfo[username];
$fields['userid'] = $vbulletin->userinfo[userid];
$fields['addontitle'] = $info['title'];
$fields['addonversion'] = $info['version'];
$fields['bburl'] = $vbulletin->options[bburl];
$fields['bbtitle'] = $vbulletin->options[bbtitle];
$fields['webmasteremail'] = $vbulletin->options[webmasteremail];
$fields['cookie'] = $_COOKIE[$cookie_name];
//url-ify the data for the POST
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string, '&');
//open connection
$ch = curl_init();
//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
//execute post
$result = curl_exec($ch);
//close connection
curl_close($ch);
This is all uncharted territory to me, and I know it needs to be submitted to a form on test.php
but I have no idea where to even start with it. Every example I have come across fails to include that part or even speak of it.
I am trying to get this data submitted to my database, then from there I can manage pulling the results. I know this is pretty demanding, but if anyone can point me in the right direction that would be awesome too. I'm not looking to be spoon-fed I do want to learn as I evolve.
***************Added**************
Just wanted to clarify the results I'm looking for would be a way to get these variables I defined, then send them to my URL I defined, Which would submit them to my database through a form, or really any other way of sending the results to my DB.
An Example of the output I am trying to achieve would be: (DATABASE TABLES) spacing didn't work out. Hope you understand.
username userid addontitle addonversion bburl
BOB 2 Product v1.0 somesite.com