(quase) resolvido... consegui salvar o resultado na variável $output e editá-la como queria ativando o CURLOPT_RETURNTRANSFER ... agora o maldito do loop q não qr dar certo!! eis o código inteiro: <html>
<head></head>
<body>
<form action='index.php' method='post'>
<textarea cols='100' rows='10' name='links'</textarea><p>
<input type='submit' name='submit' value='Enviar'>
</form>
</body>
</html>
<?php
if (isset($_POST['submit']))
{
set_time_limit(0);
echo "<p>";
$links = $_POST['links'];
$split = explode("\n", $links);
$count = (count($split)-1);
for ($x=0; $x<=$count; $x++)
{
if (mb_substr($split[$x],11,10)=="megaupload")
{
$ch = curl_init($split[$x]);
curl_setopt($ch, CURLOPT_COOKIEFILE,1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "login=1&redir=1&username=XXXX&password=FFFF");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
curl_close($ch);
$explode = explode('id="downloadlink">',$output);
$split = explode('"',$explode[1]);
$done = $split[1];
echo $done."<br>";
}
elseif (mb_substr($split[$x],7,10)=="rapidshare")
{
$file = file_get_contents("$split[$x]");
$slice = explode("<form action=", $file);
$dice = explode(" ", $slice[1]);
$edge = $dice[0];
$cut = explode("\"", $edge);
$done = ereg_replace("http://","http://KKKK:JJJJ@",$cut[1]);
echo $done."<br>";
}
}
}
?>