If you want to show the myspace profile picture on everypage for the user signed in.
Hook: global_start
PHP Code:
function grab_main_pic($url)
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
if (preg_match('/<a\s+id="ctl00_Main_ctl00_UserBasicInformation1_hlDefaultImage"[^>]+><img\s+src="([^"]+)"/si', curl_exec($ch), $mainpic))
{
return $mainpic[1];
}
return 'Failed to grab main pic.';
}
$myspaceimage = grab_main_pic('http://www.myspace.com/' . $vbulletin->userinfo['field24']);
Then in your template the variable $myspaceimage will include what your function is returning.
Also single and double quotes mean different things.
PHP Code:
$variable = 1;
echo '$varaible'; //will return $variable
echo "$variable"; //will return 1