Alternative to CURLOPT_RANGE to grab a specific section

前端 未结 1 1072
星月不相逢
星月不相逢 2020-12-20 09:50

I\'m trying to use curl to fetch only a portion of a page so it will download less data thus making it quicker. I\'ve been testing every possible option i can think of to no

相关标签:
1条回答
  • 2020-12-20 10:46

    You can use your own write callback (CURLOPT_WRITEFUNCTION) and have that return an error once you've received enough data.

    An example using such a write callback can be found here: http://curl.haxx.se/libcurl/php/examples/callbacks.html

    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题