curl

post an email to a survey using the surveymonkey api

烂漫一生 提交于 2021-02-07 10:34:18
问题 we have a survey in surveymonkey and using c# to try and add the email addresses to the survey using the surveymonkey api. the api works fine for GETS but we have yet to get a POST to work. all we get back is "docs": "https://developer.surveymonkey.com/api/v3/#error-codes", "message": "There was an error retrieving the requested resource.", "id": "1020", "name": "Resource Not Found", "http_status_code": 404 all of the id's are correct as we can GET information about the survey but cannot POST

URL forbidden 403 when using a tool but fine from browser

末鹿安然 提交于 2021-02-07 10:28:15
问题 I have some images that I need to do a HttpRequestMethod.HEAD in order to find out some details of the image. When I go to the image url on a browser it loads without a problem. When I attempt to get the Header info via my code or via online tools it fails An example URL is http://www.adorama.com/images/large/CHHB74P.JPG As mentioned, I have used the online tool Hurl.It to try and attain the Head request but I am getting the same 403 Forbidden message that I am getting in my code. I have

URL forbidden 403 when using a tool but fine from browser

╄→гoц情女王★ 提交于 2021-02-07 10:28:10
问题 I have some images that I need to do a HttpRequestMethod.HEAD in order to find out some details of the image. When I go to the image url on a browser it loads without a problem. When I attempt to get the Header info via my code or via online tools it fails An example URL is http://www.adorama.com/images/large/CHHB74P.JPG As mentioned, I have used the online tool Hurl.It to try and attain the Head request but I am getting the same 403 Forbidden message that I am getting in my code. I have

Upload file to Office 365 Onedrive Business account using PHP-Curl

怎甘沉沦 提交于 2021-02-07 10:28:09
问题 I'm trying to upload a JSON file to a new folder in OneDrive Business AC account using cURL. While uploading, I am getting the following error: HTTP status code not expected - got - 401 Here is my code: $uri = "https://graph.microsoft.com/v1.0/me/drive/root/new/sample.json/content?access_token=accesstoken"; function curl_put($uri, $fp) { $output = ""; try { $pointer = fopen($fp, 'r+'); $stat = fstat($pointer); $pointersize = $stat['size']; $ch = curl_init($uri); curl_setopt($ch, CURLOPT

Upload file to Office 365 Onedrive Business account using PHP-Curl

我只是一个虾纸丫 提交于 2021-02-07 10:27:02
问题 I'm trying to upload a JSON file to a new folder in OneDrive Business AC account using cURL. While uploading, I am getting the following error: HTTP status code not expected - got - 401 Here is my code: $uri = "https://graph.microsoft.com/v1.0/me/drive/root/new/sample.json/content?access_token=accesstoken"; function curl_put($uri, $fp) { $output = ""; try { $pointer = fopen($fp, 'r+'); $stat = fstat($pointer); $pointersize = $stat['size']; $ch = curl_init($uri); curl_setopt($ch, CURLOPT

Can cURL be used to send emails through a proxy

我的梦境 提交于 2021-02-07 09:52:17
问题 I would like to send mails from my localhost. I am connected to internet through my institute's proxy(HTTP) which requires authentication. Is it possible to use cURL to send mails, because so far i've seen it fetching webpages only. If not so, could you please specify any other alternatives? Any help is greatly appreciated!! Thanks! 回答1: If you need to send mails using a web interface, you can script curl to use the proxy and the web site: http://curl.haxx.se/docs/httpscripting.html If you

Can cURL be used to send emails through a proxy

 ̄綄美尐妖づ 提交于 2021-02-07 09:50:51
问题 I would like to send mails from my localhost. I am connected to internet through my institute's proxy(HTTP) which requires authentication. Is it possible to use cURL to send mails, because so far i've seen it fetching webpages only. If not so, could you please specify any other alternatives? Any help is greatly appreciated!! Thanks! 回答1: If you need to send mails using a web interface, you can script curl to use the proxy and the web site: http://curl.haxx.se/docs/httpscripting.html If you

PHP curl headers

你说的曾经没有我的故事 提交于 2021-02-07 09:31:36
问题 I am not very good using PHP and cURL, normally I just make a call with either javascript or C# however I am working with wordpress so C# is not possibly, and I have an apikey with in the call url, so I was wondering if I could have some help with this. In javascript, the call would be. var forecastOptions = { "cache": false, "dataType": "jsonp", "url": callSite }; var forecastRequest = $.ajax(forecastOptions); I do it this way for my readability. I also don't want to turn on the "allow_url

记一次被注入挖矿程序kdevtmpfi解决记录

女生的网名这么多〃 提交于 2021-02-07 09:30:52
前言 发现自己服务器资源使用异常,cpu使用率100%,内存使用也很多,且有陌生的进程。那很有可能是被入侵植入了挖矿程序 解决问题 遇到这种问题切忌惊慌失措,一般挖矿程序除了占用服务资源不会有其他危害 1. 切断来源 一般被侵入的话,服务器上的计划任务会被修改,会有一个进程一直在检测程序是否存在,如果只kill进程删除文件的话会发现过不了一会就会死灰复燃,所以斩草除根,先把去外界不安全的连接关掉。 被修改的计划任务如 curl -o /tmp/kinsing http://45.137.155.55/kinsing 修改服务器密码如果是密钥登陆的切换密钥 passwd user1 #使用root用户修改密码,root用户密码最好也修改下 服务器配置防火墙禁止例如计划任务里的ip访问,云服务器的话可以只允许公司网络访问,去掉非必要暴漏在外的服务端口访问权限,异常访问ip加入防火墙 检查系统的ssh密钥文件,删掉陌生密钥 vim /root/.ssh/authorized_keys 2. 删除挖矿程序 如果直接删除的话可能会发现一会就又开始运行,这是因为没有kill掉它的父进程 检查计划任务删掉异常任务 # 查看 crontab -l #查看root用户下的 crontav -u centos -l #查看centos用户下的(最好普通用户的也看下,方式删除不干净) # 修改

Error in curl when authenticating into JIRA

隐身守侯 提交于 2021-02-07 09:13:12
问题 curl -H "Content-Type: application/json; charset=UTF-8" -d '{"username":"admin","password":"admin"}' http://localhost:2990/jira/rest/auth/1/session I used the above query in DOS and I always get the following error : {"errorMessages":["Unexpected character (''' (code 39)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: org.apache.catalina.connector.CoyoteInputStream@1fd9611; line: 1, column: 2]"]} I tried many permutations and combinations ..