TYPO3  7.6
pear/net_url2/docs/example.php
Go to the documentation of this file.
1 <?php
23 error_reporting(E_ALL | E_STRICT);
24 
25 require 'Net/URL2.php';
26 
27 $url = new Net_URL2(
28  'https://example.com/pls/portal30/PORTAL30.wwpob_page.changetabs?'
29  .'p_back_url=http%3A%2F%2Fexample.com%2Fservlet%2Fpage%3F_pageid%3D360'
30  .'%2C366%2C368%2C382%26_dad%3Dportal30%26_schema%3DPORTAL30&foo=bar'
31 );
32 
33 ?>
34 <html>
35 <body>
36 
37 <pre>
38 Protocol...: <?php echo $url->protocol; ?>
39 
40 Username...: <?php echo $url->user; ?>
41 
42 Password...: <?php echo $url->pass; ?>
43 
44 Server.....: <?php echo $url->host; ?>
45 
46 Port.......: <?php $url->port; ?>
47 
48 File/path..: <?php $url->path; ?>
49 
50 Querystring: <?php print_r($url->querystring); ?>
51 
52 Anchor.....: <?php echo $url->anchor;?>
53 
54 Full URL...: <?php echo $url->getUrl(); ?>
55 
56 
57 Resolve path (.././/foo/bar/joe/./././../jabba): <b><?php
58  echo $url->resolve('.././/foo/bar/joe/./././../jabba'); ?></b>
59 </pre>
60 
61 </body>
62 </html>