Witam. Mam problem. chciałem wysłać na strone rapidleech link i zobaczyć postęp downloadu. ale wyskakują błędy.
Oto kod.
<?php
function lacz($strona, $referer, $plik, $post=false) {
$przegladarka = 'Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9) Gecko/2008061015 Firefox/3.0';
$naglowki = array('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language: pl,en-us;q=0.7,en;q=0.3',
'Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7');
$link = curl_init();
curl_setopt($link, CURLOPT_HEADER, 0);
curl_setopt($link, CURLOPT_URL, $strona);
curl_setopt($link, CURLOPT_USERAGENT, $przegladarka);
curl_setopt($link, CURLOPT_HTTPHEADER, $naglowki);
curl_setopt($link, CURLOPT_ENCODING, 'gzip');
curl_setopt($link, CURLOPT_ENCODING, 'deflate');
if ($post) {
curl_setopt($link, CURLOPT_POST, 1);
curl_setopt($link, CURLOPT_POSTFIELDS, $post);
}
curl_setopt($link, CURLOPT_COOKIEFILE, $plik);
curl_setopt($link, CURLOPT_COOKIEJAR, $plik);
$strona = curl_exec($link);
curl_close($link);
return $strona;
}
$plik = 'cookie.txt';
echo lacz
('http://foxl33ch.co.cc/', 'http://foxl33ch.co.cc/', $plik, urlencode('link').'='.urlencode('http://www.filesonic.com/file/1513729931/Jug.the.Bro.part2.rar'));
?>
KOD HTML.
<form action="/index.php" name="transload" method="post"> <table class="tab-content" id="tb1" cellspacing="5" width="100%"> <b>Link to Transload:
</b><br> <input type="text" name="link" id="link" size="50"><br><br> <b>Referrer:
</b><br> <input type="text" name="referer" id="referer" size="50"> <input value="Transload File" type="submit"> <td align="left"><input type="checkbox" name="user_pass" onclick="java script:var displ=this.checked?'':'none';document.getElementById('usernpass').style.display=displ;" value="on"> User
& Pass (HTTP/FTP)
</td> <tr id="usernpass" style="display: none;"> User:
<input type="text" name="iuser" value=""><br>Pass:
<input type="text" name="ipass" value=""><td align="left"><input type="checkbox" name="add_comment" onclick="java script:var displ=this.checked?'':'none';document.getElementById('comment').style.display=displ;"> Add Comments
</td> <tr id="comment" style="display: none;"> <label><input type="checkbox" name="ytube_mp4" onclick="java script:var displ=this.checked?'':'none';document.getElementById('ytubeopt').style.display=displ;"> <small>YouTube Video Format Selector
</small></label> <table width="150" border="0" id="ytubeopt" style="display: none;"> <td colspan="2" style="white-space: nowrap;"><input type="checkbox" name="ytdirect"><small> Direct Link
</small></td> <select name="yt_fmt" id="yt_fmt"> <option value="highest" selected="selected">Auto-get the highest quality format available
</option> <option value="0">0 [Video: FLV H263 251kbps 320x180 @ 29.896fps | Audio: MP3 64kbps 1ch @ 22.05kHz]
</option> <option value="5">5 [Video: FLV H263 251kbps 320x180 @ 29.885fps | Audio: MP3 64kbps 1ch @ 22.05kHz]
</option> <option value="6">6 [Video: FLV H263 892kbps 480x270 @ 29.887fps | Audio: MP3 96kbps 1ch @ 44.10kHz]
</option> <option value="13">13 [Video: 3GP H263 77kbps 176x144 @ 15.000fps | Audio: AMR 13kbps 1ch @ 8.000kHz]
</option> <option value="17">17 [Video: 3GP XVID 55kbps 176x144 @ 12.000fps | Audio: AAC 29kbps 1ch @ 22.05kHz]
</option> <option value="18">18 [Video: MP4 H264 505kbps 480x270 @ 29.886fps | Audio: AAC 125kbps 2ch @ 44.10kHz]
</option> <option value="22">22 [Video: MP4 H264 2001kbps 1280x720 @ 29.918fps | Audio: AAC 198kbps 2ch @ 44.10kHz]
</option> <option value="34">34 [Video: FLV H264 256kbps 320x180 @ 29.906fps | Audio: AAC 62kbps 2ch @ 22.05kHz]
</option> <option value="35">35 [Video: FLV H264 831kbps 640x360 @ 29.942fps | Audio: AAC 107kbps 2ch @ 44.10kHz]
</option> <option value="37">37 [Video: MP4 1920×1080 | Audio: AAC 2ch 44.10kHz]
</option>
<td align="left"><label><input type="checkbox" name="imageshack_tor" id="imageshack_tor" onclick="java script:var displ=this.checked?'':'none';document.getElementById('torpremiumblock').style.display=displ;"> <small>ImageShack TorrentService
</small></label><table width="150" border="0" id="torpremiumblock" style="display: none;"> <tbody><tr><td>Username:
</td><td><input type="text" name="tor_user" id="tor_user" size="15" value=""></td></tr> <tr><td>Password:
</td><td><input type="password" name="tor_pass" id="tor_pass" size="15" value=""></td></tr> <label><input type="checkbox" name="mu_acc" onclick="java script:var displ=this.checked?'':'none';document.getElementById('mupremiumblock').style.display=displ;"> <small>Megaupload.com Cookie Value
</small></label> <table width="150" border="0" id="mupremiumblock" style="display: none;"> <label><input type="checkbox" name="cookieuse" onclick="java script:var displ=this.checked?'':'none';document.getElementById('cookieblock').style.display=displ;"> <small>Additional Cookie Value
</small></label> <table width="150" border="0" id="cookieblock" style="display: none;"> <table class="hide-table" id="tb2" cellspacing="5" width="100%"> <table align="center" style="text-align: justify;"> <td><input type="checkbox" name="domail" id="domail" onclick="document.getElementById('emailtd').style.display=document.getElementById('splittd').style.display=this.checked?'':'none';document.getElementById('methodtd').style.display=(document.getElementById('splitchkbox').checked ? (this.checked ? '' : 'none') : 'none');"> Send File to Email
</td> <td id="emailtd" style="display: none;">Email:
<input type="text" name="email" id="email"></td> <tr id="splittd" style="display: none;"> <input id="splitchkbox" type="checkbox" name="split" onclick="java script:var displ=this.checked?'':'none';document.getElementById('methodtd').style.display=displ;"> Split Files
</td> <td id="methodtd" style="display: none;"> <td>Parts Size:
<input type="text" name="partSize" size="2" value="10"> MB
</td> <td><input type="checkbox" id="useproxy" name="useproxy" onclick="java script:var displ=this.checked?'':'none';document.getElementById('proxy').style.display=displ;"> Use Proxy Settings
</td> <td id="proxy" style="display: none;"> <table width="150" border="0"> <tr><td>Username:
</td><td><input type="text" name="proxyuser" id="proxyuser" size="20"></td></tr> <tr><td>Password:
</td><td><input type="text" name="proxypass" id="proxypass" size="20"></td></tr> <td><input type="checkbox" name="premium_acc" id="premium_acc" onclick="java script:var displ=this.checked?'':'none';document.getElementById('premiumblock').style.display=displ;" checked="checked"> Use Premium Account
</td> <td id="premiumblock" style="display: none;"> <table width="150" border="0"> <tbody><tr><td>Username:
</td><td><input type="text" name="premium_user" id="premium_user" size="15" value=""></td></tr> <tr><td>Password:
</td><td><input type="password" name="premium_pass" id="premium_pass" size="15" value=""></td></tr> <tr style="display:none;"> <td><input type="checkbox" name="saveto" id="saveto" onclick="java script:var displ=this.checked?'':'none';document.getElementById('path').style.display=displ;"> Save To
</td> <td id="path" style="display: none;">Path:
<input type="text" name="path" size="40" value="/var/www/html/files"></td> <td><input type="checkbox" name="savesettings" id="savesettings" onclick="java script:var displ=this.checked?'':'none';document.getElementById('clearsettings').style.display=displ;"> Save Settings
</td> <td id="clearsettings" style="display: none;"><a href="java script:clearSettings();">Clear Current Settings
</a></td>