在循环中执行带有参数的php脚本

i need some help with PHP

I've got a situation like this:

http://myserveraddress.com/parser.php?name=user_1

this file do some stuff and output a png image, saving it in a folder on my server. Now I need to call my parser in another php file, inside a loop:

   $result = mysql_query("SELECT * FROM users order by name") 
        or die(mysql_error());
    while($row = mysql_fetch_array( $result ))
    {   
        exec('parser.php?name='.$row['name']);
    }

It don't seem to work, it doesn't output nothing and doesn't save anything... How can I fix it?

Solved! I've used curl

   $result = mysql_query("SELECT * FROM users order by name") 
        or die(mysql_error());
    while($row = mysql_fetch_array( $result ))
    {   
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, "http://myserveradress.com/parser.php?name=".$row['name']);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        $output = curl_exec($ch);
        curl_close($ch);
    }