PHP Relative Path To Absolute Path Convertor
$30-100 USD
Betalades vid leverans
I need a PHP script that will converts all relative links to absolute links. The script will use a parameter with the url and it should returns the webpage with all links coverted. (it's mandatory to convert css/js/links/images/audio/video content)
It can be used regexp, curl, wget, lynx, etc to acomplish this.
I need a function that will make the conversion.
The input parameter will be an url. The function will check all the paths from the url (css/js/images/links/audios/videos/etc) and if the paths are relative - something like:
[some link][1] ...
the function will convert it to absolute paths - something like:
< a href="http://urlpath/[login to view URL]">some link</ a> The function must detect that if the file requested is in the current folder of the url or in the main folder.
Example:
url: [login to view URL]
content:
< a href="[login to view URL]">some link
converted paths:
< a href="[login to view URL]">some link</ a>
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
Linux/PHP
Projekt-id: #3046801