Jump to content

Search the Community

Showing results for tags 'url extraction'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hy guys. I'm busting my head with this for whole day. I try to extract the first url that is written in my content (wordpress post). http://soundcloud.com/seq_dragos-1/survivor-eye-of-the-tiger [ By Survivor | <a href="http://www.lyrics007.com/Survivor%20Lyrics/Eye%20Of%20The%20Tiger%20Lyrics.html" target="_blank">Lyrics</a> | <a href="http://www.amazon.com/The-Rocky-Story-Soundtrack-Anthology/dp/B00000HZY2/ref=sr_1_1?ie=UTF8&qid=1353265582&sr=8-1&keywords=the+rocky+story" target="_blank">Get the album</a> ] So, I have this URL I want to extract: http://soundcloud.co...ye-of-the-tiger on a first line. I tried dozens of solutions. From regex and preg_match to parse_url... At the moment I have this code: unction parseAudio($path){ $parsedUrl = parse_url($path); if($parsedUrl['host'] == 'soundcloud.com' || $parsedUrl['host'] == 'www.soundcloud.com'){ // for soundcloud $embedUrl = parse_url($path, PHP_URL_PATH); echo "http://soundcloud.com$embedUrl"; } } This code kind of does what I want. I get this: <iframe width="580" height="435" src="http://soundcloud.com/seq_dragos-1/survivor-eye-of-the-tiger____[ By Survivor | <a href="http://www.lyrics007.com/Survivor%20Lyrics/Eye%20Of%20The%20Tiger%20Lyrics.html" target="_blank">Lyrics</a> | <a href="http://www.amazon.com/The-Rocky-Story-Soundtrack-Anthology/dp/B00000HZY2/ref=sr_1_1" frameborder="0" allowfullscreen></iframe> Problem is that path doesn't stop after URL. It continues on to the text. What can be done with this? Please, if anybody has any idea, share it. Thank you!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.