Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Aug 2015
    Posts
    2
    Member #
    51416

    Question How can i list all the links from 1 website?

    Hello Everyone,

    i've got to the point where i need to know how can i list all the links from 1 website.
    I don't need pictures maybe the title of the link like this:

    The Race to Zero: Looking for the Last Ebola Patients in Liberia

    OR

    The Race to Zero: Looking for the Last Ebola Patients in Liberia
    https://news.vice.com/article/the-ra...nts-in-liberia

    OR just the link

    https://news.vice.com/article/the-ra...nts-in-liberia

    I want to have the all the links on 1 page. If i say i need the links from https://news.vice.com/article all the links should be listed without any content just the links

    I've used for long time ago this code for google "intitle:mp3" i don't remember so good, but is this possible also to list 1 specific website like the mp3 -s?

    I don't know to much about web pages, so please help me with this question.

    Thank You guys!

  2.  

  3. #2
    Banned
    Join Date
    Jul 2015
    Posts
    16
    Member #
    50993
    Liked
    1 times
    if you know a little php you can do this with dom

    $html = file_get_contents('bookmarks.html');
    //Create a new DOM document
    $dom = new DOMDocument;

    //Parse the HTML. The @ is used to suppress any parsing errors
    //that will be thrown if the $html string isn't valid XHTML.
    @$dom->loadHTML($html);

    //Get all links. You could also use any other tag name here,
    //like 'img' or 'table', to extract other tags.
    $links = $dom->getElementsByTagName('a');

    //Iterate over the extracted links and display their URLs
    foreach ($links as $link){
    //Extract and show the "href" attribute.
    echo $link->nodeValue;
    echo $link->getAttribute('href'), '<br>';
    }


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Tags for this Thread

All times are GMT -6. The time now is 07:42 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com