http_build_url
http_build_url copied to clipboard
Provides functionality for http_build_url() to projects without pecl_http.
I haven't written PHP in years and it seems there are people still using this. If someone from the PHP community is interested in taking over this I will happily...
Hello, I'm sorry, I don't know if this is a real bug, and if the original function (of pecl) has same output, i never work with it Anyway: http_build_url([ 'user'...
Fixes #25
Example: ``` http_build_url( "http://site.testing.com/apreview/testing/a/09-20a13/pa0a4/?code=asdfghjkl", array('path' => 'image/15.jpg'), HTTP_URL_JOIN_PATH | HTTP_URL_STRIP_FRAGMENT | HTTP_URL_STRIP_QUERY ); ``` Results in: ``` 'http://site.testing.com/preview/testing//09-2013/p04/image/15.jpg' ```
Do not add leading slash to path if host is not set or empty (see also #14).
There have been many commits since v1.0.0. ;-)
I have compared PHP 5.5 with PECL HTTP 1.7.x installed and this current repo. I have corrected the differences so it behaves the same with regards to HTTP_URL_JOIN_QUERY, HTTP_URL_JOIN_PATHS and...