Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Read An HTML Page


It may sound kind of crazy, but I'm trying to see if there's a way php code can 'read' contents of a static HTML page and store the contents into a variable. Is it possible? If so, how?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
When A Search Engine Spiders A Page Does It Read The Raw Code Or The Parsed Html?
When a search engine spiders a page does it read the raw code or the parsed html? I ask as I want to confirm if any text retrieved from a database is 'read' not the php code that gets the data.

View Replies !
Pass The Variable From 1st Page And Read It With Other Name On 2nd Page
I am new to this and learning slowly, but I was hoping someone could give me some quick advice on how to create a variable on one page and have it passed to another to be read as an ID for a mySQL database.

I want to pass the variable "varRevID" from one page and have it read as "reviews_id" on the other.

My database is pulling from just the first record and I would liek to designate from the pointing page which record to pull from.

View Replies !
Read From A Html Site
I want to read a html site on the net. And the php script must catch (or better parse?) all the data between <td> </td> to put it in a txt file. Can anyone of you help me out?

<TABLE bgColor=#cccccc border=1 cols=5 width="100%">
<TBODY>
<TR>
<TD>Gabler Joachim</TD>
<TD>&nbsp;</TD>
<TD>Goethestr. 5, 14163 Berlin</TD>
<TD>&nbsp;030-809729-0</TD>
<TD>&nbsp;</TD></TR>
<TR>
<TD>Gabriel Christian</TD>
<TD>&nbsp;</TD>
<TD>Otto-Suhr-Allee 97, 10585 Berlin</TD>
<TD>030-3416024</TD>
<TD>030-3419042</TD></TR>.

View Replies !
How Can I Get Php To Read A Html Extention?
I would like to get php to parse a regular .html page. I just don't know where and which file I need to edit to add the html?

View Replies !
How To Get .html/.htm Extensions Read As .php
I have a site with a lot of preexsisiting links/pages that are of the .htm, .html extension but they need my basic php functions added to them.  Anyone know how i can get them read as .php without having to rename every page and link?

View Replies !
Read HTML Or TXT File
Does anyone know if this is possible? Script reads a HTML file or a TXT file and output the data to MySQL database.

View Replies !
Read Html Table With Php
how to read an html table with PHP and parse it. I have numerous web pages, each containing one html table and with one .gif graph.

I want to parse the html table and insert as a record into mysql. Unfortunately, it is not in XML which would make this easier.

View Replies !
Read File With Html
I have a PHP program that throws some text into a file.

Later I display it using the code below (php and html).

But I'm trying to hop up the code a little and would like to bold/blink/underline just a few lines of the output.

I've inserted the
HTML Code:
<b> xx </b>
into the file along with the text at selected points.

When it reads it it just puts HTML Code:

</b> </i> </blink>

right onto the screen.

PHP Code: ....

View Replies !
How To Read HTML Email Text?
I've done a couple of hours web-searching without turning up many
answers so far, and I guess I could figure it out (eventually) from
the MIME format, but here goes with my question...

I don't have any problems reading text emails, but can anybody direct
me to some PHP source code that will read (the text inside) an HTML
email, specifically the "From", "Subject" and especially the message
body?

I would like the code to be able to differentiate between (i.e. know
that it is) a text or an HTML email, and I would like the code to
ignore any attachments.

I don't expect the incoming email to have any (or large) attachments,
but I hope that any code samples can handle the possible case of big
attachments coming along for the ride.

Incidentally, if I did (not this time) want to handle large
attachments, can PHP and/or servers handle megabytes of data being
read into a string variable through fread()? I'm just getting into
this stuff, and not sure of what areas would be a resource and/or
performance hog.

View Replies !
Analyze And Read In Html File
what i want is something similar to th simple-xml extension of php, but for
html.

I have to analyze and read in certain tags from a html file in a comfortable
manner.
Is there a php extension/library which makes this possible?

View Replies !
Read Html/txt Mail From Postfix Queue
I'm looking for a php class script that display hmtl+txt mail from postfix queue.

View Replies !
Read A Directory Files, And Create Echo HTML?
i have a foo/ directory and a foobar/ directory, and a barfoo/ directory in root/

for each directory in root, i'll put x or y or z amount of images in each directory. then, have the php write 01.html with the correct links to a) main image, b) thumb images and prev/fwd links.

we could have separate php files to handle the drawing of the new sequenced .html files in each directory (probably best to pass variables), because they're slightly different, or one to rule them all (sounds like too much work).

then, the syntax would need to be sorted out (so index.html has a link to foo/foo.php?=foo01) would work correctly and draw up 01.html with the correct images, being that index.html would probably have to have hardcoded variable-passing links. eh?

it's sweet, 'cause updating would be fast. upload and delete image files. done. I mean, I know that you could go the database/XML route, but sigh ........

View Replies !
Setup My Htaccess File To Read My Html Files As Php.
I am trying to setup my htaccess file to read my html files as php. How would I do this, or where can I find how to do it?

View Replies !
Read Part/top Of A Remote Output Html File
I'm using file_get_contents{URI) to read/use data in my scripts.

View Replies !
Is It Possible To Read ASP.NET Web Page In PHP?
Is it possible to read another web page in PHP?
If is ASP.NET, the code would be
------------
WebRequest req=WebRequest.Create("http://www.microsoft.com");
WebResponse res=req.GetResponse();
StreamReader sr = new StreamReader(res.GetResponseStream());
String Output=sr.ReadToEnd();
Response.Write("The content is : " + Output);
--------

View Replies !
Read A Web Page
i want to store(read) the contents of a "web page" into a file. how can i do it in PHP. Please help me. The web page contains a table. i want to fetch & store the contents of that table into a file.

View Replies !
Read A Web Page And Then Display
I'd like to read a webpage, the parse it and display a small part of
it. Here is what I've tired. It isn't working.

<?php
$handle = fopen("http://www.yahoo.com/", "r");
$contents = fread($handle, filesize($filename));
echo $contents;
?>

View Replies !
Q: Read Text With VBA From A PHP Web-page
I created a page on our intranet that shows a number and that
increases for every time the page is opened. It is similar to a
visitors-counter.
When I look at the page with Internet Explorer it works just fine.

Now I want to read this web-page from a MS-Word macro and include the
number as a company wide unique id in my MS-Word document.
Unfortunately, the PHP script doesn't update the counter when I call
it from my MS-Word macro.

How can I force PHP to update my counter when I call it from a VBA
macro?

I am using the following code:

View Replies !
Load Page Then Read
Is there a way to completely load the page of its HTML elements then read all those elements into a string? For example, I have a PHP page that get its HTML content from the database. I want that page to completely loads, ie., get the content from the database, then write all of that page's text and html elements into a string so I can modify it (ie. remove all the links) to display it in another page.

View Replies !
Read Previous Page Url
I have a query regarding browser url.Let me narrate the exact scenario which i need. I would like to expire my session when a person enters different url in the navigator bar other than my url and comes back to my url. For example if i visit example.com and then i type gmail in the same navigator bar and then move back to my url example.com through browserback button then i have to end the session of my client i mean he has no more access to my site. The same scenario is there for icicibank.com. I wanna the code using php and javascript.

View Replies !
Read Page To Variable
I have tried tons of functions but none works the way I want. I have a page foo.php. Then in that I set a couple of variables. Now, if I include foo.inc.php that file can use all of these variables. Code:

View Replies !
Code To Read A Web Page
How can I read another web page in php. I tried:

$url = 'http://www.yahoo.com'
$contents = file_get_contents($url);
echo $contents;

but I get an error: The specified CGI application misbehaved by not returning a complete set of HTTP headers.

View Replies !
<link:page.html,xxx> => <a Href="page.html?id=xxx">
I want to transform this code <link:page.html,xxx> to

<a href="page.html?id=xxx"> dynamically.

I tried out alot of preg_replace stuff, but I didn't get to manage it.

View Replies !
Which Function Do I Need To Read The Page Through Http?
I need read the html page through http and extract the links from it. Which function is better to use for this purpose: fopen() + fread(), file_get_contents(), or fsockopen()?

View Replies !
Read Data From External Page?
I have tried to think of a solution to this problem, but i can't find it. My question is: If possible, how do you from your own page confirm that a form has been send from an external page?

View Replies !
Page Not Read By Conditional When In Sub Folder
I'm using some php conditionals in included footer.

I identify some pages at the top with -

$page='alt_footer'

then have a conditional in the footer.php, like -

if ($page!='alt_footer') {

All works great, but if I put the page in a sub directory (making path adjustments for the includes), it is not recognized as having $page='alt_footer'

All path relationships between the page (in sub folder) and the includes (in folder at same level as sub folder) work fine, just the conditional (from the include to the page) is not recognized.

View Replies !
Embed Php Generated Html In Another Html Page
I am trying to include some php generated html in a page that is just a standard html file, NOT a php file. I have seen other html pages do this by including an src to the cgi script in script tags, like this:

<script src="http://someurl.com/somescript.cgi"></script>

the html page loads and the script is executed and the returned html is displayed in the calling page. So, I tried this:

<script src="http://someurl.com/somescript.php"></script>

It doesnt work!!

View Replies !
.html' Page Be Replaced By '.html.php'
Can a '.html' page be replaced by '.html.php' page via RewriteRule? To clarify, I'm using a software that formats the look of the site using .html pages. I'd like to add PHP code to that page but of course, it is not of the right page type.

What I was wondering is Could I create a duplicate of that '.html' page, rename it to .g. '.html.php' and make the revisions and then just create a RewriteRule that redirects the '.html' page to the '.html.php' without generating an error?

The alternative and undesired way of doing it would be to rename the original page to '.html.php' and find and revise ALL of the routines that call that page. That would create a revision nightmare especially upon upgrading the software.

View Replies !
Can't Read Remote Web Page From Local Apache/PHP
I'm trying to read the contents of any Web page on another
host. I'm finding that...

echo file_get_contents( 'http://www.php.net' );

.... works fine if I upload the PHP script to my Web host, and run it
there. But if I run it on my PC, which is running Apache 1.3.33
(Win32) and PHP 5.0.5, then it always times out, and gives me the error
message...

[error] PHP Warning: file_get_contents(http://www.php.net) [<a
href='function.file-get-contents'>function.file-get-contents</a>]:
failed to open stream: A connection attempt failed because the
connected party did not properly respond after a period of time, or
established connection failed because connected host has failed to
respond.

I get the exact same results using...

$fh = fopen( 'http://www.php.net', 'r' ) or die( $php_errormsg );
while (! feof($fh)) {
$page .= fread($fh,1048576);
}
fclose($fh);
echo $page;

Anyone know what could cause this to happen?

View Replies !
Page Redirection - Link Index.html Page To A .php Pag
I have an index.html page with a link to a .php page This is the complete code of the .php page Code:

View Replies !
Read The Page Of The Site & Rerturn The Contents Of MEMBERS_URL & MEMBERS_NUMBER
a line on my site reads MEMBERS_URL="my2ndsite.com" MEMBER_NUMBER="12345" . Im Trying to read the page of the site & rerturn the contents of MEMBERS_URL & MEMBERS_NUMBER, but i cant get it to work can anyone suggest where ive gone wrong please PHP Code:

$myfile = file("http://www.mysite.com");
foreach ($myfile as $row=>$data) {
if (preg_match('/MEMBERS_URL="(.*?)" MEMBERS_NUMBER="(.*?)"/',$data)) {
echo $data[1];
echo $data[2];
}
}

View Replies !
Passing A Parameter From An HTML Page To A PHP Page
I want to pass a language value (EN/FR/DE etc.) from an Index HTML page to a PHP page with a language code in the call, so that the PHP page can select texts in that language. I would like to to it from an unordered list item if possible by extending the link ... <li><a href="scripts/pricelist.php???>Pricelist[/url]</li>

View Replies !
Using PHP To Load Another Page Or Html Page
Ive got a PHP script, which if it ends correctly, i want load another
PHP file or an HTML page automatically, ie without user intervention.
The new page shoud replace the current page on the browser. Is there a
PHP command or function which does this?

View Replies !
HTML Web Page Hyperlink To Php Web Page
I am still having a problem parsing a html page with php. Code in my HTML
is
<? php
echo '<a href="index.php">Home</a><br />
<a href="login.php">Login</a><br />
'
?>
However the link is to the Login page is:
file:///C:/Program%20Files/Apache%20Group/Apache2/htdocs/TeeJayUu/login.php

I am using PHP 5.0.2, Apache 2.0.52, MySQL 4.0.21, and Windows XP SP2. All
pages are in the htdocs folder and the following instructions have been
followed:
- Copy php5apache2.dll to Apache's module dir and rename it to mod_php5.so;
- Copy php5ts.dll to Apache's bin dir.
Finally, add the following line to your httpd.conf file:
LoadModule php5_module modules/mod_php5.so
Apache has been stopped and restarted.
Help - I am lost for what else to do. I want to keep this local until I
have got it working.

View Replies !
If Page = 'about' Show The About.html Page?
I wanted to do some kind of PHP script so that if the current page the viewer is trying to view is called index.php?page=about then it will use the php script to embed with an i-frame the about.html file into a cell in my web page's table. Basically, so that the whole page stays the same other than one cell of the table which is dynamic depending on the status of the index.php?page=whatever. Code:

View Replies !
Send Value From CSS Html Page To PHP Page
help me to find a way or script to pass value "digit" from CSS html page to php page which has funtion to accept value and search in database. for example, in CSS rollover image map. if a user select on particular place, that should call PHP page as well as send value to php page.

View Replies !
Email With Attachment - Annot Be Accessed. The File May Be Read-only, Or You May Be Trying To Access A Read-only Location.
It is a basic email with an attachment. The email and attachment are getting sent and received ok. When the recipient tries to open the attachment, the right application opens (eg. Excel) but then throws up an error. I am using base64 encoding. For example:

.xls file with base64 encoding:
'testing.xls' cannot be accessed. The file may be read-only, or you may be trying to access a read-only location. Or, the server the document is stored on may not be responding.

.pdf file with base64 encoding:
There was an error opening this document. The file is damaged and could not be repaired.
so the file isn't being decoded right. I have tested on Yahoo and Outlook. PHP Code:

View Replies !
Fgetcsv Returns False In Dynamic Read Vs. Hard-coded Read ??
I am working with directories in PHP for the first time. I have code
that I've changed multiple times to try different things. I would think
this is pretty standard fare so I'm not sure why I can't seem to get it
right.

What I would like to see happen:

The code opens the directory and loops through the files, opening them
and processing them.

What is happening:

If I hard code the name of one particular file (it is always the same
file) in my test setting, fgetcsv does not return false and the code
runs fine. The file is parsed and all is well. However, if I let the
code open a directory and then loop through the files, this one
particular txt file does not work. For debug purposes, I have it
displaying each file name and it can display the name, it just won't
process it.

I've even tried setting a for loop and hard coding each file name
(since right now I know the names - I won't in the future) and the file
is processed. It is only when it is set to my $file var dynamically
rather than being hard coded.

Here is the code:
$handle_dir = opendir('../directory_name');
/* loop over the directory. */
$countfile=0;
while (false !== ($file = readdir($handle_dir))) {
$countfile++;
$filevalues = "";
//Skip the first two files that where found because they are
"." and ".."
if ($countfile 2) {
//echo $file;
//begin loop through each file name
$handle = fopen($file, "r");
echo "Filename is: $file<BR>";//at this point the
code can print the file name
if (false == ($filevalues =
fgetcsv($handle,6021,','))){
echo 'problems<br>'//for one particular file,
this always displays
}

View Replies !
PHP In Html Or Outside Html Page?
what's better, php code in html page or outside the page in seperate php file...the thing is i have my sql data in that code and i don't want people to see it, can people open up the php files?

View Replies !
Read File - Limit The Number Of Lines To Read
How can I open a file and then limit the number of lines I want to read? say I have a text file and I only want to read line one to get the title of the text within?

View Replies !
Read (and ONLY Read) A Multi-sheets Excel File With PHP.
I want to read (and ONLY read) a multi-sheets Excel file with PHP.
I found so many scripts on the net that I finally don't know what to choose
so... could experimented users help me to directly find the one that I need
?

Here are the two obvious things the script must match :
- free
- can read multi-sheets Excel files

View Replies !
How Do I Add A <? To Page? HTML - <?xml
I am trying to change my site from asp to php. but have encountered a problem The start of my pages have always been:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

My problem is when I add <?xml ... the php parser kicks in and starts complaining.
If I leave the <?xml version="1.0" encoding="iso-8859-1"?> Off the page is displayed but not correctly in IE!

Questions:
1) How can I make php let me add the: <?xml version="1.0" encoding="iso-8859-1"?>

2) Thinking about is I'm not 100% sure why I originally added the <?xml version="1.0" encoding="iso-8859-1"?> (I made the site over a year ago) - does anyone know why it is needed for the page to display correctly in IE?

View Replies !
PHP/html Page
I am building a PHP/html page. when opened it pulls data from an external db and stores it locally as an xml file. The webpage pulls data from the locally stored xml. I need a line that selects the highest # out of these 3 lines on the xml and assigns it a name. On the xml they look like this:

<atm-0>82190</atm-0>
<atm-1>109190</atm-1>
<atm-2>91895</atm-2>

View Replies !
Html Page
I have a page, which I have centered by using:

<center>
<div>
other html
<iframe> </iframe>
</div>
</center>

This is so that the page appears in the centre of every browser resolution, whether 800x 600, 1200 x 768, etc. However, I am using server side scripting to include certain elements on the page. For example, there'a a home page, a contact page, etc. Everything is the same in the page except for the comments in the middle. I've put this in an iframe because absolute positioning won't work very well, i.e. the position is different in every browser depending on resolution.

View Replies !
Read Contents Of An External XML Page And Then Parse Its Contents
I have a URL that generates an XML page. I'm trying to read its contents and parse the information. But, I keep receiving these error messages: Code:

View Replies !
How To Read Up To A Point And Assign The Read Value To An Array.
Open a text file which will look something like this:

QuoteLink 1 http://www.blahblah.com/1651561
Link 2 http://www.etc.com/34324
Link 3 http://www.sdfkjsdf.com/12343423

basically its a "Link n" text followed by a URL text in the format of "http://www.page.com/random numbers"

What I would like the php script to do is to read "Link n" text and output it with the a http link to the URL which follows it. That is it should look something like this in the output:

Link 1
Link 2
Link 3

I have learned how to read a text file with php so far but I have no idea how to make it read up to a point and assign the read value to an array.

View Replies !
Getting Part Of Another HTML Page
I'd like some help with writing a script that grabs part of another HTML page. For example : I want to grab the content of a HTML page that contains the following strings :

<!-- begin --> and <!-- end -->

Then I want to get all the content (including these two tags) that is in between the two tags.

View Replies !
How To Ouput A Html Page To PDF ?
I been able to output data from MySQL page and put in into a generated HTML page using <TABLE>.

Is there any fastest way to convert the HTML page directly into a PDF document for the user to download when the user click on a link, juts like the one (PDF Version / Printable Version) of Devshed.com?

View Replies !
Back To Html Page From Php
How do you go back to the html page you came in from from inside a php
script?

View Replies !
HTML, PHP, Front Page
I use Front Page 2000 to devolp my web content (don't hate me I just happen to like WYSIWYG better than physically writing out the code for HTML (a pain in the butt language :-) ) Anyways does anyone know if I can have it save files as .php instead of .html and use them in the web setup. Also another question how do I get a server to load index.php instead of index.htm?

View Replies !
Redirect To The HTML Page
I have a page which is all PHP processing. It outputs errors via echo.

Since I am using echos for errors, I can not use header("location:http://wwhatever.com") after the code to redirect to the HTML page depending on the success of my operation. The user arrives at this page after clicking a submit button. Form action gets me to the page. The page is all PHP right now.

What is a good way to get around this? I do need the echos in case there are errors - also to keep the user apprised of what is happening in the processing.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved