Anyway to "pull-in" data from a website?

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Anyway to "pull-in" data from a website?

    I'm using php/mysql.

    Is there anyway to have a page that will get the data from another webiste
    page? For example, I want to have a page that will get the latest posts in
    a Google Group?

    Thanks.


    ...Adam Guest

  2. Similar Questions and Discussions

    1. "Your role in this website is no longer valid" errormessage.
      Hello all, Several of my clients have recently begun reporting that they are receiving this error message: "Your role in this website is no...
    2. How do you make "Images > From Website" available tonon-admin users?
      From the admin side, we are able to insert pictures using Images > From Website rather than going into shared assets. However, the "From Website"...
    3. Form processing: change the "action=" based on pull down menu
      Hi group - I have an html form for that uses username and password to login to a specific area of the website. The "area" the user wants to go to...
    4. Need help with disjoint rollovers and adding text to a "one page website"
      I've created a website with only one document, which i saved and then exported as a .htm document, then i erased all the text in it, put some new...
    5. convert visual basic "string" data type to DB2 "blob"
      Does anyone know if a visual basic string data type can be converted to DB2 blob datatype? I have all data in XML files and I use Visual Basic to...
  3. #2

    Default Re: Anyway to "pull-in" data from a website?

    On Tue 10 May 2005 06:26:21p, ...Adam wrote in
    macromedia.dreamweaver.appdev:
    > I'm using php/mysql.
    >
    > Is there anyway to have a page that will get the data from another
    > webiste page? For example, I want to have a page that will get the
    > latest posts in a Google Group?
    What you want to do is called 'page scraping'. The theory is fairly
    simple: open the page using PHP; search the page for what you want; output
    that into your page. For example:

    <?php
    // Scrape example.com page for my information
    $i=0;
    $url = "http://example.com/index.php";
    $filepointer = fopen($url,"r");
    if($filepointer){
    while(!feof($filepointer) {
    $buffer = fgets($filepointer, 4096);
    if (preg_match("myregex",$buffer,$matchLink)) {
    $myline[$i++] = $matchLink;
    } // End If
    } // End While
    fclose($filepointer);
    } else {
    echo("Could not create a connection to example.com");
    }
    // $myline now contains what I was looking for
    ?>

    See [url]http://www.php.net/[/url] for information on the relevant functions. Where
    this gets tricky is in:
    a) figuring out a pattern to grab what you want
    b) creating a regex to look for that pattern

    It might be simpler, if the site has an RSS feed, to use that.
    Joe Makowiec Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139