PageRenderTime 210ms queryTime 37ms sortTime 3ms getByIdsTime 48ms findMatchingLines 63ms

100+ results results for 'php curl_setopt' (210 ms)

Not the results you expected?
Curl.php https://github.com/orchestra-io/sample-openx.git | PHP | 334 lines
                    
28require_once 'Zend/Uri/Http.php';
                    
29require_once 'Zend/Http/Client/Adapter/Interface.php';
                    
30require_once 'Zend/Http/Client/Adapter/Exception.php';
                    
33 * An adapter class for Zend_Http_Client based on the curl extension.
                    
34 * Curl requires libcurl. See for full requirements the PHP manual: http://php.net/curl
                    
35 *
                    
184        // set URL
                    
185        curl_setopt($this->curl, CURLOPT_URL, $uri->__toString());
                    
186        // Make sure we're properly connected
                    
234
                    
235        curl_setopt($this->curl, $curlMethod, $curlValue);
                    
236        curl_setopt($this->curl, $curlHttp, true);
                    
248         * Make sure POSTFIELDS is set after $curlMethod is set:
                    
249         * @link http://de2.php.net/manual/en/function.curl-setopt.php#81161
                    
250         */
                    
                
class.HTTPClient.php https://github.com/kennethjiang/Wolke.git | PHP | 532 lines
                    
2    /**
                    
3     * This file is a part of LibWebta, PHP class library.
                    
4     *
                    
238			if ($this->UserAgent)
                    
239				curl_setopt($this->Curl, CURLOPT_USERAGENT, $this->UserAgent);
                    
240		}
                    
267			{
                    
268				curl_setopt($this->Curl, CURLOPT_SSL_VERIFYPEER, false);
                    
269				curl_setopt($this->Curl, CURLOPT_SSL_VERIFYHOST,1);
                    
271			
                    
272			curl_setopt($this->Curl, CURLOPT_RETURNTRANSFER,1);
                    
273			
                    
273			
                    
274			curl_setopt($this->Curl, CURLOPT_URL, $url); 
                    
275
                    
                
RestfulService.php https://github.com/benbruscella/vpcounselling.com.git | PHP | 407 lines
                    
1<?php
                    
2/**
                    
4 * Through this you could connect and aggregate data of various web services.
                    
5 * For more info visit wiki documentation - http://doc.silverstripe.org/doku.php?id=restfulservice  
                    
6 * 
                    
139			$useragent = "SilverStripe/" . SapphireInfo::Version();
                    
140			curl_setopt($ch, CURLOPT_URL, $url);
                    
141			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
141			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
142			curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
                    
143			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
                    
143			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
                    
144			curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
                    
145			curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
                    
151		
                    
152			if($headers) curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
                    
153		
                    
                
HTTP.php https://github.com/yetanotherx/mw-peachy.git | PHP | 306 lines
                    
1<?php
                    
2
                    
81		if( !function_exists( 'curl_init' ) ) {
                    
82			throw new DependencyError( "cURL", "http://us2.php.net/manual/en/curl.requirements.php" );
                    
83		}
                    
96		curl_setopt($this->curl_instance,CURLOPT_CLOSEPOLICY,CURLCLOSEPOLICY_LEAST_RECENTLY_USED);
                    
97		curl_setopt($this->curl_instance,CURLOPT_MAXREDIRS,10);
                    
98		curl_setopt($this->curl_instance,CURLOPT_HTTPHEADER, array('Expect:'));
                    
98		curl_setopt($this->curl_instance,CURLOPT_HTTPHEADER, array('Expect:'));
                    
99		curl_setopt($this->curl_instance,CURLOPT_ENCODING, 'gzip');
                    
100		curl_setopt($this->curl_instance,CURLOPT_RETURNTRANSFER,1);
                    
100		curl_setopt($this->curl_instance,CURLOPT_RETURNTRANSFER,1);
                    
101		curl_setopt($this->curl_instance,CURLOPT_TIMEOUT,30);
                    
102		curl_setopt($this->curl_instance,CURLOPT_CONNECTTIMEOUT,10);
                    
149		curl_setopt($this->curl_instance,CURLOPT_FOLLOWLOCATION,1);
                    
150		curl_setopt($this->curl_instance,CURLOPT_HTTPGET,1);
                    
151		
                    
                
sagepay_direct.php https://gitlab.com/reclamare/mao | PHP | 265 lines
                    
1<?php
                    
2class ModelPaymentSagepayDirect extends Model {
                    
230
                    
231		curl_setopt($curl, CURLOPT_PORT, 443);
                    
232		curl_setopt($curl, CURLOPT_HEADER, 0);
                    
232		curl_setopt($curl, CURLOPT_HEADER, 0);
                    
233		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
                    
234		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
                    
234		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
                    
235		curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
                    
236		curl_setopt($curl, CURLOPT_FORBID_REUSE, 1);
                    
236		curl_setopt($curl, CURLOPT_FORBID_REUSE, 1);
                    
237		curl_setopt($curl, CURLOPT_FRESH_CONNECT, 1);
                    
238		curl_setopt($curl, CURLOPT_POST, 1);
                    
238		curl_setopt($curl, CURLOPT_POST, 1);
                    
239		curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($payment_data));
                    
240
                    
                
tnt.php https://gitlab.com/vince.omega/mcb-nov-build | PHP | 300 lines
                    
1<?php 
                    
2class TNTShipping  {
                    
98		   
                    
99		curl_setopt($ch, CURLOPT_URL, $CurlURL);
                    
100		curl_setopt($ch, CURLOPT_POST, 1);
                    
100		curl_setopt($ch, CURLOPT_POST, 1);
                    
101		curl_setopt($ch, CURLOPT_POSTFIELDS, $CurlQuery);
                    
102		curl_setopt($ch, CURLOPT_FOLLOWLOCATION  ,1);
                    
102		curl_setopt($ch, CURLOPT_FOLLOWLOCATION  ,1);
                    
103		curl_setopt($ch, CURLOPT_HEADER, 0);  // DO NOT RETURN HTTP HEADERS
                    
104		curl_setopt($ch, CURLOPT_RETURNTRANSFER  ,1);  // RETURN THE CONTENTS OF THE CALL
                    
104		curl_setopt($ch, CURLOPT_RETURNTRANSFER  ,1);  // RETURN THE CONTENTS OF THE CALL
                    
105		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // Needs to be included if no *.crt is available to verify SSL certificates
                    
106		curl_setopt($ch, CURLOPT_SSLVERSION,3);  
                    
106		curl_setopt($ch, CURLOPT_SSLVERSION,3);  
                    
107		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                    
108
                    
                
GoogleClosure.php https://github.com/balupton/balphp.git | PHP | 345 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * http://code.google.com/p/php-closure/source/browse/trunk/php-closure.php
                    
4 */
                    
287		$channel = curl_init();
                    
288	    curl_setopt_array($channel, $options);
                    
289	     
                    
                
MANDRILL.php https://github.com/arush/desparation-deprecated.git | PHP | 354 lines
                    
1<?php
                    
2
                    
306
                    
307		curl_setopt($curlSession, CURLOPT_USERAGENT, Mage::helper('monkey')->getUserAgent());
                    
308        curl_setopt($curlSession, CURLOPT_URL, $url);
                    
308        curl_setopt($curlSession, CURLOPT_URL, $url);
                    
309        curl_setopt($curlSession, CURLOPT_HEADER, 0);
                    
310        curl_setopt($curlSession, CURLOPT_POST, TRUE);
                    
310        curl_setopt($curlSession, CURLOPT_POST, TRUE);
                    
311        curl_setopt($curlSession, CURLOPT_POSTFIELDS, http_build_query($params));
                    
312        curl_setopt($curlSession, CURLOPT_RETURNTRANSFER, TRUE);
                    
312        curl_setopt($curlSession, CURLOPT_RETURNTRANSFER, TRUE);
                    
313        //curl_setopt($curlSession, CURLOPT_SSL_VERIFYPEER, FALSE);
                    
314        //curl_setopt($curlSession, CURLOPT_SSL_VERIFYHOST, 1);
                    
                
Curl.php https://gitlab.com/wuhang2003/core | PHP | 310 lines
                    
42        if (!function_exists('curl_exec'))
                    
43            throw new Dropbox_Exception('The PHP curl functions not available!');
                    
44
                    
78			}
                    
79			curl_setopt($ch, CURLOPT_POSTFIELDS, $arguments);
                    
80			$httpHeaders['Content-Length']=strlen($arguments);
                    
90			curl_setopt($ch, CURLOPT_URL, $uri.'?'.http_build_query($arguments));
                    
91			curl_setopt($ch, CURLOPT_POST, false);
                    
92		}
                    
92		}
                    
93		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                    
94		curl_setopt($ch, CURLOPT_TIMEOUT, 600);
                    
273     * Helper function to properly urlencode parameters.
                    
274     * See http://php.net/manual/en/function.oauth-urlencode.php
                    
275     *
                    
                
mcu-cli.php https://gitlab.com/Slind/MCUpdater | PHP | 380 lines
                    
1#!/usr/bin/env php
                    
2<?php
                    
10 *    server jar.
                    
11 * 1) Copy the default config to 'mcu-cli-config.php'
                    
12 * 2) Edit your new config, updating at a minimum the pack url, server id,
                    
13 *    server jar, and memory settings.
                    
14 * 3) Execute mcu-cli.php and hope for the best :)
                    
15 *
                    
22
                    
23msg("MCU-CLI.php Starting...");
                    
24msg(date("r"));
                    
38// load config, copying from default if one is not found
                    
39$cfg_default_filename = "mcu-cli-config.default.php";
                    
40$cfg_filename = "mcu-cli-config.php";
                    
178
                    
179	curl_setopt($ch, CURLOPT_FILE, $fp);
                    
180	curl_setopt($ch, CURLOPT_HEADER, 0);
                    
                
Curl.php https://github.com/marcoscoelho/pyrocms.git | PHP | 375 lines
                    
1<?php defined('BASEPATH') OR exit('No direct script access allowed');
                    
2
                    
5 *
                    
6 * Work with remote servers via cURL much easier than using the native PHP bindings.
                    
7 *
                    
20	protected $url;                 // URL of the session
                    
21	protected $options = array();   // Populates curl_setopt_array
                    
22	protected $headers = array();   // Populates extra HTTP headers
                    
33		{
                    
34			log_message('error', 'cURL Class - PHP was not built with cURL enabled. Rebuild PHP with --with-curl to use cURL.');
                    
35		}
                    
231		// Set all options provided
                    
232		curl_setopt_array($this->session, $this->options);
                    
233
                    
373
                    
374/* End of file Curl.php */
                    
375/* Location: ./application/libraries/Curl.php */
                    
                
AfricasTalking.php https://gitlab.com/statusdevs/owenv2 | PHP | 329 lines
                    
1<?php
                    
2
                    
291        $ch = curl_init();
                    
292        curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_requestBody);
                    
293        curl_setopt($ch, CURLOPT_POST, 1);
                    
319    {
                    
320        curl_setopt($curlHandle_, CURLOPT_TIMEOUT, 60);
                    
321        curl_setopt($curlHandle_, CURLOPT_SSL_VERIFYPEER, FALSE);
                    
321        curl_setopt($curlHandle_, CURLOPT_SSL_VERIFYPEER, FALSE);
                    
322        curl_setopt($curlHandle_, CURLOPT_URL, $this->_requestUrl);
                    
323        curl_setopt($curlHandle_, CURLOPT_RETURNTRANSFER, true);
                    
323        curl_setopt($curlHandle_, CURLOPT_RETURNTRANSFER, true);
                    
324        curl_setopt($curlHandle_, CURLOPT_HTTPHEADER, array('Accept: application/json',
                    
325            'apikey: ' . $this->_apiKey));
                    
                
Curl.php https://bitbucket.org/acidel/buykoala.git | PHP | 238 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
                    
24 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
49    {
                    
50        //curl_setopt();
                    
51        if (isset($this->_config['timeout'])) {
                    
51        if (isset($this->_config['timeout'])) {
                    
52            curl_setopt($this->_getResource(), CURLOPT_TIMEOUT, $this->_config['timeout']);
                    
53        }
                    
54        if (isset($this->_config['maxredirects'])) {
                    
55            curl_setopt($this->_getResource(), CURLOPT_MAXREDIRS, $this->_config['maxredirects']);
                    
56        }
                    
                
importexport.class.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 197 lines
                    
1<?php
                    
2/*
                    
90	 * 	<li><code>ManifestAddendum</code> - <code>string</code> - Optional - For internal use only. </li>
                    
91	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
                    
92	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
                    
111	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
                    
112	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
                    
113	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
                    
130	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
                    
131	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
                    
132	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
                    
151	 * 	<li><code>Marker</code> - <code>string</code> - Optional - Specifies the JOBID to start after when listing the jobs created with your account. AWS Import/Export lists your jobs in reverse chronological order. See MaxJobs. </li>
                    
152	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
                    
153	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
                    
173	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
                    
174	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
                    
175	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
                    
                
PayPalHttpConnection.php https://gitlab.com/CORP-RESELLER/PayPal-PHP-SDK | PHP | 193 lines
                    
1<?php
                    
2
                    
10 * Requires the PHP curl module to be enabled.
                    
11 * See for full requirements the PHP manual: http://php.net/curl
                    
12 */
                    
82        }
                    
83        curl_setopt_array($ch, $options);
                    
84        curl_setopt($ch, CURLOPT_URL, $this->httpConfig->getUrl());
                    
85        curl_setopt($ch, CURLOPT_HEADER, true);
                    
86        curl_setopt($ch, CURLINFO_HEADER_OUT, true);
                    
87        curl_setopt($ch, CURLOPT_HTTPHEADER, $this->getHttpHeaders());
                    
91            case 'POST':
                    
92                curl_setopt($ch, CURLOPT_POST, true);
                    
93                curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
                    
97            case 'DELETE':
                    
98                curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
                    
99                break;
                    
                
namecheap.php https://github.com/cstrouse/Namecheap-REST-PHP.git | PHP | 373 lines
                    
1<?php
                    
2// Namecheap API class
                    
40		$ch = curl_init( 'http://icanhazip.com' );
                    
41		curl_setopt( $ch, CURLOPT_RETURNTRANSFER, TRUE );
                    
42		$result = curl_exec( $ch );
                    
71		$ch = curl_init( $url );
                    
72		curl_setopt( $ch, CURLOPT_RETURNTRANSFER, TRUE );
                    
73		$result = curl_exec( $ch );
                    
125	 * @data array associative array of required registration data
                    
126	 *	http://developer.namecheap.com/docs/doku.php?id=api-reference:domains:create
                    
127	 * @return bool success or failure of the registration
                    
356	 * @promo string promotional code
                    
357	 * http://developer.namecheap.com/docs/doku.php?id=api-reference:users:getpricing
                    
358	 * @return mixed
                    
                
TwitterModel.php https://github.com/rjdjohnston/core.git | PHP | 356 lines
                    
1<?php
                    
2/*
                    
90		$curl = curl_init();
                    
91		curl_setopt($curl, CURLOPT_HEADER, false);
                    
92		curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
                    
92		curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
                    
93		//curl_setopt($curl, CURLOPT_USERPWD, "$user:$pwd"); 
                    
94		curl_setopt($curl, CURLOPT_USERAGENT,'Storytlr/1.0');
                    
97			$url  = "http://twitter.com/statuses/user_timeline/$username.xml?count=$count&page=$page";
                    
98			curl_setopt($curl, CURLOPT_URL, $url);
                    
99			$response = curl_exec($curl);
                    
333		$curl = curl_init();
                    
334		curl_setopt($curl, CURLOPT_HEADER, false);
                    
335		curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
                    
335		curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
                    
336		curl_setopt($curl, CURLOPT_USERPWD, "$user:$pwd"); 
                    
337		curl_setopt($curl, CURLOPT_USERAGENT,'Storytlr/1.0');
                    
                
pp_pro_iframe.php https://gitlab.com/shapcy/opencart | PHP | 261 lines
                    
1<?php
                    
2class ModelPaymentPPProIframe extends Model {
                    
117
                    
118		curl_setopt_array($ch, $defaults);
                    
119
                    
                
mercadopago.php https://gitlab.com/mvcarvalho/plataforma-e-commerce | PHP | 323 lines
                    
1<?php
                    
2
                    
251        if (!extension_loaded ("curl")) {
                    
252            throw new Exception("cURL extension not found. You need to enable cURL in your php.ini or another configuration you have.");
                    
253        }
                    
256
                    
257        curl_setopt($connect, CURLOPT_USERAGENT, "MercadoPago PHP SDK v" . MP::version);
                    
258        //curl_setopt($connect, CURLOPT_CAINFO, $GLOBALS["LIB_LOCATION"] . "/cacert.pem");
                    
258        //curl_setopt($connect, CURLOPT_CAINFO, $GLOBALS["LIB_LOCATION"] . "/cacert.pem");
                    
259        //curl_setopt($connect, CURLOPT_SSLVERSION, 3);
                    
260        curl_setopt($connect, CURLOPT_RETURNTRANSFER, true);
                    
260        curl_setopt($connect, CURLOPT_RETURNTRANSFER, true);
                    
261        curl_setopt($connect, CURLOPT_CUSTOMREQUEST, $method);
                    
262        curl_setopt($connect, CURLOPT_HTTPHEADER, array("Accept: application/json", "Content-Type: " . $content_type));
                    
282
                    
283        curl_setopt($connect, CURLOPT_POSTFIELDS, $data);
                    
284    }
                    
                
PSWebServiceLibrary.php https://gitlab.com/ptisky/API_prestashop | PHP | 410 lines
                    
1<?php

                    
2/*

                    
9* It is also available through the world-wide-web at this URL:

                    
10* http://opensource.org/licenses/osl-3.0.php

                    
11* If you did not receive a copy of the license and are unable to

                    
22*  @copyright  2007-2013 PrestaShop SA

                    
23*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)

                    
24*  International Registered Trademark & Property of PrestaShop SA

                    
53	 * <code>

                    
54	 * <?php

                    
55	 * require_once('./PrestaShopWebservice.php');

                    
72		if (!extension_loaded('curl'))

                    
73		  throw new PrestaShopWebserviceException('Please activate the PHP extension \'curl\' to allow use of PrestaShop webservice library');

                    
74		$this->url = $url;

                    
129

                    
130		curl_setopt_array($session, $curl_options);

                    
131		$response = curl_exec($session);

                    
                
PSWebServiceLibrary.php https://gitlab.com/ptisky/API_prestashop | PHP | 411 lines
                    
1<?php
                    
2/*
                    
9* It is also available through the world-wide-web at this URL:
                    
10* http://opensource.org/licenses/osl-3.0.php
                    
11* If you did not receive a copy of the license and are unable to
                    
22*  @copyright  2007-2013 PrestaShop SA
                    
23*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
24*  International Registered Trademark & Property of PrestaShop SA
                    
53	 * <code>
                    
54	 * <?php
                    
55	 * require_once('./PrestaShopWebservice.php');
                    
72		if (!extension_loaded('curl'))
                    
73		  throw new PrestaShopWebserviceException('Please activate the PHP extension \'curl\' to allow use of PrestaShop webservice library');
                    
74		$this->url = $url;
                    
129
                    
130		curl_setopt_array($session, $curl_options);
                    
131		$response = curl_exec($session);
                    
                
stats.php https://github.com/error10/Ushahidi_Web.git | PHP | 421 lines
                    
1<?php defined('SYSPATH') or die('No direct script access.');
                    
2
                    
6 *
                    
7 * PHP version 5
                    
8 * LICENSE: This source file is subject to LGPL license
                    
36		if($stat_id == 0) return '';
                    
37		$url = 'http://tracker.ushahidi.com/px.php?task=tc&siteid='.$stat_id;
                    
38
                    
39		$curl_handle = curl_init();
                    
40		curl_setopt($curl_handle,CURLOPT_URL,$url);
                    
41		curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,15); // Timeout set to 15 seconds. This is somewhat arbitrary and can be changed.
                    
41		curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,15); // Timeout set to 15 seconds. This is somewhat arbitrary and can be changed.
                    
42		curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1); // Set cURL to store data in variable instead of print
                    
43		$buffer = curl_exec($curl_handle);
                    
55					try {
                    
56					  var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", '.$stat_id.');
                    
57					  piwikTracker.trackPageView();
                    
                
init.php https://bitbucket.org/seyar/kinda.local.git | PHP | 580 lines
                    
1<?php defined('SYSPATH') or die('No direct script access.');
                    
2/**
                    
3 * The CURL library provides an object oriented interface
                    
4 * to the procedural CURL PHP functions, the class only
                    
5 * allows for a single CURL session per instance - as curl_init
                    
7 *
                    
8 * $Id: Curl.php 16 2009-05-26 17:37:46Z samsoir $
                    
9 *
                    
243	/**
                    
244	 * Sets an array of options, must use curl_setopt consts
                    
245	 *
                    
263	/**
                    
264	 * Set a single option, must use curl_setopt consts
                    
265	 *
                    
310		// Set the header to be processed by the parser and turn off header
                    
311		curl_setopt($this->connection, CURLOPT_HEADERFUNCTION, array($this, 'parse_header'));
                    
312		curl_setopt($this->connection, CURLOPT_HEADER, FALSE);
                    
                
content_provider.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 379 lines
                    
1<?php
                    
2
                    
58			$ch = curl_init();
                    
59			curl_setopt($ch, CURLOPT_URL, $url);
                    
60			$fh = @fopen($target, 'w');
                    
60			$fh = @fopen($target, 'w');
                    
61			curl_setopt($ch, CURLOPT_FILE, $fh);
                    
62			curl_exec($ch);
                    
139		if ( $xmlg["useapi"] ) {
                    
140			$url = "http://" . $xmlg["site_base_url"] . "/api.php?format=php&action=query&prop=revisions&rvexpandtemplates=1&rvprop=timestamp|user|comment|content&titles=" . urlencode ( $title ) ;
                    
141			$data = @file_get_contents ( $url ) ;
                    
158		} else if ( $use_se ) {
                    
159			$url = "http://" . $xmlg["site_base_url"] . "/index.php?listauthors=1&title=Special:Export/" . urlencode ( $title ) ;
                    
160		} else {
                    
161			if ( $xmlg["use_toolserver_url"] ) {
                    
162#				$url = "http://" . $xmlg["site_base_url"] . "/index.php?action=raw&title=" . urlencode ( $title ) ;
                    
163				$u = urlencode ( $title ) ;
                    
                
magmi_remoteagent.php https://gitlab.com/inglobe/mgt-clemente-css | PHP | 498 lines
                    
1<?php
                    
2// REMOTE AGENT IS A HTTP API ENABLING REMOTE FILE SAVING AND OTHER EXECUTION PROXYING
                    
109        /* head */
                    
110        curl_setopt($context, CURLOPT_HEADER, true);
                    
111        curl_setopt($context, CURLOPT_RETURNTRANSFER, true);
                    
111        curl_setopt($context, CURLOPT_RETURNTRANSFER, true);
                    
112        curl_setopt($context, CURLOPT_CUSTOMREQUEST, 'HEAD');
                    
113        curl_setopt($context, CURLOPT_NOBODY, true);
                    
143        // add support for https urls
                    
144        curl_setopt($context, CURLOPT_SSL_VERIFYPEER, false);
                    
145        curl_setopt($context, CURLOPT_RETURNTRANSFER, false);
                    
145        curl_setopt($context, CURLOPT_RETURNTRANSFER, false);
                    
146        curl_setopt($context, CURLOPT_CUSTOMREQUEST, 'GET');
                    
147        curl_setopt($context, CURLOPT_NOBODY, false);
                    
147        curl_setopt($context, CURLOPT_NOBODY, false);
                    
148        curl_setopt($context, CURLOPT_FILE, $fp);
                    
149        curl_setopt($context, CURLOPT_HEADER, 0);
                    
                
definitions.php https://gitlab.com/scsistemas/superprime | PHP | 262 lines
                    
1<?php
                    
2	//$urlWS = 'http://qa.superprimeweb.com/admin/index.php?';
                    
2	//$urlWS = 'http://qa.superprimeweb.com/admin/index.php?';
                    
3    $urlWS = 'http://localhost:8080/superprime/admin/index.php?';
                    
4	$rutaFotos = '../images/fotos/';
                    
38		$curl = curl_init($hashUrl);
                    
39		curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
                    
40		curl_setopt($curl, CURLOPT_POST, true);
                    
40		curl_setopt($curl, CURLOPT_POST, true);
                    
41		curl_setopt($curl, CURLOPT_POSTFIELDS, $hashParam);
                    
42		$responseHash = curl_exec($curl);
                    
74		$curl = curl_init($service_url);
                    
75		curl_setopt($curl, CURLOPT_POST, true);
                    
76		curl_setopt($curl, CURLOPT_POSTFIELDS, $tokenParam);
                    
76		curl_setopt($curl, CURLOPT_POSTFIELDS, $tokenParam);
                    
77		curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
                    
78		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
                    
                
class-wp-http-curl.php https://gitlab.com/ReneMC/Custom-wordpress-theme | PHP | 385 lines
                    
1<?php
                    
2/**
                    
103
                    
104			curl_setopt( $handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP );
                    
105			curl_setopt( $handle, CURLOPT_PROXY, $proxy->host() );
                    
105			curl_setopt( $handle, CURLOPT_PROXY, $proxy->host() );
                    
106			curl_setopt( $handle, CURLOPT_PROXYPORT, $proxy->port() );
                    
107
                    
108			if ( $proxy->use_authentication() ) {
                    
109				curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY );
                    
110				curl_setopt( $handle, CURLOPT_PROXYUSERPWD, $proxy->authentication() );
                    
116		if ( $is_local ) {
                    
117			/** This filter is documented in wp-includes/class-wp-http-streams.php */
                    
118			$ssl_verify = apply_filters( 'https_local_ssl_verify', $ssl_verify );
                    
119		} elseif ( ! $is_local ) {
                    
120			/** This filter is documented in wp-includes/class-wp-http-streams.php */
                    
121			$ssl_verify = apply_filters( 'https_ssl_verify', $ssl_verify );
                    
                
File.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 306 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * A PHP-Based RSS and Atom Feed Framework.
                    
6 * Takes the hard work out of managing a complete RSS/Atom solution.
                    
40 * @link http://simplepie.org/ SimplePie
                    
41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
                    
42 */
                    
100				{
                    
101					curl_setopt($fp, CURLOPT_ENCODING, '');
                    
102				}
                    
102				}
                    
103				curl_setopt($fp, CURLOPT_URL, $url);
                    
104				curl_setopt($fp, CURLOPT_HEADER, 1);
                    
104				curl_setopt($fp, CURLOPT_HEADER, 1);
                    
105				curl_setopt($fp, CURLOPT_RETURNTRANSFER, 1);
                    
106				curl_setopt($fp, CURLOPT_FAILONERROR, 1);
                    
                
upnpplayer.class.php https://gitlab.com/x33n/ampache | PHP | 384 lines
                    
1<?php 
                    
2/**
                    
69    {
                    
70        require_once AmpConfig::get('prefix') . '/modules/upnp/upnpdevice.php';
                    
71        require_once AmpConfig::get('prefix') . '/modules/upnp/upnpplaylist.php';
                    
197        $ch = curl_init();
                    
198        curl_setopt( $ch, CURLOPT_URL, $url );
                    
199        curl_setopt( $ch, CURLOPT_FRESH_CONNECT, true );
                    
199        curl_setopt( $ch, CURLOPT_FRESH_CONNECT, true );
                    
200        curl_setopt( $ch, CURLOPT_HEADER, false );
                    
201        curl_exec( $ch );
                    
226        // launch special page in background for periodically check play status
                    
227        $url = AmpConfig::get('local_web_path') . "/upnp/playstatus.php";
                    
228        $this->CallAsyncURL($url);
                    
                
oauth.php https://github.com/calvinfroedge/codeigniter-oauth.git | PHP | 215 lines
                    
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
59	{
                    
60		$module_location = dirname(__FILE__).'/providers/'.$module.'.php';
                    
61		if (!is_file($module_location))
                    
133
                    
134        curl_setopt($ch, CURLOPT_URL, $url);
                    
135        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
                    
135        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
                    
136        curl_setopt($ch, CURLOPT_TIMEOUT, 30);
                    
137        curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
                    
137        curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
                    
138        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
                    
139
                    
141        {
                    
142            curl_setopt($ch, CURLOPT_POST, 1);
                    
143            curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
                    
                
class-wp-http-curl.php https://gitlab.com/campus-academy/krowkaramel | PHP | 411 lines
                    
1<?php
                    
2/**
                    
101
                    
102			curl_setopt( $handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP );
                    
103			curl_setopt( $handle, CURLOPT_PROXY, $proxy->host() );
                    
103			curl_setopt( $handle, CURLOPT_PROXY, $proxy->host() );
                    
104			curl_setopt( $handle, CURLOPT_PROXYPORT, $proxy->port() );
                    
105
                    
106			if ( $proxy->use_authentication() ) {
                    
107				curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY );
                    
108				curl_setopt( $handle, CURLOPT_PROXYUSERPWD, $proxy->authentication() );
                    
114		if ( $is_local ) {
                    
115			/** This filter is documented in wp-includes/class-wp-http-streams.php */
                    
116			$ssl_verify = apply_filters( 'https_local_ssl_verify', $ssl_verify, $url );
                    
117		} elseif ( ! $is_local ) {
                    
118			/** This filter is documented in wp-includes/class-wp-http.php */
                    
119			$ssl_verify = apply_filters( 'https_ssl_verify', $ssl_verify, $url );
                    
                
Curl.php https://github.com/ad2joe/php-framework-benchmarks.git | PHP | 258 lines
                    
1<?php
                    
2/**
                    
9 * 
                    
10 * @author Paul M. Jones <pmjones@solarphp.com>
                    
11 * 
                    
11 * 
                    
12 * @license http://opensource.org/licenses/bsd-license.php BSD
                    
13 * 
                    
13 * 
                    
14 * @version $Id: Curl.php 4405 2010-02-18 04:27:25Z pmjones $
                    
15 * 
                    
98     * 
                    
99     * @see <http://php.net/curl>
                    
100     * 
                    
115        case Solar_Http_Request::METHOD_GET:
                    
116            curl_setopt($ch, CURLOPT_HTTPGET, true);
                    
117            break;
                    
                
GoogleUtilityClient.php https://github.com/ibnoe/OpenVBX.git | PHP | 329 lines
                    
1<?php
                    
2/**
                    
167			case 'PUT':
                    
168				curl_setopt(self::$curl, CURLOPT_CUSTOMREQUEST, $method);
                    
169				break;
                    
170			case 'POST':
                    
171				curl_setopt(self::$curl, CURLOPT_POSTFIELDS, http_build_query($args));
                    
172				curl_setopt(self::$curl, CURLOPT_POST, true);
                    
176		// Send the HTTP request.
                    
177		curl_setopt(self::$curl, CURLOPT_URL, $url);
                    
178		curl_setopt(self::$curl, CURLOPT_RETURNTRANSFER, true);
                    
178		curl_setopt(self::$curl, CURLOPT_RETURNTRANSFER, true);
                    
179		curl_setopt(self::$curl, CURLOPT_HTTPHEADER, array('Content-Type: application/atom+xml',
                    
180														   'Authorization: GoogleLogin auth='.$this->auth_token));
                    
210		error_log(var_export($args, true));
                    
211		curl_setopt(self::$curl, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
                    
212		curl_setopt(self::$curl, CURLOPT_POST, true); 
                    
                
class.api.php https://github.com/michaelmcandrew/th.git | PHP | 198 lines
                    
1<?php
                    
2/**
                    
5or from any code on the same server as civicrm
                    
6  $api = new civicrm_api3 (array('conf_path'=> '/your/path/to/your/civicrm/or/joomla/site)); //the path to civicrm.settings.php
                    
7or to query a remote server via the rest api
                    
56      else
                    
57        $this->uri .= '/sites/all/modules/civicrm/extern/rest.php';
                    
58      $this->uri .='?json=1';
                    
72    if (isset ($config) &&isset($config ['conf_path'] )) {
                    
73      require_once ($config ['conf_path'] .'/civicrm.settings.php');
                    
74      require_once 'CRM/Core/Config.php';
                    
74      require_once 'CRM/Core/Config.php';
                    
75      require_once 'api/api.php';
                    
76      require_once "api/v3/utils.php";
                    
100
                    
101  /**  As of PHP 5.3.0  */
                    
102  public static function __callStatic($name, $arguments) {
                    
                
Asset.php https://bitbucket.org/larryg/powerhut.git | PHP | 464 lines
                    
1<?php namespace Basset;
                    
2
                    
355
                    
356            curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
                    
357            curl_setopt($handler, CURLOPT_FOLLOWLOCATION, true);
                    
357            curl_setopt($handler, CURLOPT_FOLLOWLOCATION, true);
                    
358            curl_setopt($handler, CURLOPT_HEADER, true);
                    
359            curl_setopt($handler, CURLOPT_NOBODY, true);
                    
359            curl_setopt($handler, CURLOPT_NOBODY, true);
                    
360            curl_setopt($handler, CURLOPT_SSL_VERIFYPEER, false);
                    
361
                    
452    {
                    
453        // Because PHP doesn't allow us to name a method as "include" we'll revert to magically
                    
454        // capturing it when the method can't be resolved. If the method is "include" then we'll
                    
                
Requeteur.php https://gitlab.com/team_fsn/fsn-php | PHP | 255 lines
                    
1<?php
                    
2class Controller_Requeteur extends Yab_Controller_Action {
                    
69		$resource = curl_init();
                    
70		curl_setopt($resource, CURLOPT_URL, $url);
                    
71		curl_setopt($resource, CURLOPT_HTTPHEADER, $header);
                    
71		curl_setopt($resource, CURLOPT_HTTPHEADER, $header);
                    
72		curl_setopt($resource, CURLOPT_RETURNTRANSFER, 1);
                    
73		curl_setopt($resource, CURLOPT_POST, 1);
                    
73		curl_setopt($resource, CURLOPT_POST, 1);
                    
74		curl_setopt($resource, CURLOPT_POSTFIELDS, $data);
                    
75	
                    
86			$resourceExt = curl_init();
                    
87			curl_setopt($resourceExt, CURLOPT_URL, $url_fai_extensions);
                    
88			curl_setopt($resourceExt, CURLOPT_HTTPHEADER, $headerExt);
                    
88			curl_setopt($resourceExt, CURLOPT_HTTPHEADER, $headerExt);
                    
89			curl_setopt($resourceExt, CURLOPT_RETURNTRANSFER, 1);
                    
90		
                    
                
validate.php https://github.com/ochinedu/FUEL-CMS.git | PHP | 471 lines
                    
1<?php
                    
2require_once(FUEL_PATH.'libraries/Fuel_base_controller.php');
                    
64				$ch = curl_init(); 
                    
65				curl_setopt($ch, CURLOPT_URL, $this->input->post('uri'));
                    
66				curl_setopt($ch, CURLOPT_HEADER, 0);
                    
66				curl_setopt($ch, CURLOPT_HEADER, 0);
                    
67				curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
68				curl_setopt($ch, CURLOPT_USERAGENT, $this->agent->agent_string());
                    
82				$ch = curl_init(); 
                    
83				curl_setopt($ch, CURLOPT_URL, $validate_config['validator_url']);
                    
84				curl_setopt($ch, CURLOPT_HEADER, 0); 
                    
84				curl_setopt($ch, CURLOPT_HEADER, 0); 
                    
85				curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
86				curl_setopt($ch, CURLOPT_POST, 1);
                    
86				curl_setopt($ch, CURLOPT_POST, 1);
                    
87				curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
                    
88
                    
                
old.php https://bitbucket.org/Red54/wallproxy.git | PHP | 393 lines
                    
1<?php
                    
2
                    
39function print_notify($method, $url, $status, $content) {
                    
40    $content = "<h2>PHP Server Fetch Info</h2><hr noshade='noshade'><p>$method '$url'</p><p>Return Code: $status</p><p>Message: $content</p>";
                    
41    $headers = array('content-type' => 'text/html');
                    
47    $headers = array('content-type' => 'text/html');
                    
48    $content = "<h2>PHP Server Debug Info</h2><hr noshade='noshade'>";
                    
49    foreach (func_get_args() as $key => $value) {
                    
160        $ch = curl_init($url);
                    
161        curl_setopt_array($ch, $curl_opt);
                    
162        $ret = curl_exec($ch);
                    
300
                    
301    $request = @gzuncompress(@file_get_contents('php://input'));
                    
302    if ($request === False) {
                    
302    if ($request === False) {
                    
303        return print_notify($method, $url, 500, 'OOPS! gzuncompress php://input error!');
                    
304    }
                    
                
sagepay_server.php https://gitlab.com/dadangnh/sb1-bon | PHP | 266 lines
                    
1<?php
                    
2class ModelExtensionPaymentSagepayServer extends Model {
                    
231
                    
232		curl_setopt($curl, CURLOPT_PORT, 443);
                    
233		curl_setopt($curl, CURLOPT_HEADER, 0);
                    
233		curl_setopt($curl, CURLOPT_HEADER, 0);
                    
234		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
                    
235		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
                    
235		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
                    
236		curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
                    
237		curl_setopt($curl, CURLOPT_FORBID_REUSE, 1);
                    
237		curl_setopt($curl, CURLOPT_FORBID_REUSE, 1);
                    
238		curl_setopt($curl, CURLOPT_FRESH_CONNECT, 1);
                    
239		curl_setopt($curl, CURLOPT_POST, 1);
                    
239		curl_setopt($curl, CURLOPT_POST, 1);
                    
240		curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($payment_data));
                    
241
                    
                
record.php https://gitlab.com/dev24/hanatour_mobileweb | PHP | 196 lines
                    
1<?php
                    
2function get_Content($_url){
                    
6			curl_setopt($cURL, CURLOPT_URL,$_url);
                    
7			curl_setopt($cURL, CURLOPT_HEADER,0);
                    
8			//1->DIRECT RETURN 0->RESULT RETURN
                    
8			//1->DIRECT RETURN 0->RESULT RETURN
                    
9			curl_setopt($cURL, CURLOPT_RETURNTRANSFER,1); 
                    
10			curl_setopt($cURL, CURLOPT_SSL_VERIFYPEER, FALSE);
                    
27			curl_setopt($cURL, CURLOPT_SSL_VERIFYPEER, FALSE);
                    
28			curl_setopt($cURL, CURLOPT_URL,$_url);
                    
29			curl_setopt($cURL, CURLOPT_HEADER,0);
                    
29			curl_setopt($cURL, CURLOPT_HEADER,0);
                    
30			curl_setopt($cURL, CURLOPT_POST,1);
                    
31			curl_setopt($cURL, CURLOPT_POSTFIELDS, $postf);
                    
193		</div>
                    
194		<?php// include_once('footer.php'); ?>
                    
195	</body>
                    
                
todo.php https://gitlab.com/conquerthechaos/hs-hubot-scripts | PHP | 323 lines
                    
1<?php
                    
2
                    
19		$ch = curl_init();
                    
20		curl_setopt($ch, CURLOPT_URL,$jira_url . $extra_url);
                    
21		curl_setopt($ch, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
                    
21		curl_setopt($ch, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
                    
22		curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
                    
23		
                    
23		
                    
24		// curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
                    
25		// curl_setopt($ch, CURLOPT_USERPWD, "$jira_user:$jira_pass");
                    
25		// curl_setopt($ch, CURLOPT_USERPWD, "$jira_user:$jira_pass");
                    
26		curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Basic ' . base64_encode("$jira_user:$jira_pass"), 'Content-Type: application/json') );
                    
27
                    
31
                    
32			curl_setopt($ch, CURLOPT_POST,1);
                    
33			curl_setopt($ch, CURLOPT_POSTFIELDS,$postFields);
                    
                
twitteroauth.php https://bitbucket.org/luobailiang/api.git | PHP | 247 lines
                    
1<?php
                    
2
                    
5 *
                    
6 * The first PHP Library to support OAuth for Twitter's REST API.
                    
7 */
                    
9/* Load OAuth lib. You can find it at http://oauth.net */
                    
10require_once('OAuth.php');
                    
11
                    
200    /* Curl settings */
                    
201    curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);
                    
202    curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);
                    
202    curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);
                    
203    curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);
                    
204    curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);
                    
204    curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);
                    
205    curl_setopt($ci, CURLOPT_HTTPHEADER, array('Expect:'));
                    
206    curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);
                    
                
Request.php https://bitbucket.org/haichau59/manga.git | PHP | 329 lines
                    
1<?php
                    
2
                    
5 * @author  Andrew Morton <drewish@katherinehouse.com>
                    
6 * @license http://opensource.org/licenses/lgpl-license.php
                    
7 *          GNU Lesser General Public License, Version 2.1
                    
13 */
                    
14require_once 'Phlickr/Api.php';
                    
15
                    
21 * <code>
                    
22 * <?php
                    
23 * include_once 'Phlickr/Api.php';
                    
133     *          to complete.
                    
134     * @uses    set_time_limit() to ensure that PHP's script timer is five
                    
135     *          seconds longer than the sum of $timeout and TIMEOUT_CONNECTION.
                    
141        // set up the request
                    
142        curl_setopt($ch, CURLOPT_URL, $url);
                    
143        // make sure we submit this as a post
                    
                
EpiFoursquare.php https://github.com/ecdiddy/foursquare-async.git | PHP | 252 lines
                    
1<?php
                    
2/*
                    
116    //print_r($url);exit;
                    
117    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
                    
118    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verifyCert);
                    
118    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verifyCert);
                    
119    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                    
120    curl_setopt($ch, CURLOPT_TIMEOUT, $this->requestTimeout);
                    
120    curl_setopt($ch, CURLOPT_TIMEOUT, $this->requestTimeout);
                    
121    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
                    
122    if($method === 'POST' && $params !== null)
                    
123    {
                    
124      curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
                    
125    }
                    
                
paypal.php https://github.com/psykomo/kutump-enhanced.git | PHP | 283 lines
                    
1<?php
                    
2/*
                    
102        $ch = curl_init();
                    
103        curl_setopt($ch, CURLOPT_URL, $API_Endpoint);
                    
104        curl_setopt($ch, CURLOPT_VERBOSE, 1);
                    
106        // turning off the server and peer verification(TrustManager Concept).
                    
107        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
                    
108        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
                    
109
                    
110        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
111        curl_setopt($ch, CURLOPT_POST, 1);
                    
116        // setting the nvpreq as POST FIELD to curl
                    
117        curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);
                    
118
                    
                
datafeedfunctions.php https://gitlab.com/Lidbary/foxyshop | PHP | 336 lines
                    
1<?php
                    
2//Exit if not called in proper context
                    
28			$ch = curl_init();
                    
29			curl_setopt($ch, CURLOPT_URL, $feedurl);
                    
30			if (isset($_POST["FoxyData"])) {
                    
30			if (isset($_POST["FoxyData"])) {
                    
31				curl_setopt($ch, CURLOPT_POSTFIELDS, array("FoxyData" => $_POST["FoxyData"]));
                    
32			} elseif (isset($_POST["FoxySubscriptionData"])) {
                    
32			} elseif (isset($_POST["FoxySubscriptionData"])) {
                    
33				curl_setopt($ch, CURLOPT_POSTFIELDS, array("FoxySubscriptionData" => $_POST["FoxySubscriptionData"]));
                    
34			}
                    
34			}
                    
35			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
36			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, FOXYSHOP_CURL_CONNECTTIMEOUT);
                    
36			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, FOXYSHOP_CURL_CONNECTTIMEOUT);
                    
37			curl_setopt($ch, CURLOPT_TIMEOUT, FOXYSHOP_CURL_TIMEOUT);
                    
38			if (defined('FOXYSHOP_CURL_SSL_VERIFYPEER')) curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FOXYSHOP_CURL_SSL_VERIFYPEER);
                    
                
curl.php https://bitbucket.org/ke2083/transfans.co.uk-website.git | PHP | 226 lines
                    
1<?php
                    
2/**
                    
11/**
                    
12 * A download adapter using the cURL PHP module
                    
13 */
                    
92
                    
93		@curl_setopt_array($ch, $options);
                    
94
                    
142
                    
143		curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
                    
144		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
                    
144		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
                    
145		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
                    
146		curl_setopt($ch, CURLOPT_SSLVERSION, 0);
                    
147
                    
148		curl_setopt($ch, CURLOPT_URL, $url);
                    
149		curl_setopt($ch, CURLOPT_NOBODY, true );
                    
                
configuration.php https://github.com/EdwinDW/DwRaidPlanner.git | PHP | 476 lines
                    
33		// set URL and other appropriate options
                    
34		curl_setopt($url, CURLOPT_URL, 'http://www.phpraider.com/updatecheck/1xx.txt');
                    
35		curl_setopt($url, CURLOPT_RETURNTRANSFER, 1);
                    
45	} else {
                    
46		$url = 'http://www.phpraider.com/updatecheck/1xx.txt';
                    
47		$remote = @file_get_contents($url);
                    
55	// check local
                    
56	include(RAIDER_BASE_PATH.'version.php');
                    
57	$local = explode('.', $version);
                    
75		if($update) {
                    
76			$update = sprintf($pLang['coUpdate'], 'http://www.phpraider.com/index.php?action=tpmod;dl=0',
                    
77			$remote[0], $remote[1], $remote[2], $local[0], $local[1], $local[2]);
                    
81	} else {
                    
82		$update = sprintf($pLang['coUpdateUndetermined'], 'http://www.phpraider.com/index.php?action=tpmod;dl=0');
                    
83	}
                    
                
lxportmonitor.php https://github.com/yourhty/hypervm.git | PHP | 526 lines
                    
1<?php 
                    
2
                    
243
                    
244	$ch = curl_init("http://$raddress:$port/htmllib/mibin/monitordata.php");
                    
245	curl_setopt($ch, CURLOPT_POST, true);
                    
245	curl_setopt($ch, CURLOPT_POST, true);
                    
246	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                    
247	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                    
247	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                    
248	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
                    
249	curl_setopt($ch, CURLOPT_POSTFIELDS, "frm_rmt=$var");
                    
462
                    
463	$val = @ file_get_contents("commands.php");
                    
464	if ($val === "2") {
                    
                
usps_international.php https://bitbucket.org/admin_malppy/malppy.git | PHP | 344 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
121        // set URL and other appropriate options
                    
122        curl_setopt($ch, CURLOPT_URL, $str);
                    
123        curl_setopt($ch, CURLOPT_HEADER, 0);
                    
123        curl_setopt($ch, CURLOPT_HEADER, 0);
                    
124        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
125
                    
                
checkout.php https://github.com/MyITCRM/myitcrm1.git | PHP | 387 lines
                    
1<?php
                    
2####################################################
                    
81 $ch = curl_init();
                    
82 curl_setopt($ch, CURLOPT_URL, INCITCRM);
                    
83 curl_setopt ($ch, CURLOPT_POST, 1);
                    
83 curl_setopt ($ch, CURLOPT_POST, 1);
                    
84 curl_setopt ($ch, CURLOPT_POSTFIELDS, "page=parts:processes&xml=".$cc."&escape=1");
                    
85 curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
                    
85 curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
                    
86 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
                    
87 $content = curl_exec ($ch); # This returns HTML
                    
361
                    
362	if(!xml2php("parts")) {
                    
363	$smarty->assign('error_msg',"Error in language file");
                    
                
KalturaClientBase.php https://github.com/richhl/kalturaCE.git | PHP | 606 lines
                    
1<?php
                    
2class KalturaClientBase 
                    
6	const KALTURA_SERVICE_FORMAT_XML  = 2;
                    
7	const KALTURA_SERVICE_FORMAT_PHP  = 3;
                    
8
                    
85		
                    
86		$url = $this->config->serviceUrl."/api_v3/index.php?service=";
                    
87		if ($this->isMultiRequest)
                    
122			
                    
123			if ($this->config->format == self::KALTURA_SERVICE_FORMAT_PHP)
                    
124			{
                    
165	/**
                    
166	 * Send http request by using curl (if available) or php stream_context
                    
167	 *
                    
189		$ch = curl_init();
                    
190		curl_setopt($ch, CURLOPT_URL, $url);
                    
191		curl_setopt($ch, CURLOPT_POST, 1);
                    
                
http.php https://gitlab.com/edgarze188/sunrise | PHP | 440 lines
                    
1<?php
                    
2
                    
300			case 'post':
                    
301				curl_setopt($ch, CURLOPT_POST, 1);
                    
302				break;
                    
304		if ($body = $request->getBody()) {
                    
305			curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
                    
306		}
                    
307		if ($auth = $request->getAuth()) {
                    
308			curl_setopt($ch, CURLOPT_USERPWD, $auth['user'] . ':' . $auth['password']);
                    
309		}
                    
313			}
                    
314			curl_setopt($ch, CURLOPT_COOKIE, $cookies);
                    
315		}
                    
321				}
                    
322				curl_setopt($ch, CURLOPT_HTTPHEADER, $_headers);
                    
323			}
                    
                
login_func.php https://gitlab.com/ColoradoSchoolOfMines/MinesPlaza-Defunct- | PHP | 172 lines
                    
1<?php
                    
2require ('../includes/common_func.php');
                    
2require ('../includes/common_func.php');
                    
3require_once('../includes/variables.php');
                    
4
                    
69    defineUser(-1);
                    
70    header('Location: login.php?msg=You have been logged out');
                    
71    exit();
                    
126    $ch = curl_init('https://www.google.com/recaptcha/api/siteverify?secret=6LfEZgITAAAAAB0LQG4S46ghPpLi5dThqB5ZOX5Y&response='.$cap.'&remoteip='.$_SERVER['REMOTE_ADDR']);
                    
127    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                    
128    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                    
                
gmail.php https://gitlab.com/ricardosanchez/prueba | PHP | 208 lines
                    
1<?php
                    
2/**
                    
79					$curl = curl_init('https://mail.google.com/mail/feed/atom');
                    
80					curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
                    
81					curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->params->get('verifypeer', 1));
                    
81					curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->params->get('verifypeer', 1));
                    
82					curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
                    
83					curl_setopt($curl, CURLOPT_USERPWD, $credentials['username'] . ':' . $credentials['password']);
                    
                
Curl.php https://github.com/JamieLomas/pyrocms.git | PHP | 356 lines
                    
1<?php defined('BASEPATH') OR exit('No direct script access allowed');
                    
2
                    
5 *
                    
6 * Work with remote servers via cURL much easier than using the native PHP bindings.
                    
7 *
                    
20	private $url;			   // URL of the session
                    
21	private $options = array(); // Populates curl_setopt_array
                    
22	private $headers = array(); // Populates extra HTTP headers
                    
33		{
                    
34			log_message('error', 'cURL Class - PHP was not built with cURL enabled. Rebuild PHP with --with-curl to use cURL.');
                    
35		}
                    
222		// Set all options provided
                    
223		curl_setopt_array($this->session, $this->options);
                    
224
                    
355
                    
356/* End of file Curl.php */
                    
                
index.php https://gitlab.com/fbi/twivatar | PHP | 225 lines
                    
1<?php
                    
2
                    
5	$ch = curl_init();
                    
6	curl_setopt($ch, CURLOPT_URL, $url);
                    
7	curl_setopt($ch, CURLOPT_HEADER, 0);
                    
7	curl_setopt($ch, CURLOPT_HEADER, 0);
                    
8	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
9	$output = curl_exec($ch);
                    
35    // TODO should we include a connection & read timeout here too?
                    
36    curl_setopt( $c, CURLOPT_RETURNTRANSFER, true );
                    
37    curl_setopt( $c, CURLOPT_CUSTOMREQUEST, 'HEAD' );
                    
37    curl_setopt( $c, CURLOPT_CUSTOMREQUEST, 'HEAD' );
                    
38    curl_setopt( $c, CURLOPT_HEADER, 1 );
                    
39    curl_setopt( $c, CURLOPT_NOBODY, true );
                    
39    curl_setopt( $c, CURLOPT_NOBODY, true );
                    
40    curl_setopt( $c, CURLOPT_URL, $image_url );
                    
41
                    
                
firstdata.php https://gitlab.com/reclamare/mao | PHP | 222 lines
                    
1<?php
                    
2class ModelPaymentFirstdata extends Model {
                    
80			$ch = curl_init();
                    
81			curl_setopt($ch, CURLOPT_URL, "https://epage.payandshop.com/epage-remote.cgi");
                    
82			curl_setopt($ch, CURLOPT_POST, 1);
                    
82			curl_setopt($ch, CURLOPT_POST, 1);
                    
83			curl_setopt($ch, CURLOPT_USERAGENT, "OpenCart " . VERSION);
                    
84			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
84			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
85			curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
                    
86			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                    
145			$ch = curl_init();
                    
146			curl_setopt($ch, CURLOPT_URL, "https://epage.payandshop.com/epage-remote.cgi");
                    
147			curl_setopt($ch, CURLOPT_POST, 1);
                    
147			curl_setopt($ch, CURLOPT_POST, 1);
                    
148			curl_setopt($ch, CURLOPT_USERAGENT, "OpenCart " . VERSION);
                    
149			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
                
cURL.php https://gitlab.com/x33n/ampache | PHP | 349 lines
                    
1<?php
                    
2/**
                    
25	 *
                    
26	 * @var array cURL information array, see {@see http://php.net/curl_getinfo}
                    
27	 */
                    
65
                    
66		curl_setopt($this->fp, CURLOPT_HEADER, false);
                    
67		curl_setopt($this->fp, CURLOPT_RETURNTRANSFER, 1);
                    
68		if (version_compare($this->version, '7.10.5', '>=')) {
                    
69			curl_setopt($this->fp, CURLOPT_ENCODING, '');
                    
70		}
                    
71		if (version_compare($this->version, '7.19.4', '>=')) {
                    
72			curl_setopt($this->fp, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
                    
73		}
                    
93			$this->stream_handle = fopen($options['filename'], 'wb');
                    
94			curl_setopt($this->fp, CURLOPT_FILE, $this->stream_handle);
                    
95		}
                    
                
pp_pro_uk.php https://bitbucket.org/allanxyh/uniquemall.git | PHP | 198 lines
                    
1<?php
                    
2class ControllerPaymentPPProUK extends Controller {
                    
128		
                    
129		curl_setopt($curl, CURLOPT_PORT, 443);
                    
130		curl_setopt($curl, CURLOPT_HEADER, 0);
                    
130		curl_setopt($curl, CURLOPT_HEADER, 0);
                    
131		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
                    
132		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
                    
132		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
                    
133		curl_setopt($curl, CURLOPT_FORBID_REUSE, 1);
                    
134		curl_setopt($curl, CURLOPT_FRESH_CONNECT, 1);
                    
134		curl_setopt($curl, CURLOPT_FRESH_CONNECT, 1);
                    
135		curl_setopt($curl, CURLOPT_POST, 1);
                    
136		curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
                    
136		curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
                    
137		curl_setopt($curl, CURLOPT_HTTPHEADER, array('X-VPS-REQUEST-ID: ' . md5($this->session->data['order_id'] . mt_rand())));
                    
138
                    
                
twilio.php https://github.com/murrion/BlackLog_Public.git | PHP | 537 lines
                    
1<?php
                    
2
                    
74/* TwilioRestClient throws TwilioException on error 
                    
75 * Useful to catch this exception separately from general PHP
                    
76 * exceptions, if you want
                    
139	$curl = curl_init($url);
                    
140	curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
                    
141
                    
141
                    
142	curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
                    
143	switch (strtoupper($method))
                    
145	    case "GET":
                    
146		curl_setopt($curl, CURLOPT_HTTPGET, TRUE);
                    
147		break;
                    
148	    case "POST":
                    
149		curl_setopt($curl, CURLOPT_POST, TRUE);
                    
150		curl_setopt($curl, CURLOPT_POSTFIELDS, $encoded);
                    
                
collateral-form-common.php https://gitlab.com/eluar/infocus | PHP | 252 lines
                    
93    <div class="small-1 medium-1 columns">
                    
94          <img class="lets-do-this" src="<?php echo $thumb ?>?<?php echo rand(199,9999);?>" data-big="<?php echo $src ?>?<?php echo rand(199,9999);?>" data-big2x="<?php echo $src ?>" width="40" height="40" />
                    
95    </div>
                    
102      <label id="item1<?php echo ($key + 3) ?>_label_0">
                    
103        <input type="number" placeholder="Qty" id="item1<?php echo ($key + 3) ?>_number_1" class="form-control" autocomplete="off" min="0" max="999999999" step="1" data-hint="" name="qty_<?php echo $name ?>">
                    
104      </label>
                    
107      <label id="item1<?php echo ($key + 3) ?>_label_0">
                    
108        <textarea id="item1<?php echo $key ?>_textarea_1" placeholder="Notes" class="form-control" maxlength="10000" placeholder="" data-hint="" name="notes_<?php echo $name ?>"></textarea>
                    
109      </label>
                    
162        <?php foreach ($costCenters as $costCenter): ?>
                    
163          <option value="<?php echo $costCenter;?>"><?php echo $costCenter;?></option>
                    
164        <?php endforeach; ?>
                    
198        <label <?php echo ($key == 'state')? 'id="state_label"' : '' ?>>
                    
199            <?php echo ($key !== 'province') ? '*' : ''?><?php echo $value ?>
                    
200            <input type="text" id="item102_text_1" class="no-margin-bottom" maxlength="254" placeholder="" autocomplete="off" data-hint="" name="<?php echo $key ?>" required="">
                    
                
comment.php https://gitlab.com/billyprice1/source | PHP | 289 lines
                    
1<?php
                    
2
                    
2
                    
3require "common.php";
                    
4
                    
6 // Based on
                    
7 // http://ankwebprogramming.wordpress.com/2011/10/08/translating-text-using-the-google-translate-api-and-php-json-and-curl/
                    
8 //  Kartik Rangholiya
                    
21            $ch = curl_init($ENDPOINT);
                    
22            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                    
23            curl_setopt($ch, CURLOPT_POSTFIELDS, $formData);
                    
23            curl_setopt($ch, CURLOPT_POSTFIELDS, $formData);
                    
24            curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-HTTP-Method-Override: GET'));
                    
25
                    
260<body>
                    
261<?php
                    
262
                    
                
index.php https://github.com/abilng/hideurip.git | PHP | 341 lines
                    
1<?php
                    
2error_reporting(0);
                    
102			foreach ($options as $option => $value) {
                    
103				@curl_setopt($this->ch, $option, $value);
                    
104			}
                    
336	if (!$url && !$_POST['__proxy_action']) {
                    
337		include 'home.php';
                    
338		exit;
                    
                
amazon.php https://gitlab.com/hazelnuts23/unitedfoodstuff | PHP | 502 lines
                    
1<?php
                    
2class Amazon {
                    
44
                    
45		curl_setopt_array($ch, $defaults);
                    
46
                    
77
                    
78		curl_setopt_array($ch, $defaults);
                    
79
                    
                
pjClasses.php https://gitlab.com/virtualrealms/d7civicrm | PHP | 390 lines
                    
1<?php
                    
2
                    
193      $ch = curl_init($url); 
                    
194      curl_setopt($ch, CURLOPT_HEADER, FALSE); 
                    
195      curl_setopt($ch, CURLOPT_POST, TRUE); 
                    
195      curl_setopt($ch, CURLOPT_POST, TRUE); 
                    
196      curl_setopt($ch, CURLOPT_POSTFIELDS, $request); 
                    
197      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
                    
197      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
                    
198      curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); 
                    
199      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
                    
                
int_youtrack.php https://github.com/viglesiasce/testlink.git | PHP | 454 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Created by PhpStorm.
                    
4 * User: Sergey Andreev (sergey.andreev@jetbrains.com])
                    
76     * This method perform login to YouTrack
                    
77     * with Username and Password from config file (youtrack.php.ini)
                    
78     *
                    
85            $this->session = curl_init();
                    
86            curl_setopt($this->session, CURLOPT_URL, $this->urlLogin);
                    
87            curl_setopt($this->session, CURLOPT_POST, true);
                    
87            curl_setopt($this->session, CURLOPT_POST, true);
                    
88            curl_setopt($this->session, CURLOPT_POSTFIELDS, $loginData);
                    
89            curl_setopt($this->session, CURLOPT_HEADER, false);
                    
89            curl_setopt($this->session, CURLOPT_HEADER, false);
                    
90            curl_setopt($this->session, CURLOPT_HEADERFUNCTION, array($this, 'readHeader'));
                    
91            curl_setopt($this->session, CURLOPT_RETURNTRANSFER, true);
                    
                
admin_moduleupdates.php https://github.com/tbleher/gallery3-contrib.git | PHP | 364 lines
                    
1<?php defined("SYSPATH") or die("No direct script access.");/**
                    
2 * Gallery - a web based photo album viewer and editor
                    
111			$cp = curl_init("http://www.gallerymodules.com/gallerymodules.ini");
                    
112			curl_setopt($cp, CURLOPT_FILE, $fp);
                    
113			$buffer = curl_exec($cp);
                    
117			$cp = curl_init("http://www.gallerymodules.com/core.ini");
                    
118			curl_setopt($cp, CURLOPT_FILE, $fp2);
                    
119			$buffer = curl_exec($cp);
                    
                
curl.php https://github.com/theshock/curl.git | PHP | 515 lines
                    
5 *
                    
6 * See the README for documentation/examples or http://php.net/curl for more information about the libcurl extension for PHP
                    
7 *
                    
84   * Sets the $cookie_file to "curl_cookie.txt" in the current directory
                    
85   * Also sets the $user_agent to $_SERVER['HTTP_USER_AGENT'] if it exists, 'Curl/PHP '.PHP_VERSION.' (http://github.com/shuber/curl)' otherwise
                    
86  **/
                    
88  {
                    
89    $this->user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'Curl/PHP '.PHP_VERSION.' (http://github.com/shuber/curl)';
                    
90  }
                    
404    }
                    
405    curl_setopt($this->request, CURLOPT_HTTPHEADER, $headers);
                    
406  }
                    
452      default:
                    
453        curl_setopt($this->request, CURLOPT_CUSTOMREQUEST, $method);
                    
454    }
                    
                
Postmark.php https://github.com/stevefrost/postmark-codeigniter.git | PHP | 603 lines
                    
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
398            {
                    
399                log_message('error', 'Postmark - PHP was not built with cURL enabled. Rebuild PHP with --with-curl to use cURL.');            
                    
400            }
                    
443		$ch = curl_init();
                    
444		curl_setopt($ch, CURLOPT_URL, 'http://api.postmarkapp.com/email');
                    
445		curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
                    
541			'gtar'	=>	'application/x-gtar',
                    
542			'php'	=>	'application/x-httpd-php',
                    
543			'php4'	=>	'application/x-httpd-php',
                    
543			'php4'	=>	'application/x-httpd-php',
                    
544			'php3'	=>	'application/x-httpd-php',
                    
545			'phtml'	=>	'application/x-httpd-php',
                    
545			'phtml'	=>	'application/x-httpd-php',
                    
546			'phps'	=>	'application/x-httpd-php-source',
                    
547			'js'	=>	'application/x-javascript',
                    
                
twitteroauth.php https://bitbucket.org/sharifbaba/snaptitoday-dev.git | PHP | 231 lines
                    
9 * Fire Eagle code - http://github.com/myelin/fireeagle-php-lib
                    
10 * twitterlibphp - http://github.com/jdp/twitterlibphp
                    
11 */
                    
13/* Load OAuth lib. You can find it at http://oauth.net */
                    
14require_once('OAuth.php');
                    
15
                    
186    /* Curl settings */
                    
187    curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);
                    
188    curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);
                    
188    curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);
                    
189    curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);
                    
190    curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);
                    
190    curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);
                    
191    curl_setopt($ci, CURLOPT_HTTPHEADER, array('Expect:'));
                    
192    curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);
                    
                
class.ib.avangard.php https://github.com/aig/ofx.git | PHP | 229 lines
                    
1<?php
                    
2/*
                    
84    $ch = curl_init();
                    
85    curl_setopt($ch, CURLOPT_URL, "https://www.avangard.ru/ibAvn/faces/pages/accounts/all_acc.jspx");
                    
86    curl_setopt($ch, CURLOPT_POST, 1);
                    
86    curl_setopt($ch, CURLOPT_POST, 1);
                    
87    curl_setopt($ch, CURLOPT_POSTFIELDS, "oracle.adf.faces.FORM=f&"
                    
88                                        ."oracle.adf.faces.STATE_TOKEN=$state_token&"
                    
145    $ch = curl_init();
                    
146    curl_setopt($ch, CURLOPT_URL, "https://www.avangard.ru/ibAvn/faces/pages/accounts/acc_stat.jspx");
                    
147    curl_setopt($ch, CURLOPT_POST, 1);
                    
147    curl_setopt($ch, CURLOPT_POST, 1);
                    
148    curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
                    
149    $result = $this->curlExec($ch);
                    
194    $ch = curl_init();
                    
195    curl_setopt($ch, CURLOPT_URL, "http://www.avangard.ru/rus/index.wbp");
                    
196    $result = $this->curlExec($ch);
                    
                
Data.php https://bitbucket.org/acidel/buykoala.git | PHP | 438 lines
                    
1<?php
                    
2 /**
                    
109		$ch = curl_init();
                    
110        curl_setopt($ch, CURLOPT_URL, sprintf('https://www.gomage.com/index.php/gomage_downloadable/key/check'));
                    
111        curl_setopt($ch, CURLOPT_POST, true);
                    
111        curl_setopt($ch, CURLOPT_POST, true);
                    
112        curl_setopt($ch, CURLOPT_POSTFIELDS, 'key='.urlencode($k).'&sku=lightcheckout&domains='.urlencode(implode(',', $this->getAllStoreDomains())));
                    
113        curl_setopt($ch, CURLOPT_TIMEOUT, 30);
                    
113        curl_setopt($ch, CURLOPT_TIMEOUT, 30);
                    
114        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                    
115        
                    
115        
                    
116        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
                    
117        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
                    
                
processHeartBeat_Ajax.php https://bitbucket.org/ferOnti/processmaker.git | PHP | 341 lines
                    
44    curl_setopt( $pCurl, CURLOPT_RETURNTRANSFER, true );
                    
45    curl_setopt( $pCurl, CURLOPT_HEADER, true );
                    
46    curl_setopt( $pCurl, CURLOPT_FOLLOWLOCATION, false );
                    
46    curl_setopt( $pCurl, CURLOPT_FOLLOWLOCATION, false );
                    
47    curl_setopt( $pCurl, CURLOPT_AUTOREFERER, true );
                    
48    //To avoid SSL error
                    
115    $params['webserver'] = getenv( 'SERVER_SOFTWARE' );
                    
116    $params['php'] = phpversion();
                    
117    $params['pmVersion'] = System::getVersion();
                    
248        curl_setopt( $ch, CURLOPT_URL, $heartBeatUrl );
                    
249        curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
                    
250        curl_setopt( $ch, CURLOPT_HEADER, true );
                    
308    //To avoid SSL error
                    
309    curl_setopt ( $ch, CURLOPT_SSL_VERIFYHOST, 0 );
                    
310    curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, 0 );
                    
                
ideal.class.php https://bitbucket.org/anneivycat/ebcookhouse.git | PHP | 466 lines
                    
1<?php
                    
2/*-----------------------------------------------------------------------
                    
266		
                    
267		curl_setopt($ch, CURLOPT_URL, $host . $path);
                    
268		curl_setopt($ch, CURLOPT_PORT, $port);
                    
268		curl_setopt($ch, CURLOPT_PORT, $port);
                    
269		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                    
270		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
                    
270		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
                    
271		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
272		curl_setopt($ch, CURLOPT_TIMEOUT, 45);
                    
272		curl_setopt($ch, CURLOPT_TIMEOUT, 45);
                    
273		curl_setopt($ch, CURLOPT_HEADER, false);
                    
274		curl_setopt($ch, CURLOPT_POST, true);
                    
274		curl_setopt($ch, CURLOPT_POST, true);
                    
275		curl_setopt($ch, CURLOPT_POSTFIELDS, $data);		
                    
276		
                    
                
AviaryFX.php https://github.com/aviaryapi/AviaryFxPhp.git | PHP | 344 lines
                    
1<?php
                    
2
                    
3	/**
                    
4	 * AviaryFX PHP SDK
                    
5	 * 
                    
15		const HARDWARE_VERSION = "1.0";
                    
16	 	const SOFTWARE_VERSION = "PHP";
                    
17		const APP_VERSION = "1.0";
                    
252			$curl = curl_init();
                    
253			curl_setopt($curl, CURLOPT_URL, $url);
                    
254			curl_setopt($curl, CURLOPT_HEADER, FALSE);
                    
254			curl_setopt($curl, CURLOPT_HEADER, FALSE);
                    
255			curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
                    
256			curl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE);
                    
268		/**
                    
269		 * Converts a SimpleXMLObject into an array. http://php.net/manual/en/book.simplexml.php
                    
270		 * 
                    
                
events_controller.php https://github.com/ajaykalia/groupalbum.git | PHP | 310 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * file: app/controllers/events_controller.php
                    
4 *
                    
50    function gallery($slug = null) {
                    
51		require $_SERVER['DOCUMENT_ROOT'].'files/config.php';
                    
52		
                    
141			$my_album = 'https://graph.facebook.com/'.$fb_album_id.'/photos?access_token='.$fb_session_token;
                    
142			curl_setopt($ch, CURLOPT_URL, $my_album); 
                    
143			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
                    
226		
                    
227		require $_SERVER['DOCUMENT_ROOT'].'files/config.php';
                    
228		
                    
257	function gallery_test($slug = null) {
                    
258		require $_SERVER['DOCUMENT_ROOT'].'files/config.php';
                    
259
                    
                
Curl.php https://github.com/Sa-ryong/Stadioom-php.git | PHP | 372 lines
                    
1<?php defined('BASEPATH') OR exit('No direct script access allowed');
                    
2
                    
5 *
                    
6 * Work with remote servers via cURL much easier than using the native PHP bindings.
                    
7 *
                    
20	private $url;			   // URL of the session
                    
21	private $options = array(); // Populates curl_setopt_array
                    
22	private $headers = array(); // Populates extra HTTP headers
                    
33		{
                    
34			log_message('error', 'cURL Class - PHP was not built with cURL enabled. Rebuild PHP with --with-curl to use cURL.');
                    
35		}
                    
231		// Set all options provided
                    
232		curl_setopt_array($this->session, $this->options);
                    
233
                    
370
                    
371/* End of file Curl.php */
                    
372/* Location: ./application/libraries/Curl.php */
                    
                
sagepay_server.php https://gitlab.com/shapcy/opencart | PHP | 266 lines
                    
1<?php
                    
2class ModelPaymentSagepayServer extends Model {
                    
231
                    
232		curl_setopt($curl, CURLOPT_PORT, 443);
                    
233		curl_setopt($curl, CURLOPT_HEADER, 0);
                    
233		curl_setopt($curl, CURLOPT_HEADER, 0);
                    
234		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
                    
235		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
                    
235		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
                    
236		curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
                    
237		curl_setopt($curl, CURLOPT_FORBID_REUSE, 1);
                    
237		curl_setopt($curl, CURLOPT_FORBID_REUSE, 1);
                    
238		curl_setopt($curl, CURLOPT_FRESH_CONNECT, 1);
                    
239		curl_setopt($curl, CURLOPT_POST, 1);
                    
239		curl_setopt($curl, CURLOPT_POST, 1);
                    
240		curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($payment_data));
                    
241
                    
                
Curl.php https://github.com/orchestra-io/sample-openx.git | PHP | 330 lines
                    
25require_once 'Zend/Http/Client/Adapter/Interface.php';
                    
26require_once 'Zend/Http/Client/Adapter/Exception.php';
                    
27
                    
29 * An adapter class for Zend_Http_Client based on the curl extension.
                    
30 * Curl requires libcurl. See for full requirements the PHP manual: http://php.net/curl
                    
31 *
                    
152            if($this->config['sslpassphrase'] !== null) {
                    
153                curl_setopt($this->curl, CURLOPT_SSLCERTPASSWD, $this->config['sslpassphrase']);
                    
154            }
                    
231        curl_setopt($this->curl, $curlMethod, $curlValue);
                    
232        curl_setopt($this->curl, $curlHttp, true);
                    
233
                    
244         * Make sure POSTFIELDS is set after $curlMethod is set:
                    
245         * @link http://de2.php.net/manual/en/function.curl-setopt.php#81161
                    
246         */
                    
                
fraudlabspro.php https://gitlab.com/hazelnuts23/unitedfoodstuff | PHP | 156 lines
                    
1<?php
                    
2class ModelFraudFraudLabsPro extends Model {
                    
59		$curl = curl_init();
                    
60		curl_setopt($curl, CURLOPT_URL, 'https://api.fraudlabspro.com/v1/order/screen?' . http_build_query($request));
                    
61		curl_setopt($curl, CURLOPT_HEADER, 0);
                    
61		curl_setopt($curl, CURLOPT_HEADER, 0);
                    
62		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
                    
63		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
                    
63		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
                    
64		curl_setopt($curl, CURLOPT_FORBID_REUSE, 1);
                    
65		curl_setopt($curl, CURLOPT_FRESH_CONNECT, 1);
                    
                
Single.php https://gitlab.com/flyhope/Hiblog | PHP | 276 lines
                    
1<?php
                    
2
                    
175        }
                    
176        curl_setopt_array($this->_ch, $this->_option);
                    
177        return $this->_ch;
                    
221        if($numargs) {
                    
222            curl_setopt($this->_ch, CURLOPT_HEADER, true);
                    
223        }
                    
                
XmlRpcClient.php https://bitbucket.org/valmy/openx.git | PHP | 195 lines
                    
1<?php
                    
2
                    
27
                    
28require_once MAX_PATH . '/lib/OA.php';
                    
29
                    
29
                    
30require_once 'XML/RPC.php';
                    
31
                    
147        $ch = curl_init("{$protocol}{$this->server}:{$port}{$this->path}");
                    
148        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                    
149        curl_setopt($ch, CURLOPT_HEADER,         true);
                    
149        curl_setopt($ch, CURLOPT_HEADER,         true);
                    
150        curl_setopt($ch, CURLOPT_CUSTOMREQUEST,  $this->headers."\r\n\r\n".$msg->payload);
                    
151        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verifyPeer);
                    
151        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verifyPeer);
                    
152        curl_setopt($ch, CURLOPT_CAINFO,         $this->caFile);
                    
153
                    
                
paypal_connect.php https://gitlab.com/ptisky/API_prestashop | PHP | 140 lines
                    
1<?php
                    
2/**
                    
9* It is also available through the world-wide-web at this URL:
                    
10* http://opensource.org/licenses/afl-3.0.php
                    
11* If you did not receive a copy of the license and are unable to
                    
22*  @copyright 2007-2015 PrestaShop SA
                    
23*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
                    
24*  International Registered Trademark & Property of PrestaShop SA
                    
74
                    
75			@curl_setopt($ch, CURLOPT_URL, 'https://'.$url);
                    
76
                    
77			if ($identify)
                    
78				@curl_setopt($ch, CURLOPT_USERPWD, Configuration::get('PAYPAL_LOGIN_CLIENT_ID').':'.Configuration::get('PAYPAL_LOGIN_SECRET'));
                    
79
                    
79
                    
80			@curl_setopt($ch, CURLOPT_POST, true);
                    
81			if ($body)
                    
                
applications.php https://github.com/terasa/import_repo.git | PHP | 276 lines
                    
1<?php
                    
2
                    
30    $ret = array();
                    
31    include_once PartuzaConfig::get('models_root') . "/oauth/oauth.php";
                    
32    $oauth = new oauthModel();
                    
45    global $db;
                    
46    include_once PartuzaConfig::get('models_root') . "/oauth/oauth.php";
                    
47    $oauth = new oauthModel();
                    
107	    $ch = curl_init();
                    
108	    curl_setopt($ch, CURLOPT_URL, PartuzaConfig::get('gadget_server') . '/gadgets/metadata?st=' . urlencode(base64_encode($securityToken->toSerialForm())));
                    
109	    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
                    
109	    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
                    
110	    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
111	    curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
                    
111	    curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
                    
112	    curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
                    
113	    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 4);
                    
                
ext_curl.php https://gitlab.com/iranjith4/hhvm | PHP | 440 lines
                    
90 *   CURLINFO_HEADER_OUT - The request string sent. For this to work, add
                    
91 *   the CURLINFO_HEADER_OUT option to the handle by calling curl_setopt()
                    
92 *      CURLINFO_REQUEST_SIZE - Total size of issued requests, currently
                    
110 *     "certinfo"     "request_header" (This is only set if the
                    
111 *   CURLINFO_HEADER_OUT is set by a previous call to curl_setopt())
                    
112 */
                    
263 * The async equivalent to
                    
264 * [`curl_multi_select`](http://php.net/manual/en/function.curl-multi-select.php)
                    
265 *
                    
267 * Once there is activity, you process the result with
                    
268 * [`curl_multi_exec`](http://php.net/manual/en/function.curl-multi-exec.php)
                    
269 *
                    
270 * @param $mh - A cURL multi handle returned from
                    
271 *              [`curl_multi_init`](http://php.net/manual/en/function.curl-multi-init.php).
                    
272 * @param $timeout - The time to wait for a response indicating some activity.
                    
                
download.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 440 lines
                    
1<?php
                    
2/**
                    
143	/**
                    
144	 * Does the server support PHP's cURL extension?
                    
145	 *
                    
179
                    
180		if ( !@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1) && !$nofollow )
                    
181		{
                    
184			// parse any redirections present in there.
                    
185			curl_setopt($ch, CURLOPT_AUTOREFERER, true);
                    
186			curl_setopt($ch, CURLOPT_FAILONERROR, true);
                    
186			curl_setopt($ch, CURLOPT_FAILONERROR, true);
                    
187			curl_setopt($ch, CURLOPT_HEADER, true);
                    
188			curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                    
188			curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                    
189			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                    
190			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
                    
                
Curl.php https://gitlab.com/crazybutterfly815/magento2 | PHP | 294 lines
                    
1<?php
                    
2/**
                    
57     * @return \Magento\Framework\HTTP\Adapter\Curl
                    
58     * @SuppressWarnings(PHPMD.NPathComplexity)
                    
59     * @SuppressWarnings(PHPMD.UnusedLocalVariable)
                    
64        foreach ($this->_options as $option => $value) {
                    
65            curl_setopt($this->_getResource(), $option, $value);
                    
66        }
                    
72        $verifyPeer = isset($this->_config['verifypeer']) ? $this->_config['verifypeer'] : true;
                    
73        curl_setopt($this->_getResource(), CURLOPT_SSL_VERIFYPEER, $verifyPeer);
                    
74
                    
75        $verifyHost = isset($this->_config['verifyhost']) ? $this->_config['verifyhost'] : 2;
                    
76        curl_setopt($this->_getResource(), CURLOPT_SSL_VERIFYHOST, $verifyHost);
                    
77
                    
79            if (array_key_exists($param, $this->_allowedParams)) {
                    
80                curl_setopt($this->_getResource(), $this->_allowedParams[$param], $this->_config[$param]);
                    
81            }
                    
                
sourcecoast.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 305 lines
                    
1<?php
                    
2/**
                    
32
                    
33        include_once(dirname(__FILE__) . '/template.php');
                    
34    }
                    
38        if (!function_exists('curl_init')) {
                    
39          throw new Exception('SourceCoast extension check needs the CURL PHP extension.');
                    
40        }
                    
45        $ch = curl_init($site . $xml);
                    
46        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                    
47        curl_setopt($ch, CURLOPT_HEADER, 0);
                    
295        return SourceCoastExtensionHelper::checkExtension(
                    
296                JPATH_ROOT . "/plugins/" . $pluginParts[0] . '/' . $pluginParts[1] . '/' . $pluginParts[1] . ".php",
                    
297                "SELECT extension_id " .
                    
                
ext_url.cpp https://gitlab.com/Blueprint-Marketing/hhvm | C++ | 375 lines
                    
313
                    
314const StaticString s_PHP_URL_SCHEME("PHP_URL_SCHEME");
                    
315const StaticString s_PHP_URL_HOST("PHP_URL_HOST");
                    
347    Native::registerConstant<KindOfInt64>(
                    
348      s_PHP_URL_QUERY.get(), k_PHP_URL_QUERY
                    
349    );
                    
350    Native::registerConstant<KindOfInt64>(
                    
351      s_PHP_URL_FRAGMENT.get(), k_PHP_URL_FRAGMENT
                    
352    );
                    
353    Native::registerConstant<KindOfInt64>(
                    
354      s_PHP_QUERY_RFC1738.get(), k_PHP_QUERY_RFC1738
                    
355    );
                    
356    Native::registerConstant<KindOfInt64>(
                    
357      s_PHP_QUERY_RFC3986.get(), k_PHP_QUERY_RFC3986
                    
358    );
                    
                
tracking.php https://bitbucket.org/bfarleigh/transdirect.git | PHP | 379 lines
                    
1<?php
                    
2set_time_limit(0);
                    
4
                    
5require_once('simple_html_dom.php');
                    
6
                    
9	$ch = curl_init($url);
                    
10	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
11	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                    
11	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                    
12	curl_setopt($ch, CURLOPT_HEADER, 1);
                    
13	curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
                    
143<?
                    
144require_once('../calc/config.inc.php');
                    
145//echo '<pre>';print_r($_GET);exit;
                    
205						</tr>
                    
206						<?php
                    
207						foreach($html->find('td[colspan=2] > table[width=100%]',3)->find('tr') as $tr){
                    
                
modrestcurlclient.class.php https://github.com/gbds/revolution.git | PHP | 251 lines
                    
1<?php
                    
2/**
                    
5 */
                    
6require_once dirname(__FILE__) . '/modrestclient.class.php';
                    
7/**
                    
54            case 'POST':
                    
55                curl_setopt($ch,CURLOPT_POST,1);
                    
56                $contentType = $this->modx->getOption('contentType',$options,'xml');
                    
59                        $json = $this->modx->toJSON($params);
                    
60                        curl_setopt($ch,CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
                    
61                        curl_setopt($ch,CURLOPT_POSTFIELDS,$json);
                    
63                    case 'xml':
                    
64                        curl_setopt($ch,CURLOPT_HTTPHEADER, array('Content-Type: application/xml'));
                    
65                        $xml = ArrayToXML::toXML($params,!empty($options['rootNode']) ? $options['rootNode'] : 'request');
                    
65                        $xml = ArrayToXML::toXML($params,!empty($options['rootNode']) ? $options['rootNode'] : 'request');
                    
66                        curl_setopt($ch,CURLOPT_POSTFIELDS,$xml);
                    
67                        break;
                    
                
modrestcurlclient.class.php https://github.com/francisreboucas/revolution.git | PHP | 279 lines
                    
1<?php
                    
2/**
                    
5 */
                    
6require_once dirname(__FILE__) . '/modrestclient.class.php';
                    
7/**
                    
70            case 'POST':
                    
71                curl_setopt($ch,CURLOPT_POST,1);
                    
72                $contentType = $this->modx->getOption('contentType',$options,'xml');
                    
75                        $json = $this->modx->toJSON($params);
                    
76                        curl_setopt($ch,CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
                    
77                        curl_setopt($ch,CURLOPT_POSTFIELDS,$json);
                    
79                    case 'xml':
                    
80                        curl_setopt($ch,CURLOPT_HTTPHEADER, array('Content-Type: application/xml'));
                    
81                        $xml = modRestArrayToXML::toXML($params,!empty($options['rootNode']) ? $options['rootNode'] : 'request');
                    
81                        $xml = modRestArrayToXML::toXML($params,!empty($options['rootNode']) ? $options['rootNode'] : 'request');
                    
82                        curl_setopt($ch,CURLOPT_POSTFIELDS,$xml);
                    
83                        break;
                    
                
OOCurl.php https://github.com/jessedc/oocurl.git | PHP | 582 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * Provides an Object-Oriented interface to the PHP cURL
                    
6 * functions and clean up some of the curl_setopt() calls.
                    
11 * @copyright Copyright (c) 2008, James Socol
                    
12 * @license http://www.opensource.org/licenses/mit-license.php
                    
13 */
                    
38 *
                    
39 * Provides an Object-Oriented interface to the PHP cURL
                    
40 * functions and a clean way to replace curl_setopt().
                    
43 * constants, which are cumbersome and ugly at best, this object
                    
44 * implements curl_setopt() through overloaded getter and setter
                    
45 * methods.
                    
50 * <code>
                    
51 * curl_setopt($ch, CURLOPT_HEADER, true);
                    
52 * </code>
                    
                
HproseHttpClient.php https://gitlab.com/fangfangchen/xianpipa | PHP | 314 lines
                    
1<?php
                    
2/**********************************************************\
                    
13 *                                                        *
                    
14 * HproseHttpClient.php                                   *
                    
15 *                                                        *
                    
15 *                                                        *
                    
16 * hprose http client library for php5.                   *
                    
17 *                                                        *
                    
22
                    
23require_once('HproseCommon.php');
                    
24require_once('HproseIO.php');
                    
24require_once('HproseIO.php');
                    
25require_once('HproseClient.php');
                    
26
                    
213        protected function send($request) {
                    
214            curl_setopt($this->curl, CURLOPT_URL, $this->url);
                    
215            curl_setopt($this->curl, CURLOPT_HEADER, TRUE);
                    
                
Stripe.php https://gitlab.com/scribe-inc/ScribeStripeBundle | PHP | 320 lines
                    
1<?php
                    
2/*
                    
237            'bindings_version' => self::BUNDLE_VERSION,
                    
238            'lang'             => 'php',
                    
239            'lang_version'     => PHP_VERSION,
                    
240            'publisher'        => 'scribe',
                    
241            'uname'            => php_uname(),
                    
242        ];
                    
268        if (!extension_loaded('curl')) {
                    
269            throw new StripeException('Stripe requires the Curl PHP module is loaded');
                    
270        }
                    
276        if ($type === self::API_REQUEST_GET) {
                    
277            curl_setopt($handle, CURLOPT_HTTPGET, 1);
                    
278            if (count($data) > 0) {
                    
281        } else if ($type === self::API_REQUEST_POST) {
                    
282            curl_setopt($handle, CURLOPT_POST, 1);
                    
283            curl_setopt($handle, CURLOPT_POSTFIELDS, $this->urlEncodeData($data));
                    
                
curl.php https://gitlab.com/afdallah/myongkir | PHP | 356 lines
                    
1<?php
                    
2/**
                    
25    private $url;               // URL of the session
                    
26    private $options = array(); // Populates curl_setopt_array
                    
27    private $headers = array(); // Populates extra HTTP headers
                    
226        // Set all options provided
                    
227        curl_setopt_array($this->session, $this->options);
                    
228
                    
                
ezsoapclient.php https://github.com/eeggenberger/ezpublish.git | PHP | 270 lines
                    
1<?php
                    
2/**
                    
11/*!
                    
12  \class eZSOAPClient ezsoapclient.php
                    
13  \ingroup eZSOAP
                    
166                {
                    
167                    curl_setopt( $ch, CURLOPT_TIMEOUT, $this->TimeOut );
                    
168                }
                    
184
                    
185                    curl_setopt( $ch, CURLOPT_URL, $URL );
                    
186                    curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
                    
186                    curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
                    
187                    curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 1 );
                    
188                    curl_setopt( $ch, CURLOPT_HEADER, 1 );
                    
188                    curl_setopt( $ch, CURLOPT_HEADER, 1 );
                    
189                    curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
                    
190                    curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, $HTTPCall );  // Don't use CURLOPT_CUSTOMREQUEST without making sure your server supports the custom request method first.
                    
                
functions.php https://gitlab.com/i-have-a-green/digitemis-v3 | PHP | 282 lines
                    
5//include_once("inc/settings-gutenberg.php");
                    
6include_once("inc/widget.php");
                    
7include_once("inc/function-jobs.php");
                    
7include_once("inc/function-jobs.php");
                    
8include_once("inc/clean.php");
                    
9include_once("inc/no-comment.php");
                    
11include_once("inc/custom-post-type.php");
                    
12include_once("inc/breadcrumb.php");
                    
13include_once("inc/menu.php");
                    
135  $timeout = 5;
                    
136  curl_setopt($ch,CURLOPT_URL,'http://tinyurl.com/api-create.php?url='.$url);
                    
137  curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
                    
263    'services/([^/]+)',
                    
264    'index.php?post_type=service&name=$matches[1]',
                    
265    'top'
                    
                
functions.php git://github.com/sjparkinson/isitup.git | PHP | 640 lines
                    
1<?php
                    
2/**
                    
116        // set URL and other appropriate options
                    
117        curl_setopt($ch, CURLOPT_URL, "http://" . $domain);
                    
118        curl_setopt($ch, CURLOPT_PORT, $port);
                    
118        curl_setopt($ch, CURLOPT_PORT, $port);
                    
119        curl_setopt($ch, CURLOPT_USERAGENT, "Is is up? (+https://isitup.org)");
                    
120        curl_setopt($ch, CURLOPT_TIMEOUT, $setting["timeout"]);
                    
122        // This changes the request method to HEAD
                    
123        curl_setopt($ch, CURLOPT_NOBODY, true);
                    
124
                    
                
auspost.php https://github.com/MariusRugan/OpenCart-Secured.git | PHP | 144 lines
                    
1<?php
                    
2class ModelShippingAuspost extends Model {
                    
34					
                    
35					curl_setopt($ch, CURLOPT_URL, 'http://drc.edeliver.com.au/ratecalc.asp?pickup_postcode=' . $this->config->get('auspost_postcode') . '&destination_postcode=' . $address['postcode'] . '&height=70&width=70&length=70&country=AU&service_type=standard&quantity=1&weight=' . $weight);
                    
36					curl_setopt($ch, CURLOPT_HEADER, 0);
                    
36					curl_setopt($ch, CURLOPT_HEADER, 0);
                    
37					curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
38			
                    
84					
                    
85					curl_setopt($ch, CURLOPT_URL, 'http://drc.edeliver.com.au/ratecalc.asp?pickup_postcode=' . $this->config->get('auspost_postcode') . '&destination_postcode=' . $address['postcode'] . '&height=70&width=70&length=70&country=AU&service_type=express&quantity=1&weight=' . $weight);
                    
86					curl_setopt($ch, CURLOPT_HEADER, 0);
                    
86					curl_setopt($ch, CURLOPT_HEADER, 0);
                    
87					curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
88			
                    
                
pp_standard.php https://github.com/MariusRugan/OpenCart-Secured.git | PHP | 146 lines
                    
1<?php
                    
2class ControllerPaymentPPStandard extends Controller {
                    
27		$this->data['country'] = $order_info['payment_iso_code_2'];
                    
28		$this->data['notify_url'] = HTTP_SERVER . 'index.php?route=payment/pp_standard/callback';
                    
29		$this->data['email'] = $order_info['email'];
                    
38		
                    
39		$this->data['return'] = HTTPS_SERVER . 'index.php?route=checkout/success';
                    
40		
                    
41		if ($this->request->get['route'] != 'checkout/guest_step_3') {
                    
42			$this->data['cancel_return'] = HTTPS_SERVER . 'index.php?route=checkout/payment';
                    
43		} else {
                    
43		} else {
                    
44			$this->data['cancel_return'] = HTTPS_SERVER . 'index.php?route=checkout/guest_step_2';
                    
45		}
                    
53		if ($this->request->get['route'] != 'checkout/guest_step_3') {
                    
54			$this->data['back'] = HTTPS_SERVER . 'index.php?route=checkout/payment';
                    
55		} else {
                    
                
test_ext_curl.cpp https://github.com/kevlund/hiphop-php.git | C++ | 398 lines
                    
2   +----------------------------------------------------------------------+
                    
3   | HipHop for PHP                                                       |
                    
4   +----------------------------------------------------------------------+
                    
6   +----------------------------------------------------------------------+
                    
7   | This source file is subject to version 3.01 of the PHP license,      |
                    
8   | that is bundled with this package in the file LICENSE, and is        |
                    
9   | available through the world-wide-web at the following url:           |
                    
10   | http://www.php.net/license/3_01.txt                                  |
                    
11   | If you did not receive a copy of the PHP license and are unable to   |
                    
12   | obtain it through the world-wide-web, please send a note to          |
                    
13   | license@php.net so we can mail you a copy immediately.               |
                    
14   +----------------------------------------------------------------------+
                    
79  RUN_TEST(test_curl_version);
                    
80  RUN_TEST(test_curl_setopt);
                    
81  RUN_TEST(test_curl_setopt_array);
                    
                
pp_pro_iframe.php https://gitlab.com/hazelnuts23/unitedfoodstuff | PHP | 308 lines
                    
1<?php
                    
2class ControllerPaymentPPProIframe extends Controller {
                    
100
                    
101			curl_setopt($curl, CURLOPT_POST, true);
                    
102			curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
                    
102			curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
                    
103			curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
                    
104			curl_setopt($curl, CURLOPT_HEADER, false);
                    
104			curl_setopt($curl, CURLOPT_HEADER, false);
                    
105			curl_setopt($curl, CURLOPT_TIMEOUT, 30);
                    
106			curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
                    
278
                    
279		curl_setopt($curl, CURLOPT_PORT, 443);
                    
280		curl_setopt($curl, CURLOPT_HEADER, 0);
                    
280		curl_setopt($curl, CURLOPT_HEADER, 0);
                    
281		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
                    
282		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
                    
                
realex.php https://gitlab.com/reclamare/mao | PHP | 265 lines
                    
1<?php
                    
2class ModelPaymentRealex extends Model {
                    
63			$ch = curl_init();
                    
64			curl_setopt($ch, CURLOPT_URL, "https://epage.payandshop.com/epage-remote.cgi");
                    
65			curl_setopt($ch, CURLOPT_POST, 1);
                    
65			curl_setopt($ch, CURLOPT_POST, 1);
                    
66			curl_setopt($ch, CURLOPT_USERAGENT, "OpenCart " . VERSION);
                    
67			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
67			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
68			curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
                    
69			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                    
128			$ch = curl_init();
                    
129			curl_setopt($ch, CURLOPT_URL, "https://epage.payandshop.com/epage-remote.cgi");
                    
130			curl_setopt($ch, CURLOPT_POST, 1);
                    
130			curl_setopt($ch, CURLOPT_POST, 1);
                    
131			curl_setopt($ch, CURLOPT_USERAGENT, "OpenCart " . VERSION);
                    
132			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
                
GoogleSpell.php https://bitbucket.org/hudsonite/concrete5.git | PHP | 161 lines
                    
1<?php
                    
2/**
                    
79			$ch = curl_init();
                    
80			curl_setopt($ch, CURLOPT_URL,$url);
                    
81			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
81			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    
82			curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);
                    
83			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
                    
                
maxmind.php https://gitlab.com/dadangnh/sb1-bon | PHP | 380 lines
                    
1<?php
                    
2class ModelExtensionFraudMaxMind extends Model {
                    
45
                    
46			curl_setopt($curl, CURLOPT_HEADER, 0);
                    
47			curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
                    
47			curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
                    
48			curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
                    
49			curl_setopt($curl, CURLOPT_FORBID_REUSE, 1);
                    
49			curl_setopt($curl, CURLOPT_FORBID_REUSE, 1);
                    
50			curl_setopt($curl, CURLOPT_FRESH_CONNECT, 1);
                    
51			curl_setopt($curl, CURLOPT_POST, 1);
                    
51			curl_setopt($curl, CURLOPT_POST, 1);
                    
52			curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
                    
53
                    
                
OAuth2Client.php https://gitlab.com/code26/selah | PHP | 229 lines
                    
1<?php
                    
2/**
                    
34	public $curl_header              = array();
                    
35	public $curl_useragent           = "OAuth/2 Simple PHP Client v0.1; HybridAuth http://hybridauth.sourceforge.net/";
                    
36	public $curl_authenticate_method = "POST";
                    
173
                    
174		curl_setopt($ch, CURLOPT_URL            , $url );
                    
175		curl_setopt($ch, CURLOPT_RETURNTRANSFER , 1 );
                    
175		curl_setopt($ch, CURLOPT_RETURNTRANSFER , 1 );
                    
176		curl_setopt($ch, CURLOPT_TIMEOUT        , $this->curl_time_out );
                    
177		curl_setopt($ch, CURLOPT_USERAGENT      , $this->curl_useragent );
                    
177		curl_setopt($ch, CURLOPT_USERAGENT      , $this->curl_useragent );
                    
178		curl_setopt($ch, CURLOPT_CONNECTTIMEOUT , $this->curl_connect_time_out );
                    
179		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER , $this->curl_ssl_verifypeer );
                    
179		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER , $this->curl_ssl_verifypeer );
                    
180		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST , $this->curl_ssl_verifyhost );
                    
181		curl_setopt($ch, CURLOPT_HTTPHEADER     , $this->curl_header );
                    
                
functions.inc.php https://github.com/tcmiller/Header-Footer-Wizard.git | PHP | 483 lines
                    
1<?php
                    
2
                    
2
                    
3require_once('tmplgen-db.inc.php');
                    
4
                    
14	$ch = curl_init();
                    
15	curl_setopt($ch, CURLOPT_URL, 'http://depts.washington.edu/uweb/inc/'.$url);
                    
16	curl_setopt($ch, CURLOPT_HEADER, false);
                    
19	if ($type == 'plain') {
                    
20		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                    
21		$curl = curl_exec($ch);
                    
76		  		// run code
                    
77				$.post(\'generate.php\',{ owner: $(\'#owner\').val(),
                    
78		                                  processType: \'initA\' },function(data) {
                    
                
functions.php https://gitlab.com/billyprice1/bdApi | PHP | 287 lines
                    
1<?php
                    
2
                    
8
                    
9    $path = dirname(__FILE__) . '/config.php';
                    
10    if (file_exists($path)) {
                    
44{
                    
45    require(dirname(__FILE__) . '/setup.php');
                    
46    exit;
                    
50{
                    
51    // idea from http://stackoverflow.com/questions/6768793/get-the-full-url-in-php
                    
52    $ssl = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? true : false;
                    
80    $url = sprintf(
                    
81        '%s/index.php?assets/sdk.js',
                    
82        $apiRoot
                    
99        $url = sprintf(
                    
100            '%s/index.php?%s&oauth_token=%s',
                    
101            $apiRoot,
                    
                
facebook.php https://github.com/SMLabs/codeigniter-facebook.git | PHP | 505 lines
                    
1<?php
                    
2
                    
134			$this->_ch = curl_init($url);
                    
135			curl_setopt($this->_ch, CURLOPT_RETURNTRANSFER, TRUE);
                    
136		}
                    
170			$this->_initConnection($url, $params);
                    
171			curl_setopt($this->_ch, CURLOPT_POST, 1);
                    
172			curl_setopt($this->_ch, CURLOPT_POSTFIELDS, $post);
                    
                
Service.php https://github.com/boxbilling/extensions.git | PHP | 222 lines
                    
1<?php
                    
2
                    
159{
                    
160    protected $_api_url     = 'http://apigps.antanas.eu/api.php';
                    
161
                    
188        $ch = curl_init();
                    
189        curl_setopt($ch, CURLOPT_URL,               $this->_api_url);
                    
190        curl_setopt($ch, CURLOPT_POST,              true);
                    
190        curl_setopt($ch, CURLOPT_POST,              true);
                    
191        curl_setopt($ch, CURLOPT_POSTFIELDS,        http_build_query($data));
                    
192        curl_setopt($ch, CURLOPT_RETURNTRANSFER,    true);
                    
                
twitter_auth.php https://gitlab.com/sokeara/ayana-journeys | PHP | 253 lines
                    
1<?php
                    
2
                    
3/* Load OAuth lib. You can find it at http://oauth.net */
                    
4require_once('oauth.php');
                    
5
                    
206           /* Curl settings */
                    
207           curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);
                    
208           curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);
                    
208           curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);
                    
209           curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);
                    
210           curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);
                    
210           curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);
                    
211           curl_setopt($ci, CURLOPT_HTTPHEADER, array('Expect:'));
                    
212           curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);
                    
212           curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);
                    
213           curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));
                    
214           curl_setopt($ci, CURLOPT_HEADER, FALSE);
                    
                
AdminController.php https://gitlab.com/sawmainek/528Express-Server | PHP | 423 lines
                    
1<?php
                    
2
                    
252            $curl = curl_init("http://shopyface.com/api/v1/sms");
                    
253            curl_setopt( $curl, CURLOPT_POST , true);
                    
254
                    
254
                    
255            curl_setopt( $curl, CURLOPT_POSTFIELDS, array(
                    
256                'mobiles'      => $user->phone,
                    
258            ));
                    
259	    curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1);
                    
260            $auth = curl_exec( $curl );
                    
337            $curl = curl_init("http://shopyface.com/api/v1/sms");
                    
338            curl_setopt( $curl, CURLOPT_POST , true);
                    
339            curl_setopt( $curl, CURLOPT_POSTFIELDS, array(
                    
342            ));
                    
343            curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1);
                    
344            $auth = curl_exec( $curl );
                    
                
 

Source

Language