Ask a Question related to Dreamweaver AppDev, Design and Development.
-
...Adam #1
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
-
"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... -
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"... -
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... -
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... -
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... -
Joe Makowiec #2
Re: Anyway to "pull-in" data from a website?
On Tue 10 May 2005 06:26:21p, ...Adam wrote in
macromedia.dreamweaver.appdev:
What you want to do is called 'page scraping'. The theory is fairly> 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?
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



Reply With Quote

