Answer the question
In order to leave comments, you need to log in
How to get an absolute link from a relative one when parsing?
I am using phpQuery. Maybe there is something in it? I can use something else.
Answer the question
In order to leave comments, you need to log in
I don't write in PHP myself, so I googled it and was quite surprised that I couldn't find anything other than this:
https://github.com/monkeysuffrage/phpuri
Alternatively, you can write the function yourself
After all, you are parsing a certain url with a curl, or no matter what. It should contain some kind of "$_SERVER['HTTP_HOST']", i.e. the domain. This is the missing part of the url. You can glue it in this order: http://(host)/(your relative url).
But maybe I misunderstood your question.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question