100+ results for 'php parse_url'
Not the results you expected?
Cookie.php (https://bitbucket.org/larryg/powerhut.git) PHP · 324 lines
PgCache_Plugin.php (https://gitlab.com/karlen/ayo_wp) PHP · 300 lines
1 <?php
2 namespace W3TC;
164 $home_url = get_home_url();
165 $parsed_url = @parse_url( $home_url );
167 if ( isset( $parsed_url['host'] ) &&
240 'title' => __( 'Page Cache: All', 'w3-total-cache' ),
241 'href' => wp_nonce_url( network_admin_url(
242 'admin.php?page=w3tc_dashboard&w3tc_flush_pgcache' ),
243 'w3tc' )
244 );
250 'title' => __( 'Page Cache: Current Page', 'w3-total-cache' ),
251 'href' => wp_nonce_url( network_admin_url(
252 'admin.php?page=w3tc_dashboard&w3tc_flush_post&post_id=' .
253 Util_Environment::detect_post_id() ), 'w3tc' )
254 );
http.php (https://github.com/muskmelon/Greemo.git) PHP · 224 lines
s2member-files.php (https://gitlab.com/Gashler/dp) PHP · 108 lines
1 <?php
2 if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3 exit("Do not access this file directly.");
5 global /* A Multisite ``$base`` configuration? */ $base;
6 $ws_plugin__s2member_temp_s_base = (!empty ($base)) ? $base : c_ws_plugin__s2member_utils_urls::parse_url (network_home_url ("/"), PHP_URL_PATH);
7 // This works on Multisite installs too. The function ``network_home_url ()`` defaults to ``home_url ()`` on standard WordPress® installs.
8 // Do NOT use ``site`` URL. Must use the `home` URL here, because that's what WordPress® uses in its own `mod_rewrite` implementation.
19 # Enable rewrite and configure base.
20 RewriteEngine On
21 RewriteBase <?php echo $ws_plugin__s2member_temp_s_base . "\n"; ?>
23 # Initialize all environment variables we're using below.
27 # Handle virtual directories, common on multisite networks.
28 RewriteCond %{ENV:s2member_file_download_wp_vdir_check} !^complete$
29 RewriteCond %{THE_REQUEST} ^(?:GET|HEAD)(?:[\ ]+)(?:<?php echo preg_quote ($ws_plugin__s2member_temp_s_base, " "); ?>)([_0-9a-zA-Z\-]+/)(?:wp-content/)
30 RewriteRule ^(.*)$ - [E=s2member_file_download_wp_vdir:,E=s2member_file_download_wp_vdir:%1,E=s2member_file_download_wp_vdir_check:complete]
elements_edit.php (https://gitlab.com/x33n/platform) PHP · 169 lines
1 <?php
2 if (!$request_parameters) {
3 AdminHelper::controllerRedirect('/');
81 foreach ($locations_array as $key => $location) {
82 // cycle through all locations, push to temp array and combine if necessary
83 $parsed = parse_url($location['access_location']);
84 if (isset($tmp_locations_array[$parsed['host']])) {
85 $tmp_locations_array[$parsed['host']] = $tmp_locations_array[$parsed['host']] + $location['total'];
AsyncStream.php (https://github.com/Erika31/phpdaemon.git) PHP · 524 lines
plugin.php (https://bitbucket.org/bsnowman/classyblog.git) PHP · 413 lines
1 <?php
3 /**
280 $url = WP_PLUGIN_URL . '/' . dirname(W3TC_FILE) . '/pub/apc.php';
281 $path = parse_url($url, PHP_URL_PATH);
282 $post = array(
283 'method' => 'POST',
314 $url = WP_PLUGIN_URL . '/' . dirname(W3TC_FILE) . '/pub/apc.php';
315 $path = parse_url($url, PHP_URL_PATH);
317 $post = array(
function.fetch.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 220 lines
1 <?php
2 /**
3 * Smarty plugin
13 * Name: fetch<br>
14 * Purpose: fetch file, web or ftp data and display results
15 * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch}
16 * (Smarty online manual)
17 * @param array
30 if ($smarty->security && !preg_match('!^(http|ftp)://!i', $params['file'])) {
31 $_params = array('resource_type' => 'file', 'resource_name' => $params['file']);
32 require_once(SMARTY_CORE_DIR . 'core.is_secure.php');
33 if(!smarty_core_is_secure($_params, $smarty)) {
34 $smarty->_trigger_fatal_error('[plugin] (secure mode) fetch \'' . $params['file'] . '\' is not allowed');
50 if(preg_match('!^http://!i',$params['file'])) {
51 // http fetch
52 if($uri_parts = parse_url($params['file'])) {
53 // set defaults
54 $host = $server_name = $uri_parts['host'];
com_kb.php (https://bitbucket.org/dreamriks/gift.git) PHP · 156 lines
1 <?php
2 /**
3 * @author Guillermo Vargas, http://joomla.vargas.co.cr
4 * @email guille@vargas.co.cr
5 * @version $Id: com_kb.php 52 2009-10-24 22:35:11Z guilleva $
6 * @package Xmap
7 * @license GNU/GPL
18 }
20 $link_query = parse_url( $parent->link );
21 parse_str( html_entity_decode($link_query['query']), $link_vars );
22 $catid = JArrayHelper::getValue($link_vars,'category',0);
81 $node->priority = $params['feed_priority'];
82 $node->changefreq = $params['feed_changefreq'];
83 $node->link = 'index.php?option=com_kb&task=rss&format=RSS2.0&no_html=1&pop=1&type=latestlistings';
84 $node->expandible = false;
85 $xmap->printNode($node);
Cookie.php (https://github.com/pulzarraider/symfony.git) PHP · 320 lines
unsplash-dl.php (https://bitbucket.org/mcdado/unsplashfetch.git) PHP · 171 lines
1 #!/usr/local/bin/php
3 <?php
50 if ($this->logging === true) {
51 if ($this->log_file == null) {
52 echo $message . PHP_EOL;
53 } else {
54 fwrite($this->log_handle, '[' . date('Y-m-d H:i:s') . ']' . ' ' . $message . PHP_EOL);
130 $this->downloads[$k] = $link;
132 $parsed_link = parse_url($link);
133 if ($parsed_link == false) {
134 unset($this->downloads[$k]);
class-wc-orders-tracking.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 178 lines
21 // WC_Meta_Box_Order_Actions::save() hooks in at priority 50.
22 add_action( 'woocommerce_process_shop_order_meta', array( $this, 'track_order_action' ), 51 );
23 add_action( 'load-post-new.php', array( $this, 'track_add_order_from_edit' ), 10 );
24 add_filter( 'woocommerce_shop_order_search_results', array( $this, 'track_order_search' ), 10, 3 );
25 }
105 $order = wc_get_order( $id );
106 $date_created = $order->get_date_created() ? $order->get_date_created()->date( 'Y-m-d H:i:s' ) : '';
107 // phpcs:disable WordPress.Security.NonceVerification
108 $new_date = sprintf(
109 '%s %2d:%2d:%2d',
157 $referring_page = wp_parse_url( $referer );
158 $referring_args = array();
159 $post_edit_page = wp_parse_url( admin_url( 'post.php' ) );
161 if ( ! empty( $referring_page['query'] ) ) {
FileCache.php (https://gitlab.com/Blueprint-Marketing/cli) PHP · 365 lines
CookieJar.php (https://github.com/Exercise/symfony.git) PHP · 204 lines
functions.photon.php (https://gitlab.com/Gashler/sg) PHP · 190 lines
1 <?php
3 /**
23 return $image_url;
25 $image_url_parts = @parse_url( $image_url );
27 // Unable to parse
53 if ( ! apply_filters( 'jetpack_photon_any_extension_for_domain', false, $image_url_parts['host'] ) ) {
54 // Photon doesn't support query strings so we ignore them and look only at the path.
55 // However some source images are served via PHP so check the no-query-string extension.
56 // For future proofing, this is a blacklist of common issues rather than a whitelist.
57 $extension = pathinfo( $image_url_parts['path'], PATHINFO_EXTENSION );
58 if ( empty( $extension ) || in_array( $extension, array( 'php' ) ) )
59 return $image_url;
60 }
Router.php (https://github.com/pimcore/pimcore.git) PHP · 210 lines
FileManager.php (https://github.com/livinglab/openlab.git) PHP · 242 lines
1 <?php
3 if ( ! defined( 'ABSPATH' ) ) {
49 $remote_file = true;
50 $parsed_file_path = parse_url( $file_path );
52 $wp_uploads = wp_upload_dir();
147 */
148 public function json_encode_files( $files ) {
149 if ( version_compare( phpversion(), "5.4.0", ">=" ) ) {
150 $files = json_encode( $files, JSON_UNESCAPED_UNICODE );
151 } else {
164 /**
165 * Fallback for PHP < 5.4 where JSON_UNESCAPED_UNICODE does not exist.
166 *
167 * @param array $matches
Link.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 224 lines
includesScreen.php (https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests) PHP · 207 lines
1 <?php
3 /**
6 class Tests_Admin_includesScreen extends WP_UnitTestCase {
7 var $core_screens = array(
8 'index.php' => array( 'base' => 'dashboard', 'id' => 'dashboard' ),
9 'edit.php' => array( 'base' => 'edit', 'id' => 'edit-post', 'post_type' => 'post' ),
10 'post-new.php'=> array( 'action' => 'add', 'base' => 'post', 'id' => 'post', 'post_type' => 'post' ),
11 'edit-tags.php' => array( 'base' => 'edit-tags', 'id' => 'edit-post_tag', 'post_type' => 'post', 'taxonomy' => 'post_tag' ),
12 'edit-tags.php?taxonomy=post_tag' => array( 'base' => 'edit-tags', 'id' => 'edit-post_tag', 'post_type' => 'post', 'taxonomy' => 'post_tag' ),
13 'edit-tags.php?taxonomy=category' => array( 'base' => 'edit-tags', 'id' => 'edit-category', 'post_type' => 'post', 'taxonomy' => 'category' ),
14 'upload.php' => array( 'base' => 'upload', 'id' => 'upload' ),
15 'media-new.php' => array( 'action' => 'add', 'base' => 'media', 'id' => 'media' ),
wc-page-functions.php (https://gitlab.com/hunt9310/ras) PHP · 215 lines
1 <?php
2 /**
3 * WooCommerce Page Functions
96 if ( get_option( 'permalink_structure' ) ) {
97 if ( strstr( $permalink, '?' ) ) {
98 $query_string = '?' . parse_url( $permalink, PHP_URL_QUERY );
99 $permalink = current( explode( '?', $permalink ) );
100 } else {
121 if ( ! empty( $customer_logout ) ) {
122 foreach ( $items as $key => $item ) {
123 $path = parse_url( $item->url, PHP_URL_PATH );
124 $query = parse_url( $item->url, PHP_URL_QUERY );
CurlClient.php (https://github.com/trob/fabrik.git) PHP · 191 lines
1 <?php
54 if ($this->debugHttp) {
55 $u = \parse_url($url);
56 $hdrLine = $method . ' ' . $u['path'];
57 if (isset($u['query']) && \strlen($u['query']) > 0 ) {
147 $options[CURLOPT_PUT] = true;
148 if ($data) {
149 if ($buffer = \fopen('php://memory', 'w+')) {
150 $dataString = $this->buildQuery($data);
151 \fwrite($buffer, $dataString);
RedirectController.php (https://github.com/nattaphat/hgis.git) PHP · 123 lines
mergedDeliveryFunctions.php (https://bitbucket.org/valmy/openx.git) PHP · 206 lines
1 <?php
40 $executed = true;
41 if (!empty($_GET['loc'])) {
42 $pageInfo = parse_url($_GET['loc']);
43 } elseif (!empty($_SERVER['HTTP_REFERER'])) {
44 $pageInfo = parse_url($_SERVER['HTTP_REFERER']);
45 } elseif (!empty($GLOBALS['loc'])) {
46 $pageInfo = parse_url($GLOBALS['loc']);
47 }
48 if (!empty($pageInfo['scheme'])) {
class-wp-importer.php (https://gitlab.com/morganestes/wordpress-develop) PHP · 333 lines
AkHttpClient.php (https://github.com/akelos/v1.git) PHP · 215 lines
1 <?php
65 $options['header']['user-agent'] = empty($options['header']['user-agent']) ?
66 'Akelos PHP Framework AkHttpClient (http://akelos.org)' : $options['header']['user-agent'];
68 list($user_name, $password) = $this->_extractUserNameAndPasswordFromUrl($url);
70 require_once(AK_VENDOR_DIR.DS.'pear'.DS.'HTTP'.DS.'Request.php');
72 $this->{'_setParamsFor'.ucfirst(strtolower($http_verb))}($url, $options['params']);
153 function getParamsOnUrl($url)
154 {
155 $parts = parse_url($url);
156 if($_tmp = (empty($parts['query']) ? false : $parts['query'])){
157 unset($parts['query']);
identifier.php (https://bitbucket.org/nlabyt/bcf-ball-4eb2.git) PHP · 349 lines
ms-default-constants.php (https://gitlab.com/darmawan.fatria/df-skp-2014) PHP · 153 lines
12 *
13 * Exists for backward compatibility with legacy file-serving through
14 * wp-includes/ms-files.php (wp-content/blogs.php in MU).
15 *
16 * @since 3.0.0
64 */
65 if ( !defined( 'ADMIN_COOKIE_PATH' ) ) {
66 if ( ! is_subdomain_install() || trim( parse_url( get_option( 'siteurl' ), PHP_URL_PATH ), '/' ) ) {
67 define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH );
68 } else {
86 *
87 * Exists for backward compatibility with legacy file-serving through
88 * wp-includes/ms-files.php (wp-content/blogs.php in MU).
89 *
90 * @since 3.0.0
ElggPad.php (https://github.com/efault/elggpad-lite.git) PHP · 163 lines
1 <?php
2 /**
3 * Elgg EtherPad
70 }
72 require_once(elgg_get_plugins_path() . 'etherpad/vendors/etherpad-lite-client.php');
74 // Etherpad: Create an instance
98 $sessionID = $session->sessionID;
100 $domain = "." . parse_url(elgg_get_site_url(), PHP_URL_HOST);
102 if(!setcookie('sessionID', $sessionID, $validUntil, '/', $domain)){
Cache_File_Generic.php (https://gitlab.com/karlen/ayo_wp) PHP · 285 lines
1 <?php
2 namespace W3TC;
21 /**
22 * PHP5-style constructor
23 *
24 * @param array $config
262 if ( Util_Environment::is_wpmu() && !Util_Environment::is_wpmu_subdomain() ) {
263 $domain = get_home_url();
264 $parsed = parse_url( $domain );
265 $host = $parsed['host'];
266 $path = isset( $parsed['path'] ) ? '/' . trim( $parsed['path'], '/' ) : '';
class-wp-http-cookie.php (https://github.com/livinglab/openlab.git) PHP · 261 lines
1 <?php
2 /**
3 * HTTP API: WP_Http_Cookie class
94 public function __construct( $data, $requested_url = '' ) {
95 if ( $requested_url ) {
96 $arrURL = parse_url( $requested_url );
97 }
98 if ( isset( $arrURL['host'] ) ) {
175 // Get details on the URL we're thinking about sending to.
176 $url = parse_url( $url );
177 $url['port'] = isset( $url['port'] ) ? $url['port'] : ( 'https' === $url['scheme'] ? 443 : 80 );
178 $url['path'] = isset( $url['path'] ) ? $url['path'] : '/';
212 * @return string Header encoded cookie name and value.
213 */
214 public function getHeaderValue() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
215 if ( ! isset( $this->name ) || ! isset( $this->value ) ) {
216 return '';
class-wp-importer.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 302 lines
config.php (https://github.com/k1b3r/facebook_plugin.git) PHP · 104 lines
com_agora.php (https://bitbucket.org/dreamriks/gift.git) PHP · 201 lines
1 <?php
2 /**
3 * @author Guillermo Vargas, http://joomla.vargas.co.cr
4 * @email guille@vargas.co.cr
5 * @version $Id: com_agora.php 153 2011-02-26 21:10:11Z guilleva $
6 * @package Xmap
7 * @license GNU/GPL
17 */
18 function prepareMenuItem(&$node,&$params) {
19 $link_query = parse_url( $node->link );
20 parse_str( html_entity_decode($link_query['query']), $link_vars);
21 $id = intval(JArrayHelper::getValue($link_vars,'id',0));
37 return true; // Do not expand links to posts
38 }
39 $link_query = parse_url( $parent->link );
40 parse_str( html_entity_decode($link_query['query']), $link_vars);
41 $task = $xmap->getParam($link_vars,'task','');
https-detection.php (https://github.com/livinglab/openlab.git) PHP · 227 lines
35 */
36 function wp_is_home_url_using_https() {
37 return 'https' === wp_parse_url( home_url(), PHP_URL_SCHEME );
38 }
56 $site_url = apply_filters( 'site_url', get_option( 'siteurl' ), '', null, null );
58 return 'https' === wp_parse_url( $site_url, PHP_URL_SCHEME );
59 }
183 */
184 function wp_cron_conditionally_prevent_sslverify( $request ) {
185 if ( 'https' === wp_parse_url( $request['url'], PHP_URL_SCHEME ) ) {
186 $request['args']['sslverify'] = false;
187 }
ClientTest.php (https://bitbucket.org/gentlero/bitbucket-api.git) PHP · 236 lines
Bitly.php (https://github.com/TheRegge/bit.ly-Library-for-CodeIgniter.git) PHP · 266 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
3 /**
95 foreach ($targets as $key => $value)
96 {
97 $url = parse_url($value);
98 if (!isset($url['host']) && !preg_match('/.ly|.mp/i',$url['path']))
99 {
160 foreach ($targets as $key => $value)
161 {
162 $url = parse_url($value);
163 if (!isset($url['host']) && !preg_match('/.ly|.mp/i',$url['path']))
164 {
263 }
265 /* End of file Bitly.php */
266 /* Location: ./application/libraries/Bitly.php */
com_lknanswers.php (https://bitbucket.org/dreamriks/gift.git) PHP · 147 lines
1 <?php
2 /**
3 * @author Guillermo Vargas, http://joomla.vargas.co.cr
4 * @email guille@vargas.co.cr
5 * @version $Id: com_lknanswers.php 120 2010-06-26 11:51:39Z guilleva $
6 * @package Xmap
7 * @license GNU/GPL
18 */
19 function prepareMenuItem(&$node,&$params) {
20 $link_query = parse_url( $node->link );
21 parse_str( html_entity_decode($link_query['query']), $link_vars);
22 $id = intval(JArrayHelper::getValue($link_vars,'id',0));
33 function getTree( &$xmap, &$parent, &$params)
34 {
35 $link_query = parse_url( $parent->link );
36 parse_str( html_entity_decode($link_query['query']), $link_vars );
37 $task = JArrayHelper::getValue($link_vars,'task','');
UrlSignerTest.php (https://gitlab.com/github-cloud-corp/aws-sdk-php) PHP · 167 lines
1 <?php
2 namespace Aws\Test\CloudFront;
9 * @covers Aws\CloudFront\UrlSigner
10 */
11 class UrlSignerTest extends \PHPUnit_Framework_TestCase
12 {
13 public function setUp()
16 if (!isset($_SERVER[$k]) || $_SERVER[$k] == 'change_me') {
17 $this->markTestSkipped('$_SERVER[\'' . $k . '\'] not set in '
18 . 'phpunit.xml');
19 }
20 }
152 $m->setAccessible(true);
154 $scheme = parse_url($url)['scheme'];
155 $this->assertSame($resource, $m->invoke($s, $scheme, $url));
156 }
Router.php (https://github.com/noyse1987/nx.git) PHP · 108 lines
1 <?php
3 /**
6 * @author Nick Sinopoli <NSinopoli@gmail.com>
7 * @copyright Copyright (c) 2011, Nick Sinopoli
8 * @license http://opensource.org/licenses/bsd-license.php The BSD License
9 */
90 * @return array
91 */
92 public static function parse_url($url) {
93 $matches = array();
94 foreach ( self::$_routes as $pattern => $route ) {
Localization.php (https://github.com/ARCANEDEV/Localization.git) PHP · 506 lines
class-popup-rule-referrer.php (https://gitlab.com/darmawan.fatria/df-skp-2014) PHP · 354 lines
1 <?php
2 /*
3 Name: Referrer
95 ?>
96 <label for="po-rule-data-referrer">
97 <?php _e( 'Referrers. Can be full URL or a pattern like ".example.com" (one per line):', PO_LANG ); ?>
98 </label>
99 <textarea name="po_rule_data[referrer]" id="po-rule-data-referrer" class="block"><?php
100 echo esc_attr( $referrer );
101 ?></textarea>
102 <?php
103 }
311 // Get the query strings and check its a web source.
312 $qs = parse_url( $referrer, PHP_URL_QUERY );
313 $qget = array();
pagination.php (https://github.com/wamplo/red.git) PHP · 113 lines
1 <?php
2 namespace Engine\libraries;
35 if ($this->curroffset > 0) {
37 $dataURL = parse_url($_SERVER['REQUEST_URI']); // $x = $dataURL['path'];
38 $buildQuery = http_build_query( Array( 'offset' => $this->curroffset - 1 ) + $_GET );
46 #var_dump($this);
48 $dataURL = parse_url($_SERVER['REQUEST_URI']); // $x = $dataURL['path'];
49 $buildQuery = http_build_query( Array( 'offset' => $this->curroffset + 1 ) + $_GET );
78 # @todo EFFICIENT FIX, we can use explode from ?, etc rather then parse url
79 $this->page = $this->page + 1;
80 $dataURL = parse_url($_SERVER['REQUEST_URI']); // $x = $dataURL['path'];
81 $buildQuery = http_build_query( Array( 'offset' => $this->page ) + $_GET );
importer.php (https://gitlab.com/VTTE/sitios-vtte) PHP · 425 lines
1 <?php
3 class Red_Plugin_Importer {
122 private function create_for_item( $group_id, $redirect ) {
123 // phpcs:ignore
124 $sources = unserialize( $redirect->sources );
125 $items = [];
156 if ( ! function_exists( 'is_plugin_active' ) ) {
157 require_once ABSPATH . 'wp-admin/includes/plugin.php';
158 }
247 }
249 $new_path = wp_parse_url( $new, PHP_URL_PATH );
250 $old = rtrim( dirname( $new_path ), '/' ) . '/' . rtrim( $redirect->meta_value, '/' ) . '/';
251 $old = str_replace( '\\', '', $old );
url.lib.php (https://github.com/TeamRocketScience/Claroline-TRS-Edition.git) PHP · 304 lines
1 <?php // $Id: url.lib.php 12923 2011-03-03 14:23:57Z abourguignon $
3 // vim: expandtab sw=4 ts=4 sts=4:
34 /**
35 * Constructor
36 * @param string url base url (use PHP_SELF if missing)
37 */
38 public function __construct( $url = '' )
39 {
40 $url = empty($url)
41 ? $_SERVER['PHP_SELF']
42 : $url
43 ;
45 $url = htmlspecialchars_decode( $url );
47 $urlArr = @parse_url( $url );
49 $queryArr = array();
Url.php (https://github.com/pear/Text_Wiki2.git) PHP · 293 lines
1 <?php
3 /**
10 *
11 * @author Justin Patrin <papercrane@reversefold.com>
12 * @author Paul M. Jones <pmjones@php.net>
13 *
14 * @license LGPL
48 *
49 * @author Justin Patrin <papercrane@reversefold.com>
50 * @author Paul M. Jones <pmjones@php.net>
51 *
52 */
54 class Text_Wiki2_Parse_Url extends Text_Wiki2_Parse {
systematics.inc.php (https://gitlab.com/Gashler/sg) PHP · 141 lines
1 <?php
2 /**
3 * Systematics *(for current page)*.
86 return ($is_wp_systematic = apply_filters('ws_plugin__s2member_is_wp_systematic_use_page', TRUE, get_defined_vars()));
88 if((defined('DOING_CRON') && DOING_CRON) || strcasecmp(PHP_SAPI, 'CLI') === 0) // CLI or CRON job.
89 return ($is_wp_systematic = apply_filters('ws_plugin__s2member_is_wp_systematic_use_page', TRUE, get_defined_vars()));
91 if(preg_match('/^\/(?:wp-.+?|xmlrpc)\.php$/'.$ci, c_ws_plugin__s2member_utils_urls::parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)))
92 return ($is_wp_systematic = apply_filters('ws_plugin__s2member_is_wp_systematic_use_page', TRUE, get_defined_vars()));
punycode.php (https://github.com/pjwiseman/joomla-cms.git) PHP · 263 lines
1 <?php
2 /**
3 * @package Joomla.Platform
10 defined('JPATH_PLATFORM') or die;
12 JLoader::register('idna_convert', JPATH_LIBRARIES . '/idna_convert/idna_convert.class.php');
14 /**
66 public static function urlToPunycode($uri)
67 {
68 $parsed = JString::parse_url($uri);
70 if (!isset($parsed['host']) || $parsed['host'] == '')
137 }
139 $parsed = JString::parse_url($uri);
141 if (!isset($parsed['host']) || $parsed['host'] == '')
constants.php (https://github.com/ekoisa/pyrocms.git) PHP · 105 lines
1 <?php defined('BASEPATH') OR exit('No direct script access allowed');
3 /*
10 | security, but you may wish (or even need) to change the values in
11 | certain environments (Apache running a separate process for each
12 | user, PHP under CGI with Apache suEXEC, etc.). Octal values should
13 | always be used to set the mode correctly.
14 |
56 */
58 // Base URL (keeps this crazy sh*t out of the config.php
59 if(isset($_SERVER['HTTP_HOST']))
60 {
65 // Base URI (It's different to base URL!)
66 $base_uri = parse_url($base_url, PHP_URL_PATH);
67 if (substr($base_uri, 0, 1) != '/') $base_uri = '/'.$base_uri;
68 if (substr($base_uri, -1, 1) != '/') $base_uri .= '/';
Request.php (https://gitlab.com/x33n/ImpressPages) PHP · 301 lines
35 $server['REDIRECT_URL'] = '';
36 $server['QUERY_STRING'] = '';
37 $server['REQUEST_URI'] = parse_url(ipConfig()->baseUrl(), PHP_URL_PATH); // default uri points to root
38 $this->setServer($server);
39 }
223 public function getRelativePath()
224 {
225 $basePath = parse_url(ipConfig()->baseUrl(), PHP_URL_PATH);
227 $requestPath = parse_url($this->_SERVER["REQUEST_URI"], PHP_URL_PATH);
237 $relativePath = substr($requestPath, strlen($basePath));
239 if (strpos($relativePath, 'index.php') === 0) { // remove index.php if needed
240 $relativePath = substr($relativePath, 9);
241 }
Google_HttpRequest.php (https://bitbucket.org/kudutest1/moodlegit.git) PHP · 304 lines
1 <?php
2 /*
3 * Copyright 2010 Google Inc.
25 */
26 class Google_HttpRequest {
27 const USER_AGENT_SUFFIX = "google-api-php-client/0.6.0";
28 private $batchHeaders = array(
29 'Content-Type' => 'application/http',
289 $str .= "\n";
291 $path = parse_url($this->getUrl(), PHP_URL_PATH);
292 $str .= $this->getRequestMethod() . ' ' . $path . " HTTP/1.1\n";
293 foreach($this->getRequestHeaders() as $key => $val) {
JStringTest.php (https://github.com/katalystsol/joomla-platform.git) PHP · 613 lines
1 <?php
2 /**
3 * @package Joomla.UnitTest
8 */
10 require_once JPATH_PLATFORM . '/joomla/string/string.php';
11 require_once 'TestHelpers/JString-helper-dataset.php';
13 /**
14 * Test class for JString.
15 * Generated by PHPUnit on 2009-10-26 at 22:29:34.
16 */
17 class JStringTest extends PHPUnit_Framework_TestCase
371 public function testStrcasecmp($string1, $string2, $locale, $expect)
372 {
373 if (substr(php_uname(), 0, 6) == 'Darwin' && $locale != false)
374 {
375 $this->markTestSkipped('Darwin bug prevents foreign conversion from working properly');
RedirectController.php (https://github.com/symfony/FrameworkBundle.git) PHP · 189 lines
EpiOAuth.php (https://github.com/krillo/bandybot_old.git) PHP · 233 lines
1 <?php
2 class EpiOAuth
3 {
67 {
68 $_h = array('Expect:');
69 $urlParts = parse_url($url);
70 $oauth = 'Authorization: OAuth realm="' . $urlParts['path'] . '",';
71 foreach($oauthHeaders as $name => $value)
141 protected function normalizeUrl($url = null)
142 {
143 $urlParts = parse_url($url);
144 $scheme = strtolower($urlParts['scheme']);
145 $host = strtolower($urlParts['host']);
Sankakucomplex_Downloader.php (https://github.com/captainkuro/crawler.git) PHP · 130 lines
SoapRequester.php (https://bitbucket.org/6dg/dynamics-crm-php-connector.git) PHP · 271 lines
1 <?php
2 namespace Sixdg\DynamicsCRMConnector\Components\Soap;
73 private function getHeaders($uri, $request)
74 {
75 $urlDetails = parse_url($uri);
77 return [
156 {
157 if ($responseDOM->getElementsByTagNameNS(SoapRequester::$soapEnvelope, 'Envelope')->length < 1) {
158 throw new \Exception('Invalid SOAP Response: HTTP Response ' . $responseXML . PHP_EOL . $responseXML . PHP_EOL);
159 }
160 }
203 if (!$header) {
204 throw new \Exception('Invalid SOAP Response: No SOAP Header!' . PHP_EOL . $responseXML . PHP_EOL);
205 }
206 }
header_php.php (https://github.com/severnaya99/Sg-2010.git) PHP · 82 lines
46 //look for typical paths to phpBB files
47 foreach (array('/phpBB2', '/phpbb2', '/phpbb', '/phpBB', '/forum', '/forums') as $testpath) {
48 //echo 'path='.$testpath.'<br>';
49 if (file_exists($docroot . $testpath . '/config.php') ) {
56 }
57 }
58 $phpbb_suggest_dir = (substr($phpbb_suggest_dir,-1)=='/') ? substr($phpbb_suggest_dir,0,(strlen($phpbb_suggest_dir)-1)) : $phpbb_suggest_dir; //remove any trailing slashes
59 $phpbb_suggest_dir = str_replace('//','/',$phpbb_suggest_dir); // remove any double-slashes
62 if ($_POST['phpbb_use'] == 'true') {
63 $zc_install->fileExists($_POST['phpbb_dir'] . '/config.php', ERROR_TEXT_PHPBB_CONFIG_NOTEXIST . ' :'. $_POST['phpbb_dir'] . '/config.php', ERROR_CODE_PHPBB_CONFIG_NOTEXIST);
64 // } else {
65 // $_POST['phpbb_dir'] = ''; // if option set to "false", then do not enter a path in the configure.php file.
68 if (!$zc_install->fatal_error) {
69 header('location: index.php?main_page=database_setup&language=' . $language . '&physical_path='.$_GET['physical_path'].'&virtual_http_path='.$_GET['virtual_http_path'].'&virtual_https_path='.$_GET['virtual_https_path'].'&virtual_https_server='.$_GET['virtual_https_server'].'&enable_ssl='.$_GET['enable_ssl'].'&enable_ssl_admin='.$_GET['enable_ssl_admin'].'&sql_cache='.$_GET['sql_cache'].'&phpbb_dir='.$_POST['phpbb_dir'].'&is_upgrade='.$_GET['is_upgrade'].'&use_phpbb='.$_POST['phpbb_use']);
70 }
71 } //endif 'submit'
class-dlm-download.php (https://gitlab.com/leobelizquierdo/cabotsubmitter-wordpress) PHP · 544 lines
1 <?php
3 if ( ! defined( 'ABSPATH' ) ) {
226 */
227 public function get_the_download_link() {
228 $scheme = parse_url( get_option( 'home' ), PHP_URL_SCHEME );
229 $endpoint = ( $endpoint = get_option( 'dlm_download_endpoint' ) ) ? $endpoint : 'download';
230 $ep_value = get_option( 'dlm_download_endpoint_value' );
elementindex_SOAP__Transport__HTTP.html (https://github.com/durand54/sitellite.git) HTML · 262 lines
55 </dt>
56 <dd class="index-item-body">
57 <div class="index-item-details"><a href="SOAP__Transport__HTTP/SOAP_Transport_HTTP.html#var$_userAgent">SOAP_Transport_HTTP::$_userAgent</a> in HTTP.php</div>
58 <div class="index-item-description">HTTP-Request User-Agent</div>
59 </dd>
62 </dt>
63 <dd class="index-item-body">
64 <div class="index-item-details"><a href="SOAP__Transport__HTTP/SOAP_Transport_HTTP.html#method_parseHeaders">SOAP_Transport_HTTP::_parseHeaders()</a> in HTTP.php</div>
65 <div class="index-item-description">Parses the headers</div>
66 </dd>
77 </dt>
78 <dd class="index-item-body">
79 <div class="index-item-details"><a href="SOAP__Transport__HTTP/SOAP_Transport_HTTP.html#methodaddCookie">SOAP_Transport_HTTP::addCookie()</a> in HTTP.php</div>
80 <div class="index-item-description">Add a cookie</div>
81 </dd>
NodeByUriTest.php (https://github.com/wp-graphql/wp-graphql.git) PHP · 524 lines
468 $actual = graphql(['query' => $query]);
469 codecept_debug( $actual );
470 codecept_debug( parse_url( get_permalink( $child ), PHP_URL_PATH ) );
472 $this->assertArrayNotHasKey( 'errors', $actual );
488 ';
490 $child_uri = parse_url( get_permalink( $child ), PHP_URL_PATH );
491 codecept_debug( $child_uri );
507 codecept_debug( $actual );
509 $parent_uri = parse_url( get_permalink( $parent ), PHP_URL_PATH );
510 $actual = graphql([
511 'query' => $query,
PagesWithoutReviewScheduleReport.php (https://github.com/silverstripe-labs/silverstripe-contentreview.git) PHP · 167 lines
form_cformresult_old.php (https://gitlab.com/Rad1calDreamer/honey) PHP · 181 lines
42 else
43 {
44 if (strlen($arrResult["EDIT_RESULT_TEMPLATE"])<=0) $template = "default.php";
45 else $template = $arrResult["EDIT_RESULT_TEMPLATE"];
46 }
47 require_once ($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/form/include.php");
48 $path = COption::GetOptionString("form","EDIT_RESULT_TEMPLATE_PATH");
49 IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/form/include.php");
56 $arIcons[] =
57 Array(
58 "URL" => "/bitrix/admin/fileman_file_edit.php?lang=".LANGUAGE_ID."&site=".SITE_ID."&full_src=Y&path=". urlencode($path.$template),
59 "SRC" => "/bitrix/images/form/panel/edit_template.gif",
60 "ALT" => GetMessage("FORM_PUBLIC_ICON_TEMPLATE")
URI.php (https://github.com/ILIAS-eLearning/ILIAS.git) PHP · 384 lines
1 <?php
3 declare(strict_types=1);
85 public function __construct(string $uri_string)
86 {
87 $this->schema = $this->digestSchema(parse_url($uri_string, PHP_URL_SCHEME));
88 $this->host = $this->digestHost(parse_url($uri_string, PHP_URL_HOST));
89 $this->port = $this->digestPort(parse_url($uri_string, PHP_URL_PORT));
90 $this->path = $this->digestPath(parse_url($uri_string, PHP_URL_PATH));
91 $this->query = $this->digestQuery(parse_url($uri_string, PHP_URL_QUERY));
92 $this->fragment = $this->digestFragment(parse_url($uri_string, PHP_URL_FRAGMENT));
organizer.php (https://gitlab.com/ezgonzalez/integral) PHP · 286 lines
TwigRuntimeExtensionTest.php (https://github.com/slimphp/Twig-View.git) PHP · 300 lines
1 <?php
2 /**
3 * Slim Framework (http://slimframework.com)
4 *
5 * @license https://github.com/slimphp/Twig-View/blob/master/LICENSE.md (MIT License)
6 */
95 $uriProphecy = $this->prophesize(UriInterface::class);
97 /** @noinspection PhpUndefinedMethodInspection */
98 $uriProphecy
99 ->getPath()
138 $uriProphecy = $this->prophesize(UriInterface::class);
140 $path = parse_url($url, PHP_URL_PATH);
141 $query = parse_url($url, PHP_URL_QUERY);
voting.class.inc.php (https://github.com/rhempen/cms.git) PHP · 305 lines
1 <?php
3 /**
4 * Title........: Voting Class
5 * Filename.....: voting.class.inc.php
6 * Author.......: Ralf Stadtaus
7 * Homepage.....: http://www.stadtaus.com/
286 }
288 $http_referrer = parse_url(getenv('HTTP_REFERER'));
289 $http_referrer = trim(str_replace('www.', '', strtolower($http_referrer['host'])));
290 if ($allowed_referrers != null) {
function.fetch.php (https://github.com/marcotinacci/PMango-Diagrams.git) PHP · 217 lines
1 <?php
2 /**
3 * Smarty plugin
13 * Name: fetch<br>
14 * Purpose: fetch file, web or ftp data and display results
15 * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch}
16 * (Smarty online manual)
17 * @param array
30 if ($smarty->security && !preg_match('!^(http|ftp)://!i', $params['file'])) {
31 $_params = array('resource_type' => 'file', 'resource_name' => $params['file']);
32 require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.is_secure.php');
33 if(!smarty_core_is_secure($_params, $smarty)) {
34 $smarty->_trigger_fatal_error('[plugin] (secure mode) fetch \'' . $params['file'] . '\' is not allowed');
50 if(preg_match('!^http://!i',$params['file'])) {
51 // http fetch
52 if($uri_parts = parse_url($params['file'])) {
53 // set defaults
54 $host = $server_name = $uri_parts['host'];
function.fetch.php (https://github.com/laurentc/NApf.git) PHP · 216 lines
1 <?php
2 /**
3 * Smarty plugin
13 * Name: fetch<br>
14 * Purpose: fetch common, web or ftp data and display results
15 * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch}
16 * (Smarty online manual)
17 * @author Monte Ohrt <monte at ohrt dot com>
48 if (preg_match('!^http://!i', $params['common'])) {
49 // http fetch
50 if ($uri_parts = parse_url($params['common'])) {
51 // set defaults
52 $host = $server_name = $uri_parts['host'];
get_file_curl.php (https://gitlab.com/najomie/fit-hippie) PHP · 171 lines
function.fetch.php (https://github.com/exponentcms/exponent-cms.git) PHP · 204 lines
1 <?php
2 /**
3 * Smarty plugin
12 * Purpose: fetch file, web or ftp data and display results
13 *
14 * @link https://www.smarty.net/manual/en/language.function.fetch.php {fetch}
15 * (Smarty online manual)
16 * @author Monte Ohrt <monte at ohrt dot com>
38 if (isset($template->smarty->security_policy)) {
39 if ($protocol) {
40 // remote resource (or php stream, …)
41 if (!$template->smarty->security_policy->isTrustedUri($params[ 'file' ])) {
42 return;
52 if ($protocol === 'http') {
53 // http fetch
54 if ($uri_parts = parse_url($params[ 'file' ])) {
55 // set defaults
56 $host = $server_name = $uri_parts[ 'host' ];
wc-page-functions.php (https://gitlab.com/webkod3r/tripolis) PHP · 261 lines
HttpUtils.php (https://github.com/pulzarraider/symfony.git) PHP · 185 lines
test_cookie_class.rb (https://github.com/BillTheBest/sms.git) Ruby · 329 lines
wpml-admin-post-actions.class.php (https://gitlab.com/woxiprogrammers/infinia-wordpress) PHP · 169 lines
SharedAccessSignature.php (https://github.com/kiranatama/sagalaya.git) PHP · 288 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
197 // Parse permission url
198 $parsedPermissionUrl = parse_url($permissionUrl);
200 // Parse permission properties
203 // Parse request url
204 $parsedRequestUrl = parse_url($requestUrl);
206 // Check if permission matches request
243 if ($this->permissionMatchesRequest($permittedUrl, $requestUrl, $resourceType, $requiredPermission)) {
244 // This matches, append signature data
245 $parsedPermittedUrl = parse_url($permittedUrl);
247 if (strpos($requestUrl, '?') === false) {
Discover_Yadis.php (https://github.com/captain-zyx/php-openid.git) PHP · 230 lines
1 <?php
3 require_once "Tests/Auth/Yadis/DiscoverData.php";
4 require_once "Auth/Yadis/Yadis.php";
5 require_once "Auth/Yadis/HTTPFetcher.php";
36 $current_url = $url;
37 while (true) {
38 $parsed = parse_url($current_url);
39 $path = substr($parsed['path'], 1);
40 $data = generateSample($path, $this->base_url);
90 }
92 class TestSecondGet extends PHPUnit_Framework_TestCase {
93 function test_404()
94 {
Page.class.php (https://github.com/liujinsong668/epptime.git) PHP · 137 lines
1 <?php
2 // +----------------------------------------------------------------------
3 // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
4 // +----------------------------------------------------------------------
5 // | Copyright (c) 2009 http://thinkphp.cn All rights reserved.
6 // +----------------------------------------------------------------------
7 // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
74 $nowCoolPage = ceil($this->nowPage/$this->rollPage);
75 $url = $_SERVER['REQUEST_URI'].(strpos($_SERVER['REQUEST_URI'],'?')?'':"?").$this->parameter;
76 $parse = parse_url($url);
77 if(isset($parse['query'])) {
78 parse_str($parse['query'],$params);
basic.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 168 lines
1 <?php
2 /**
3 * File containing the ezcWebdavBasicPathFactory class.
31 {
32 /**
33 * Result of parse_url() for the {@link $baseUri} submitted to the ctor.
34 *
35 * @var array(string=>string)
106 public function parseUriToPath( $uri )
107 {
108 $requestPath = parse_url( trim( $uri ), PHP_URL_PATH );
110 $requestPath = str_replace( '//', '/', $requestPath );
134 // Attach fragment to avoid performing operations occasionally
135 if ( ( $frag = parse_url( $uri, PHP_URL_FRAGMENT ) ) !== null )
136 {
137 $requestPath .= "#$frag";
RequestFactoryTest.php (https://github.com/azogheb/guzzle.git) PHP · 278 lines
1 <?php
3 namespace Guzzle\Tests\Http\Message;
11 /**
12 * @author Michael Dowling <michael@guzzlephp.org>
13 */
14 class HttpRequestFactoryTest extends \Guzzle\Tests\GuzzleTestCase
65 // Test using a resource
66 $resource = fopen('php://temp', 'w+');
67 fwrite($resource, 'Data');
68 $request = RequestFactory::put('http://www.google.com/path?q=1&v=2', null, $resource);
154 public function testCreatesFromParts()
155 {
156 $parts = parse_url('http://michael:123@www.google.com:8080/path?q=1&v=2');
158 $request = RequestFactory::fromParts('PUT', $parts, null, 'Data');
drupal.sh (https://gitlab.com/endomorphosis/tactilevision) Shell · 143 lines
7 * Check for your PHP interpreter - on Windows you'll probably have to
8 * replace line 1 with
9 * #!c:/program files/php/php.exe
10 *
11 * @param path Drupal's absolute root directory in local file system (optional).
38 the path '/foo/bar' in your site 'default'. URI has to be
39 enclosed by quotation marks if there are ampersands in it
40 (f.e. index.php?q=node&foo=bar). Prefix 'http://' is required,
41 and the domain must exist in Drupal's sites-directory.
44 i.e. if URI is set to http://default/bar/foo.php
45 and bar/foo.php exists, this script will be executed without
46 bootstrapping Drupal. To execute Drupal's cron.php, specify
60 $cmd = 'index.php';
61 $_SERVER['HTTP_HOST'] = 'default';
62 $_SERVER['PHP_SELF'] = '/index.php';
63 $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
64 $_SERVER['SERVER_SOFTWARE'] = 'PHP CLI';
V2.php (https://github.com/eschabell/openshift-zendframework.git) PHP · 138 lines
1 <?php
2 /**
3 * Zend Framework
23 * @see Zend_Service_Amazon_Authentication
24 */
25 require_once 'Zend/Service/Amazon/Authentication.php';
27 /**
28 * @see Zend_Crypt_Hmac
29 */
30 require_once 'Zend/Crypt/Hmac.php';
32 /**
116 {
117 $data = $this->_httpMethod . "\n";
118 $data .= parse_url($url, PHP_URL_HOST) . "\n";
119 $data .= ('' == $path = parse_url($url, PHP_URL_PATH)) ? '/' : $path;
topicposts.php (https://github.com/bpmn/bpmn.git) PHP · 182 lines
url.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 98 lines
1 <?php
2 /**
3 * @package Joomla.Platform
44 return true;
45 }
46 $urlParts = JString::parse_url($value);
48 // See http://www.w3.org/Addressing/URL/url-spec.txt
61 * This rule is only for full URLs with schemes because parse_url does not parse
62 * accurately without a scheme.
63 * @see http://php.net/manual/en/function.parse-url.php
64 */
65 if ($urlParts && !array_key_exists('scheme', $urlParts))
Twitter.php (https://gitlab.com/ebrjose/comcebu) PHP · 261 lines
DB.php (https://github.com/guoguo/CodeIgniter.git) PHP · 174 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2 /**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 5.1.6 or newer
6 *
7 * NOTICE OF LICENSE
43 {
44 // Is the config file in the environment folder?
45 if ( ! defined('ENVIRONMENT') OR ! file_exists($file_path = APPPATH.'config/'.ENVIRONMENT.'/database.php'))
46 {
47 if ( ! file_exists($file_path = APPPATH.'config/database.php'))
48 {
49 show_error('The configuration file database.php does not exist.');
50 }
51 }
Google_HttpRequest.php (https://bitbucket.org/trashy/galette-import-google-contacts.git) PHP · 304 lines
1 <?php
2 /*
3 * Copyright 2010 Google Inc.
25 */
26 class Google_HttpRequest {
27 const USER_AGENT_SUFFIX = "google-api-php-client/0.6.5";
28 private $batchHeaders = array(
29 'Content-Type' => 'application/http',
289 $str .= "\n";
291 $path = parse_url($this->getUrl(), PHP_URL_PATH);
292 $str .= $this->getRequestMethod() . ' ' . $path . " HTTP/1.1\n";
293 foreach($this->getRequestHeaders() as $key => $val) {
plugins.md (https://gitlab.com/yousafsyed/easternglamor) Markdown · 151 lines
httpMgr.class.php (https://github.com/richhl/kalturaCE.git) PHP · 251 lines
class.jetpack-signature.php (https://gitlab.com/relacilia/cakra) PHP · 188 lines
1 <?php
3 defined( 'JETPACK_SIGNATURE__HTTP_PORT' ) or define( 'JETPACK_SIGNATURE__HTTP_PORT' , 80 );
105 }
107 $parsed = parse_url( $url );
108 if ( !isset( $parsed['host'] ) ) {
109 return new Jetpack_Error( 'invalid_signature', sprintf( 'The required "%s" parameter is malformed.', 'url' ) );
176 function encode_3986( $string ) {
177 $string = rawurlencode( $string );
178 return str_replace( '%7E', '~', $string ); // prior to PHP 5.3, rawurlencode was RFC 1738
179 }
router.php (https://bitbucket.org/slogsdon/unamed.git) PHP · 264 lines
1 <?php
2 /**
3 * Unamed - a WordPress replacement
90 *
91 * Compiles a route string to a regular expression
92 * lifted from https://github.com/chriso/klein.php because i hate
93 * dealing with regex
94 *
177 protected function parseUri()
178 {
179 $path = rtrim(parse_url($this->request->uri, PHP_URL_PATH), '/');
180 if (!is_null($this->basePath)) {
181 if (strpos($path, $this->basePath) === 0) {
Request.php (https://github.com/sgtcarneiro/horde.git) PHP · 198 lines
1 <?php
2 /**
3 * Copyright 2008-2011 The Horde Project (http://www.horde.org/)
4 *
5 * @author Chuck Hagenbuch <chuck@horde.org>
6 * @license http://opensource.org/licenses/bsd-license.php BSD
7 * @category Horde
8 * @package Oauth
13 *
14 * @author Chuck Hagenbuch <chuck@horde.org>
15 * @license http://opensource.org/licenses/bsd-license.php BSD
16 * @category Horde
17 * @package Oauth
182 protected function _getNormalizedUrl()
183 {
184 $parts = parse_url($this->_url);
186 $port = !empty($parts['port']) ? $parts['port'] : '80';
DB.php (https://github.com/usagi-project/mynets1.git) PHP · 123 lines
1 <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
2 /**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 4.3.2 or newer
6 *
7 * @package CodeIgniter
57 */
59 if (($dns = @parse_url($params)) === FALSE)
60 {
61 show_error('Invalid DB Connection String');
StreamWrapper.php (https://bitbucket.org/ajalovec/gaufrette.git) PHP · 272 lines
DB.php (https://github.com/elsewares/tinderbox.git) PHP · 151 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2 /**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 4.3.2 or newer
6 *
7 * @package CodeIgniter
57 */
59 if (($dns = @parse_url($params)) === FALSE)
60 {
61 show_error('Invalid DB Connection String');
150 /* End of file DB.php */
151 /* Location: ./system/database/DB.php */
V2.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 138 lines
1 <?php
2 /**
3 * Zend Framework
23 * @see Zend_Service_Amazon_Authentication
24 */
25 // require_once 'Zend/Service/Amazon/Authentication.php';
27 /**
28 * @see Zend_Crypt_Hmac
29 */
30 // require_once 'Zend/Crypt/Hmac.php';
32 /**
116 {
117 $data = $this->_httpMethod . "\n";
118 $data .= parse_url($url, PHP_URL_HOST) . "\n";
119 $data .= ('' == $path = parse_url($url, PHP_URL_PATH)) ? '/' : $path;
MemcachedOptions.php (https://github.com/christeredvartsen/zf2.git) PHP · 300 lines
220 * @param array $libOptions
221 * @return MemcachedOptions
222 * @link http://php.net/manual/memcached.constants.php
223 */
224 public function setLibOptions(array $libOptions)
242 * @param mixed $value
243 * @return MemcachedOptions
244 * @link http://php.net/manual/memcached.constants.php
245 */
246 public function setLibOption($key, $value)
257 *
258 * @return array
259 * @link http://php.net/manual/memcached.constants.php
260 */
261 public function getLibOptions()
JStringTest.php (https://github.com/orware/joomla-platform.git) PHP · 439 lines
1 <?php
2 /**
3 * @package Joomla.UnitTest
8 */
10 require_once JPATH_PLATFORM.'/joomla/utilities/string.php';
11 require_once 'TestHelpers/JString-helper-dataset.php';
13 /**
14 * Test class for JString.
15 * Generated by PHPUnit on 2009-10-26 at 22:29:34.
16 */
17 class JStringTest extends PHPUnit_Framework_TestCase
223 public function testStrcasecmp($string1, $string2, $locale, $expect)
224 {
225 if (substr(php_uname(), 0, 6) == 'Darwin' &&
226 $locale != false) {
227 $this->markTestSkipped('Darwin bug prevents foreign conversion from working properly');
CouchDB.php (https://github.com/beberlei/php-couchbase.git) PHP · 210 lines
ZipStreamWrapper.php (https://github.com/rjdjohnston/core.git) PHP · 179 lines
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 *
21 * @category PHPExcel
22 * @package PHPExcel_Shared
23 * @copyright Copyright (c) 2006 - 2008 PHPExcel (http://www.codeplex.com/PHPExcel)
24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25 * @version 1.6.3, 2008-08-25
29 /** Register new zip wrapper */
30 PHPExcel_Shared_ZipStreamWrapper::register();
37 * @package PHPExcel_Shared
38 * @copyright Copyright (c) 2006 - 2008 PHPExcel (http://www.codeplex.com/PHPExcel)
39 */
40 class PHPExcel_Shared_ZipStreamWrapper {
PathInformation.php (https://github.com/WPsites/WPide.git) PHP · 235 lines
1 <?php
2 /*
3 * Copyright (C) 2011 by TEQneers GmbH & Co. KG
24 /**
25 * Git Streamwrapper for PHP
26 *
27 * @category TQ
105 //fix path if fragment has been munged into the path (e.g. when using the RecursiveIterator)
106 $path = preg_replace('~^(.+?)(#[^/]+)(.*)$~', '$1$3$2', $path);
107 $url = parse_url($protocol.'://'.$path);
109 if (preg_match('~^\w:.+~', $path)) {
localplay_controller.abstract.php (https://gitlab.com/x33n/ampache) PHP · 113 lines
1 <?php
2 /* vim:set softtabstop=4 shiftwidth=4 expandtab: */
3 /**
77 * always possible
78 *
79 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
80 */
81 public function get_file($object)
85 /**
86 * parse_url
87 * This takes an Ampache URL and then returns the 'primary' part of it
88 * So that it's easier for localplay modules to return valid song information
94 $data = array();
96 $variables = parse_url($url,PHP_URL_QUERY);
97 if ($variables) {
98 parse_str($variables,$data);
connectors.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 279 lines
1 <?php
2 /*
3 * @package EasyBlog
4 * @copyright Copyright (C) 2010 Stack Ideas Private Limited. All rights reserved.
5 * @license GNU/GPL, see LICENSE.php
6 * EasyBlog is free software. This version may have been modified pursuant
7 * to the GNU General Public License, and as distributed it includes or
8 * is derivative of works licensed under the GNU General Public License or
9 * other free or open source software licenses.
10 * See COPYRIGHT.php for copyright notices and details.
11 */
12 defined( 'JPATH_BASE' ) or die( 'Unauthorized Access' );
155 preg_match('/Location:(.*?)\n/', $headers, $matches);
157 $url = @parse_url(trim(array_pop($matches)));
159 $new_url = '';
V2.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 138 lines
1 <?php
2 /**
3 * Zend Framework
23 * @see Zend_Service_Amazon_Authentication
24 */
25 #require_once 'Zend/Service/Amazon/Authentication.php';
27 /**
28 * @see Zend_Crypt_Hmac
29 */
30 #require_once 'Zend/Crypt/Hmac.php';
32 /**
116 {
117 $data = $this->_httpMethod . "\n";
118 $data .= parse_url($url, PHP_URL_HOST) . "\n";
119 $data .= ('' == $path = parse_url($url, PHP_URL_PATH)) ? '/' : $path;
php.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 2590 lines
11 </PROPS>
12 <RULES IGNORE_CASE="TRUE">
13 <SPAN TYPE="MARKUP" DELEGATE="PHP">
14 <BEGIN><?php</BEGIN>
16 </SPAN>
18 <SPAN TYPE="MARKUP" DELEGATE="PHP">
19 <BEGIN><?</BEGIN>
20 <END>?></END>
21 </SPAN>
23 <SPAN TYPE="MARKUP" DELEGATE="PHP">
24 <BEGIN><%=</BEGIN>
25 <END>%></END>
65 <RULES SET="TAGS" DEFAULT="MARKUP">
66 <SPAN TYPE="MARKUP" DELEGATE="PHP">
67 <BEGIN><?php</BEGIN>