Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8643797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:08:24+00:00 2026-06-12T12:08:24+00:00

I’m using PHP Simple HTML DOM to scrape the data from a site. just

  • 0

I’m using PHP Simple HTML DOM to scrape the data from a site. just like to know how to get the info separately without getting all together.

using this command i can get the full page.

$html = file_get_html('http://mp3skull.com/mp3/gangnam_style.html');    
foreach($html->find('div#song_html') as $e)
       echo $e->innertext . '<br>';

What i need is to get the Title, URL, time, bites separately.

<div id="song_html" class="show1">
            <div class="left">
            <!-- info mp3 here -->
                320 kbps<br />4:01<br />9.2 mb          </div>
            <div id="right_song">
                <div style="font-size:15px;"><b>Psy - Gangnam style (DJ Pasha Lee & DJ Vitaco remix) - Psy - Gangnam style (DJ Pasha Lee & DJ Vitaco remix) mp3</b></div>
                <div style="clear:both;"></div>
                <div style="float:left;">
                    <div style="float:left; height:27px; font-size:13px; padding-top:2px;">
                        <div style="float:left;"><a href="http://promodj.com/source/3594542/Psy_Gangnam_style_DJ_Pasha_Lee_DJ_Vitaco_remix.mp3" rel="nofollow" target="_blank" style="color:green;">Download</a></div> 
                                                <div style="margin-left:8px; float:left; width:27px; text-align:center;"><a href="javascript:void(0)" onclick="showPlayer_new(11683153, '77380784862db5cfb455861b62fdc62690aca7d2', 'psy', 'gangnam+style')" rel="nofollow" id="lk11683153" class="play_now">Play</a></div>                     
                                                                        <div style="margin-left:8px; float:left;"><a href="javascript:void(0)" onclick="showEmbed_new(11683153, '77380784862db5cfb455861b62fdc62690aca7d2')" rel="nofollow" id="em11683153" class="embed">Embed</a></div>
                                                <div style="margin-left:8px; float:left;"><a href="http://www.ringtonematcher.com/go/?sid=WDLL&artist=psy&song=gangnam+style" rel="nofollow" target="_blank" style="color:red;" title="Send Psy - Gangnam Style Ringtone to your Cell">Send Ringtone</a></div> 
                        <div style="clear:both;"></div>
                    </div>
                    <div id="player11683153" style="float:left; margin-left:10px;" class="player"></div>
                </div>  
                <div style="clear:both;"></div>
            </div>
            <div style="clear:both;"></div>
        </div>

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:08:25+00:00Added an answer on June 12, 2026 at 12:08 pm

    You can do this

    $html = file_get_html('http://mp3skull.com/mp3/gangnam_style.html');
    $list = array();
    $x = 0 ;
    foreach ( $html->find('div#song_html ') as $e ) {
    
        $song = array();
        $song['bit'] = preg_replace('!\s+!', ' ',$e->find('div', 0)->plaintext);
        $song['title'] = preg_replace('!\s+!', ' ',$e->find('div', 1)->plaintext);
        $song['url'] = preg_replace('!\s+!', ' ',$e->find('a', 0)->href);
        $list[] = $song;
    }
    echo "<pre>";
    print_r($list);
    

    Output

    Array
    (
        [0] => Array
            (
                [bit] =>  320 kbps 4:01 9.2 mb 
                [title] =>  Psy - Gangnam style (DJ Pasha Lee & DJ Vitaco remix) - Psy - Gangnam style (DJ Pasha Lee & DJ Vitaco remix) mp3 Download Play Embed Send Ringtone 
                [url] => http://promodj.com/source/3594542/Psy_Gangnam_style_DJ_Pasha_Lee_DJ_Vitaco_remix.mp3
            )
    
        [1] => Array
            (
                [bit] =>  320 kbps 4:01 9.2 mb 
                [title] =>  Psy - Gangnam style (DJ Pasha Lee & DJ Vitaco remix) - Psy - Gangnam style (DJ Pasha Lee & DJ Vitaco remix) mp3 Download Play Embed Send Ringtone 
                [url] => http://promodj.com/download/3608444/Psy_Gangnam_style_DJ_Pasha_lee_DJ_Vitaco_remix.mp3
            )
    
        [2] => Array
            (
                [bit] =>  128 kbps 4:21 3.98 mb 
                [title] =>  Psy - Gangnam Style (Boys Electro Mash-Up) - Psy Gangnam Style Boys Electro Mash Up mp3 Download Play Embed Send Ringtone 
                [url] => http://promodj.com/download/3614746/Psy_Gangnam_Style_Boys_Electro_Mash_Up.mp3
            )
    
        [3] => Array
            (
                [bit] =>  128 kbps 4:21 3.98 mb 
                [title] =>  Psy - Gangnam Style (Boys Electro Mash-Up) - Psy Gangnam Style Boys Electro Mash Up mp3 Download Play Embed Send Ringtone 
                [url] => http://promodj.com/source/3614746/Psy_Gangnam_Style_Boys_Electro_Mash_Up.mp3
            )
    
        [4] => Array
            (
                [bit] =>  192 kbps 2:53 3.97 mb 
                [title] =>  Jewish style Official parody to PSY GANGNAM STYLE MISSION ARIO REMIX DEMO FUNNY mp3 Download Play Embed Send Ringtone 
                [url] => http://promodj.com/download/3623591/Jewish_style_Official_parody_to_PSY_GANGNAM_STYLE_MISSION_ARIO_REMIX_DEMO_FUNNY.mp3
            )
    
        [5] => Array
            (
                [bit] =>  192 kbps 2:53 3.97 mb 
                [title] =>  Jewish style Official parody to PSY GANGNAM STYLE MISSION ARIO REMIX DEMO FUNNY mp3 Download Play Embed Send Ringtone 
                [url] => http://promodj.com/source/3623591/Jewish_style_Official_parody_to_PSY_GANGNAM_STYLE_MISSION_ARIO_REMIX_DEMO_FUNNY.mp3
            )
    
     ........ so many more 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I would like to count the length of a string with PHP. The string
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.