curl

    0热度

    1回答

    我是新来的PHP,我试图创建一个简单的例子来调用我们公司的API。我得到了NetBeans IDE 7.1.2昨天晚上工作(耶),但我似乎无法得到以下代码来显示任何东西。我可以在调试器中运行它。我可以穿过它。我甚至可以没有错误地结束,但curl_exec只返回0.我已经添加了CURLOPT_PROXYPORT,这样我就可以看到流量,但提琴手什么也看不到。我也试图运行这个作为一个PHP命令行(如果有

    0热度

    1回答

    我想测试一个休息API上传本地文件到https网址。我目前正在使用curl来做到这一点。问题是我的curl中的POST被转换为PUT(http://curl.haxx.se/docs/manpage.html)中提到了相同。 从命令行测试我使用了以下内容: 卷曲-H“内容类型:应用程序/ JSON” -H“授权:承载XXXXXXXXXXXXXXXYYYYYzzzzzz” -H“接受版本:〜1” -

    0热度

    1回答

    因为我无法获得所需要的pecl_http扩展,我需要改变这段代码 <?php $files = array( array( 'name' => 'torrent', // Don't change 'type' => 'application/x-bittorrent', 'file' => 'my.torrent' // Ful

    0热度

    1回答

    我想从某个基于web的API使用libcurl c api获取一些数据。 Curl调用api罚款。但是,size_t nmemb太小而无法保持响应。不知何故,它在1280年“切断”。有谁知道如何解决这个问题?此外size_t size是1 .. 这是我使用的功能: int http_call(char *url) { CURL *curl; FILE *curlfile;

    0热度

    1回答

    我试过使用curl语法: curl http:// localhost:8983/solr/update/csv?stream.file =/usr/local/src/apache-solr-3.6.0/example/exampledocs/my + file.csv & separator =; & stream.contentType = text/plain的;字符集= UTF-8 没有

    1热度

    1回答

    我需要获取网站的访问量最高的页面,就像example.com的前20页一样。 是否有任何api或其他东西来实现它?

    0热度

    3回答

    如何获得文本: “文本例如MAX” 的呢? include('simple_html_dom.php'); $ch = curl_init('http://www.site.com?id=325235'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $sss = curl_exec($ch); curl_close($ch); preg_

    2热度

    1回答

    我请检查是否一幅幅是由一个HTTP 200 status code核对和运行: <?php $url = 'www.proxyserver-demo.com'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_NOBODY, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); cur

    0热度

    1回答

    我试图做一个POST要求在Authentication Doc指定的URL,但它不返回成功的响应: $ch = curl_init('https://graph.facebook.com/oauth/device?type=device_code&client_id=APPID'); curl_setopt_array($ch, array( CURLOPT_RETURNTRANSFER

    0热度

    1回答

    <?php // open the current directory $dhandle = opendir('.'); // define an array to hold the files $files = array(); if ($dhandle) { // loop through all of the files while (false !== ($