So I've written the following code in php:
What I want to do next is make it a vbulletin cron plugin. I want to pull from each registered users custom profile field(field7) then put that as the h3tag var. Last I want to set the output to another custom field(field8) for the same user. I want to do this for each registered member.
I don't think it's THAT complicated
Any help would be appreciated.
PHP:
<?php
$h3tag = $_GET['h3tag'];
if (empty($h3tag)) {
$h3tag = 'blank';
}
$h3tag = str_replace(" ","%20",$h3tag);
$ch = curl_init();
$timeout = 5;
curl_setopt ($ch, CURLOPT_URL, 'http://duncanmackenzie.net/services/GetXboxInfo.aspx?GamerTag='. $h3tag);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$in1 = curl_exec($ch);
curl_close($ch);
preg_match('#<Info>(.+?)</Info>#',$in1, $online1);
preg_match('#<Info2[^>]*>([^<]*)#',$in1, $status1);
$online = $online1[1];
$status = $status1[1];
$output = '<div> Online Status: ' . $online . '</div><div> Status: ' . $status . '</div>';
echo $output;
?>
What I want to do next is make it a vbulletin cron plugin. I want to pull from each registered users custom profile field(field7) then put that as the h3tag var. Last I want to set the output to another custom field(field8) for the same user. I want to do this for each registered member.
I don't think it's THAT complicated
Any help would be appreciated.