file_get_contents with spaces in URL
I have an issue where even if I replace the spaces to %20 and get this content the ultimate url the browser gets turns the "%20" into "%2520" Here's my code, any suggestions to get this to work? it seems easy but I'm stuck :/ <?php //$_GET['song'] will contain a song name with spaces $song = str_replace(array("%20", "&", "?" , "/"), array(" ", "", "", ""), $_GET['song']); // I use this to check how the GET 'song' looks after the str_replace $list = "http://www.lyrdb.com/lookup.php?q=" . $song . "&for=fullt"; echo "list url is " . $list . "<hr>"; $content = file_get_contents("http://www.lyrdb