php-curl

I want to upload file to specific folder with google drive API curl

青春壹個敷衍的年華 提交于 2021-02-11 07:21:41
问题 I have uploaded file to google drive with curl API. But I want to upload file to specific folder. I have also tried with folder id in API url like: https://www.googleapis.com/upload/drive/v3/files/folder_id?uploadType=media add_action('wpcf7_before_send_mail', 'save_application_form'); function save_application_form($WPCF7_ContactForm) { $wpcf7 = WPCF7_ContactForm :: get_current(); $submission = WPCF7_Submission :: get_instance(); if ($WPCF7_ContactForm->id == 8578) { if ($submission) {

Playing .m3u8 video using php curl

折月煮酒 提交于 2021-02-10 20:53:45
问题 I'm attempting to play a .m3u8 video using a php curl proxy. The following code seems to work, although it only returns the video #EXTM3U information but does not play the video. Code: <?php //....proxy info $auth = 'username:password'; $proxy_ip = '1.2.3.4.5'; $proxy_port = 8080; $path = $_GET['link']; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $path); //curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_PROXYPORT, $proxy_port); curl_setopt($ch, CURLOPT_PROXYTYPE, 'HTTP')

Playing .m3u8 video using php curl

北城余情 提交于 2021-02-10 20:51:25
问题 I'm attempting to play a .m3u8 video using a php curl proxy. The following code seems to work, although it only returns the video #EXTM3U information but does not play the video. Code: <?php //....proxy info $auth = 'username:password'; $proxy_ip = '1.2.3.4.5'; $proxy_port = 8080; $path = $_GET['link']; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $path); //curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_PROXYPORT, $proxy_port); curl_setopt($ch, CURLOPT_PROXYTYPE, 'HTTP')

Playing .m3u8 video using php curl

早过忘川 提交于 2021-02-10 20:50:15
问题 I'm attempting to play a .m3u8 video using a php curl proxy. The following code seems to work, although it only returns the video #EXTM3U information but does not play the video. Code: <?php //....proxy info $auth = 'username:password'; $proxy_ip = '1.2.3.4.5'; $proxy_port = 8080; $path = $_GET['link']; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $path); //curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_PROXYPORT, $proxy_port); curl_setopt($ch, CURLOPT_PROXYTYPE, 'HTTP')

override an array from different Method

最后都变了- 提交于 2021-01-29 17:22:29
问题 I would like to add an curl Option in the method listDir to be able to list the files the connection method works just fine but when am trying to append the cOptions array and add $this->cOptions[CURLOPT_CUSTOMREQUEST]="PROPFIND"; it doesn work!!!! and help clue what to do? thanks in Advance <?php class test{ public static $cOptions; public function connect(){ $ch = curl_init(); $this->cOptions=array( CURLOPT_URL =>"111", CURLOPT_RETURNTRANSFER=>1 ); $response = curl_exec($ch); curl_close($ch

Push XML DATA to REST API with PHP/cURL/JSON

微笑、不失礼 提交于 2021-01-29 08:08:32
问题 I'm somewhat stuck on a problem. I'm attempting to write an app that bascially reads and sorts DATA from an online XML file containing customers and recreates those customers in Wordpress/woocommerce through cURL/php/JSON. Im using insomnia to test my calls and code pieces. This is what i got so far: Pull customer data from the online database into xml [ but its raw unsorted and too much info ] Create a customer in Woocommerce/ Wordpress by POST request in JSON/PHP/cURL Im currently missing

SSL certificate issue unable to get local issuer certificate

妖精的绣舞 提交于 2021-01-27 05:23:50
问题 I'm trying to post data to a payment gateway API. It required post data in xml format. I have the following code: <?php $requestUrl = 'https://api.given.bypg'; //$block->getPaymentUrl(); $amount = 100; // $block->totalOrderAmount()*100; $approveUrl = $block->approveUrl(); $cancelUrl = $block->cancelUrl(); $declineUrl = $block->declineUrl(); $merchant = 'mydomain.com'; //$amount = '100'; // in cents. 1$ = 100cents. $currency = '840'; // for dollar $description = 'Happy customers is what we

Can't access IBM Tone Analyzer API?

狂风中的少年 提交于 2021-01-27 04:27:52
问题 I'm trying to use the Tone Analyzer API in a Laravel application. No matter what I try, I always get the same response of {"code":401, "error": "Unauthorized"} . I suspect my issue is that I can't figure out how to pass in the API key, but the official documentation is no help whatsoever because it only contains instructions for using cURL in the command line. My code currently looks like this (though I have tried many many other iterations. If anyone needs me to I can post all the other

Can't access IBM Tone Analyzer API?

孤街醉人 提交于 2021-01-27 04:27:29
问题 I'm trying to use the Tone Analyzer API in a Laravel application. No matter what I try, I always get the same response of {"code":401, "error": "Unauthorized"} . I suspect my issue is that I can't figure out how to pass in the API key, but the official documentation is no help whatsoever because it only contains instructions for using cURL in the command line. My code currently looks like this (though I have tried many many other iterations. If anyone needs me to I can post all the other

getting error with curl and trellis php wordpress

孤街醉人 提交于 2020-12-23 13:45:24
问题 Hello their i am getting error in this code with trellis server but it is working on other server perfectly <?php $localfile = 'test.txt'; $sftpServer = 'x'; $sftpUsername = 'x'; $sftpPassword = 'x'; $sftpPort = 22; $sftpRemoteDir = '/'; $ch = curl_init('sftp://' . $sftpServer . ':' . $sftpPort . $sftpRemoteDir . '/' . basename($localfile)); $fh = fopen($localfile, 'r'); if ($fh) { curl_setopt($ch, CURLOPT_USERPWD, $sftpUsername . ':' . $sftpPassword); curl_setopt($ch, CURLOPT_UPLOAD, true);