PHP CURL - how to get only first 100 characters response -


i created script content of web page script full content (~25.000 characters). script 4 sites 100.000 characters need first 100 characters every web page. how can tell curl fisrt 100 characters , no more ? think faster solution because have wait ~11 seconds. it's me.

here script:

$c = curl_init(); curl_setopt($c, curlopt_url, 'https://example.com/index.php?id='.$part.'&asmp3=1&part='.$i.'&t='.get_miliseconds()); curl_setopt($c, curlopt_useragent, "mozilla/5.0 (windows; u; windows nt 5.0; en-us; rv:1.7.12) gecko/20050915 firefox/1.0.7"); curl_setopt($c, curlopt_followlocation, true); curl_setopt($c, curlopt_ssl_verifypeer, false); curl_setopt($c, curlopt_cookiefile, 'cookies.txt'); curl_setopt($c, curlopt_cookiejar, 'cookies.txt'); curl_setopt($c, curlopt_returntransfer, true); $code = curl_exec($c); curl_close($c); 

what have add script first 100 characters response?

thanks.

edit:

no, it's not duplicate url: how partially download remote file curl? . don't download file content of web page... it's not same. it's not binary file html content. tried solution url it's doesn;t work.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -