I have an add train script, it works as far as connecting to the database, and adding people like its supposed to, but none of the profile pictures show up. I don't know PHP enough as to determine why. Can someone help me? This is the code where it pulls the picture.
Code: Select all
if ($config['showpics'] == 1) {
$tmpfound = 0;
$file = file("http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=".$row['id']);
foreach ($file as $line) {
if (strstr($line,"Photo of")) {
$line = strstr($line,'src=');
$pattern = "#<img .*?src=[\"']?(.*?)[\"']?(?: .*?>|>)(.*?)</a>#";
preg_match_all($pattern,$line,$matches);
echo '<tr><td align="center"><img width=100 height=100 src="'.$matches[1][0].'"></td></tr>';
$tmpfound = 1;
}
}
All im getting is a red x for the pic and if you view source it says
where the picture is supposed to show up. So im guessing something wrong with the pattern or preg_match line....but i honestly dont know. It is making it into the If statement though, so its not above that point, it just isnt extracting the photos URL. Any help is appreciated, thanks.