This question solved my problem only until getting each line from textarea. But when I access the link (what contains in each line) with simplexml_load_file
to get the data, the link started to end with unique codes:
foreach ($textAr as $line) {
echo $line = trim($line)."<br/>"; //I trim it again just to make sure, and the result is the right link.
echo $xml = simplexml_load_file($line)."<br/>"; //code like %3Cbr/%3E showed up at the end of the link
}
And the error is something like:
A PHP Error was encountered
Severity: Warning
Message: simplexml_load_file(link%3Cbr/%3E) [function.simplexml-load-file]: failed to open stream: HTTP request failed!
I replace the real link with link on the error message.
How to remove the unique codes (%3Cbr/%3E)? I've tried str_replace("%3Cbr/%3E","",$line)
but it's not working.
"` I added is the problem. I removed it and add another line `echo $line."
";` Thank you @Ivar – Marsha Nov 05 '15 at 09:32