Ask a Question related to PHP Programming, Design and Development.
-
Carl Melot #1
extract body-content from HTML page online
Hi everybody,
I need to include an online web page in my own one. My first attempt was to
include() that page. This way all the HTML framework has been included, too.
I'd prefer to include the data inside the body-tags only. What's the best
way to do so?
Regards,
Carl
Carl Melot Guest
-
How to make newbie edit text online on a static HTML page? CMS mandatory?
recipe: a splash of PHP, a smidgen od MySQL mix together with a page or pages that add, update and delete news items and away you go..... ... -
How to update the content of an HTML page in ASP .Net
Hi everyone, I have the following HTML code and I like to change the value of REFRESH content from 2 to something else at runtime. Any... -
[PHP] Extract a little string from a Html page ?
I tried something else but... It doesn't work too :-( . <? php $fichier=implode('',array_map('trim',readfile("http://myurl.com"))); if (eregi... -
How to insert dynamically generated HTML into the <body> of an ASP.NET page?
I need to generate a "buy" button as part of an ASP.NET page - this consists of a small HTML form with hidden fields, conforming to the requirements... -
Inserting dynamic content into an HTML page
Hi Can anyone tell me how to insert, within an html page, content that is returned from an asp page on another server? I've seen it done like... -
Janwillem Borleffs #2
Re: extract body-content from HTML page online
Carl Melot wrote:
<?> I need to include an online web page in my own one. My first attempt
> was to include() that page. This way all the HTML framework has been
> included, too. I'd prefer to include the data inside the body-tags
> only. What's the best way to do so?
>
$file = file_get_contents("http://www.google.com");
$body = preg_replace("/.*<body[^>]*>|<\/body>.*/si", "", $file);
?>
JW
Janwillem Borleffs Guest
-
Carl Melot #3
Re: extract body-content from HTML page online
Janwillem Borleffs wrote...
Thanks a lot!> $body = preg_replace("/.*<body[^>]*>|<\/body>.*/si", "", $file);
Carl
Carl Melot Guest



Reply With Quote

