I have a url like this, https://www.example.com/send?id=1&text=http://example2.com/song.mp3
when I try to get the data of the url using file_get_contents() it shows below error,
PHP Warning:  file_get_contents(https://www.example.com/send?id=1&text=http://example2.com/song.mp3):
failed to open stream: HTTP request failed! HTTP/1.1 501 Not Implemented
and the & have converted to &. due to that the url is not working.
I have tried htmlspecialchars_decode() and preg_replace() on & , but it didn't do anything.
how to solve this ?
 
     
     
    