com.caucho.quercus.lib
Class UrlModule

java.lang.Object
  extended by com.caucho.quercus.module.AbstractQuercusModule
      extended by com.caucho.quercus.lib.UrlModule
All Implemented Interfaces:
QuercusModule

public class UrlModule
extends AbstractQuercusModule

PHP URL


Field Summary
static int PHP_URL_FRAGMENT
           
static int PHP_URL_HOST
           
static int PHP_URL_PASS
           
static int PHP_URL_PATH
           
static int PHP_URL_PORT
           
static int PHP_URL_QUERY
           
static int PHP_URL_SCHEME
           
static int PHP_URL_USER
           
 
Fields inherited from class com.caucho.quercus.module.AbstractQuercusModule
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
 
Constructor Summary
UrlModule()
           
 
Method Summary
static Value base64_decode(Env env, StringValue str, boolean isStrict)
          Decodes base64
static java.lang.String base64_encode(StringValue s)
          Encodes base64
static Value get_headers(Env env, java.lang.String urlString, Value format)
          Connects to the given URL using a HEAD request to retreive the headers sent in the response.
static Value get_meta_tags(Env env, StringValue filename, boolean use_include_path)
          Extracts the meta tags from a file and returns them as an array.
static Value http_build_query(Env env, Value formdata, StringValue numeric_prefix, StringValue separator)
           
static Value parse_url(Env env, StringValue str, int component)
          Parses the URL into an array.
static java.lang.String rawurldecode(java.lang.String s)
          Returns the decoded string.
static java.lang.String rawurlencode(java.lang.String str)
          Encodes the url
static java.lang.String urldecode(java.lang.String s)
          Returns the decoded string.
static StringValue urlencode(StringValue str)
          Gets the magic quotes value.
 
Methods inherited from class com.caucho.quercus.module.AbstractQuercusModule
addConstant, addConstant, addConstant, getConstMap, getIniDefinitions, getLoadedExtensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PHP_URL_SCHEME

public static final int PHP_URL_SCHEME
See Also:
Constant Field Values

PHP_URL_HOST

public static final int PHP_URL_HOST
See Also:
Constant Field Values

PHP_URL_PORT

public static final int PHP_URL_PORT
See Also:
Constant Field Values

PHP_URL_USER

public static final int PHP_URL_USER
See Also:
Constant Field Values

PHP_URL_PASS

public static final int PHP_URL_PASS
See Also:
Constant Field Values

PHP_URL_PATH

public static final int PHP_URL_PATH
See Also:
Constant Field Values

PHP_URL_QUERY

public static final int PHP_URL_QUERY
See Also:
Constant Field Values

PHP_URL_FRAGMENT

public static final int PHP_URL_FRAGMENT
See Also:
Constant Field Values
Constructor Detail

UrlModule

public UrlModule()
Method Detail

base64_encode

public static java.lang.String base64_encode(StringValue s)
Encodes base64


base64_decode

public static Value base64_decode(Env env,
                                  StringValue str,
                                  boolean isStrict)
Decodes base64


get_headers

public static Value get_headers(Env env,
                                java.lang.String urlString,
                                Value format)
Connects to the given URL using a HEAD request to retreive the headers sent in the response.


get_meta_tags

public static Value get_meta_tags(Env env,
                                  StringValue filename,
                                  boolean use_include_path)
Extracts the meta tags from a file and returns them as an array.


http_build_query

public static Value http_build_query(Env env,
                                     Value formdata,
                                     StringValue numeric_prefix,
                                     StringValue separator)

parse_url

public static Value parse_url(Env env,
                              StringValue str,
                              int component)
Parses the URL into an array.


rawurldecode

public static java.lang.String rawurldecode(java.lang.String s)
Returns the decoded string.


rawurlencode

public static java.lang.String rawurlencode(java.lang.String str)
Encodes the url


urlencode

public static StringValue urlencode(StringValue str)
Gets the magic quotes value.


urldecode

public static java.lang.String urldecode(java.lang.String s)
Returns the decoded string.