How can I only get the url from this?
I am getting a lot of emails to remove DMCA for my site and I am trying to automate the process of removing these tracks from my site.
All emails look like this.
http://example.com/title-to-post.html title - to post
http://example.com/title-of-post.html title - of post
http://example.com/some-song-artist-some-song-name.html some song artist - some song name
But there are a lot of them, I only want to return the url of each part of this, like below.
http://example.com/title-to-post.html
http://example.com/title-of-post.html
http://example.com/some-song-artist-some-song-name.html
EDIT: I store these files in a txt file and then call them using standard code.
$urls = file_get_contents( "oururls.txt" );
$data = explode(",", $urls);
foreach ($data as $item) {
echo "$item";
echo '<br>';
}
Nothing really interesting how it would return the title and I only want the url .
+3
source to share