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> </TD>
<TD>Goethestr. 5, 14163 Berlin</TD>
<TD> 030-809729-0</TD>
<TD> </TD></TR>
<TR>
<TD>Gabriel Christian</TD>
<TD> </TD>
<TD>Otto-Suhr-Allee 97, 10585 Berlin</TD>
<TD>030-3416024</TD>
<TD>030-3419042</TD></TR>.
View Complete Forum Thread with Replies
Related Forum Messages:
Converting A PHP Site To A Total Static HTML Site
What's the best way to convert a PHP site to a total static HTML site? You might wanna ask why I wanna do this. Reason: I would like to create an offline version (without server) for demo purposes. Looking at my current PHP site, I am having problem dealing with this issue.
View Replies !
Read The Keywords From A Site
I like to read the url and the keywords from an url an write them in an MySQL Database. But i didn't now how i should start this. Is anybody there who can help me a little.
View Replies !
Keeping Track Of What A User Has Read On A Web Site
The goal is to keep track of what a user has and hasn't read and present him or her with new material I am currently doing this by aggregating new content from all databases into a single indexed database and then saving a timestamp in the account database (for the current user) that tells me when the user last read items in the aggregated database. This works as designed, but I don't have detailed control. If the user opens the page where new items are listed and reads on of the items (and don't reset the timestamp), that item won't be removed from the list. This is evident when I want to have a function in my page that alerts the user if there is new content of a specific kind (for example: "1 new articles on cooking"). That function will report that until the user has reset the timestamp (by visiting the 'what's new?' page that lists all new articles). I can't mark just this article as 'read'. So, what options do I have? Well, each item have an ID, so if I should keep track of read/unread I should base that on the IDs in the aggregation database. Looking at how newsreaders (specifically those that make use of a .newsrc file) do it, they keep track of series of ID's, like "12,14-67,69" - which in my case could mean that the user has read the items with ID 13 and 68. The aggregation database looks something like this: ID | Kind | Headline | Original ID ------+-------------+-------------------------------+------------ 1 | article | Home made pie | 23 2 | article | Hamburgers a'plenty | 24 3 | forum | Anyone likes strawberries? | 298 4 | comments |*Re: Home made pie | 67 Get the idea? The ID is the id in the aggregated database, the kind is from what original database the content came from and the original ID is the id in that database So, if I go and read "Hamburgers a'plenty", it should perhaps update my profile to say "1,3-4" or somesuch to note that I have read id number 2. Or perhaps I should just keep track of all the IDs I have read? The aggregate database keeps content around for about a month, which could mean thousands of items. I am guessing that a MySQL query that looked like this: "select * from aggregate where id not in(1,2,3,4,5,6,7,8.....1678)" would be bad. So, I am wondering how YOU would have done - Or are you already doing this in one way or the other? One way - I suppose - would be to make on SQL query that fetches all the (potentially thousands) of ID's and all the headlines and puts them in an array and then I run that array in a PHP function that filters out items based on the "1,4-7,12-78" filter. I would also have to build PHP functions to maintain these lists, but that's a minor problem.
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 !
Build An Email Client For A Site So Users Can Read Emails Sent To Them.
I'm trying to do is build an email client for a site so users can read emails sent to them. I think converting the emails to db entries would be the best way to go (if that's wrong let me know). So I'm thinking. emails will be forwarded to a different site, that has imap installed, converted and then added to a database (via cron job) on the first site to be read by users. But I can't find any starter code to convert emails to mysql entries.
View Replies !
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 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 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 !
Site Html Search With Php?
My client ask me to make a search at his site to search the site. Now we have a PHP part that is connected to mysql database wich I will search through SQL query, and a HTML part wich also contains product data but is in plain html. Any ideas on how can I make search with php to search that html part of site ? Or is there some other common way to search html sites for specific word ? I see google search to search the site on some websites , how is it done ? Can I do it like that ? Some applet ? What is the best way you suggest?
View Replies !
Converting A Site From *.html To *.php.
A friend and I are converting a site from *.html to *.php. The site already recognizes the *.php files - and the most current version of PHP is running on the server (*.nix). We plan to leave the *.html files in place, due to their inclusion in search engine databases and user bookmarks. Here are my questions, that I would appreciate your help with: 1). Are there any problems or issues that I should be concerned with, considering that I might have both an index.php and an index.html in the directories at the same time (unless there is a better way)? 2). Is there any search-engine-friendly way to add refresh statements (meta or javascript) to some of my html files? If so, please share code example. [I'd only add the refreshes to those pages that are a part of the main site structure - i.e. index.html files in the directories.] 3). If I have to go the parsing html as php method... Is the "AddType application/x-httpd-php .html" statement valid to be in the "current version of PHP's" httpd.conf file? Or, does it need to be like this "AddType application/x-httpd4-php .html" (with the Ɗ' included)? Also, is that all that is needed to make PHP parse *.html as *.php? [By the way, I am somewhat aware of the .htaccess method.] 4). Does anyone have any examples of how speed is affected by having the *.html files parsed as PHP files? If so, please share.... [Speed is of big concern...] I appreciate your help with this. I need to upgrade this site and there are hundreds of pages that are currently in the search engines that I do not want to interfere with. I know that I can keep the html pages and have them parsed as php, but I have already built much of the new site (with many links) with php extensions. So, I planned to drop the new site in the directories with the old site. Pages that are not a part of the main structure (main, products, contact, news, .... and other index.html pages, I will just change the links in them to point to the new index.php pages -- but the main index.html will have to remain and have links updated and/or refresh code). I really need to find some straight-forward help with this, so that I can do it in a way that will not hinder the site's standing in the search engines.
View Replies !
Parse A Html Site
does anybody know a script that cachtes any data from a web site (html) and put it in a csv or something? I think parse is here the magic word or?
View Replies !
Mystery Php In Html Site
I have a site I built for a client that is not doing well at all in the search engines and I was poking around in yahoo site explorer and found some mystery pages. This is a 38 page site all in html. No PHP scripting at all. But site explorer has pages listed such as http://www.example.com/?spg=freereports.php . There are about a half dozen of these and tehy all resolve to the index page. I have a severe dup content problem going on. Anyone got a clue as to what I have inadvertantly done? We have several different types of contact forms that are used in frames pages. We do have jscript on them to insure the visitor fills out required info and such but no php.
View Replies !
Get Html From An External Site
I'm a newbie trying to write a script that will get html from an external site (the bit i'm having trouble with) and then encrypt it and display it on screen. I've got a very good encryption script but can't seem to get the external html. This is as far as i've got for getting the html: Code:
View Replies !
How To Get HTML From External Site.
I need to somehow get the HTML source from an external site and use the data from the HTML on my site. The only problem that the information I need in the HTML is generated from a database on the external site, so the information I need is not in the HTML on my site if I use include, fopen etc. I was wondering if there was a way to get the HTML source directly or Cache it somehow?
View Replies !
Extract Records From HTML Of Another Site
First of all let me say I'm new to php. I pieced the following code together from samples I found on the net and a book I bought called PHP Cookbook. So please forgive me if this isn't the best approach - I'm open to suggestions I finally got my code to work that logs into another site and pulls the orderstatus page to my server. <?php /* Login to site */ $ch = curl_init(); curl_setopt($ch, CURLOPT_COOKIEJAR, "/tmp/cookieFileName"); curl_setopt($ch, CURLOPT_URL,"https://www.homier.com/default.asp?page=signin"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "EMail=homierorders@swbell.net&Password=1040ez"); ob_start(); // prevent any output curl_exec ($ch); // execute the curl command ob_end_clean(); // stop preventing output curl_close ($ch); unset($ch); /* Dump html of orderstatus page into a file on my server */ $fh = fopen('raw_orderstatus.html','w') or die($php_errormsg); $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/cookieFileName"); curl_setopt($ch, CURLOPT_URL,"https://www.homier.com/default.asp?page=orderstatus"); curl_setopt($ch, CURLOPT_FILE, $fh); curl_exec ($ch); curl_close ($ch); ?> My problem: How can I capture only the data in the "<td class='n8n_CCCCCC_default>" tags? Is there a way to do this at file creation? I checked with my ISP and I can't use LYNX -DUMP file.html The goal here is to load these records into MYSQL database.
View Replies !
Include Html From External Site
I am trying to embedd html code in to a php page from an external site in a external server using the basic include('URL');. I get the following messages Warning: main(): php_network_getaddresses: getaddrinfo failed: Name or service not known Warning: main(URL): failed to open stream: Does anyone know anything about teh is subject? is it possible to do this. If not what are the other options?
View Replies !
Convert Php Site To Static Html?
I have a fully functioning php/MySQL application running and in production. We would like the option to distribute the application and data therein via CD. Obviously the recipients wouldn't have php/apache/mysql installed in their system, nor would we want to do it for them. This is for a 1 week conference, and the CD would be in lieu of a printed book. Is there something availabe that could crawl my application and archive the data as static pages?
View Replies !
Converting Site From Static HTML
I currently have a web site I'm maintaining which is consists of around 500 static HTML pages. I have been toying with the idea of coverting it to php so I can implement a CMS. My main worry is that once I convert it over I will have to then do 500 redirects on the server so that incomming links won't be lost.
View Replies !
Export Entire Site And Save As HTML
I feel as though I will be covering ground that others have posted, but I have searched and not found much at all. Basically, my site is in PHP/mysql, but before I go online I want to save 95% of the site's output as HTML (basically everything but the search pages). This will be around 4,000 pages. Is there a way I can get PHP to save the output that a scirpt generates as a separate HTML file? What I would like to do is build this feature into my admin menu. Thus, when I make a change to the database, I can pull up the individual record, and click on a button that says "rebuild html pages".
View Replies !
Search Feature On HTML Site W/PHP Capability
I have been asked to add a search feature to an existing site written by somebody else. The site is all plain html. The customer wants to search by keyword and by employee name. I understand how to do this with PHP/MYSQL. The site has PHP capability but the site is currently not MYSQL. Can somebody please give me some pointers on The best way to do a search on a bunch of html source files? Or better yet, is there a prewritten code out there for this purpose that somebody knows about?
View Replies !
Some Problems With HTML Emails My PHP Site Is Sending
I'm creating HTML emails from a PHP site and sending them out to an email list (just about 40 people so far are on this list). I've tested and confirmed that these emails work in yahoo.com's webmail. And I know they work on *my* Outlook Express. But I have one person (I know of) who gets the emails as plain text, so she sees the HTML code for the email instead of its proper representation. She has, like myself, OE6, and other html emails (not necessarily the emails that come from my site, but HTML emails I've sent her directly with my OE), have worked OK. I can't figure it out. I've checked the headers in the emails I've sent her where it came out as plain text (she forwarded them back to me), and the "Content-type: text/html; charset=iso-8859-1" line is present, so it's not a missing header line.
View Replies !
Can A Web Site Customer Edit HTML Content?
I'm happy with the results of a dynamic PHP site for my business. My question is how can I access and edit the HTML inside PHP Shells? I am not about to mess with the PHP or dbase, but I can't afford to call a programmer when I need to change text in a paragraph.
View Replies !
What's A Good Program For Managing A Mixed Html-PHP Site?
Our site, of which about half the content is PHP pages and is on a Linux Apache server, is currently administered with Microsoft FrontPage 2003. Okay, now that you've finished laughing, let me just say it's worked pretty darn well considering everyone says "you gotta be crazy to have FrontPage and PHP/Apache". But the writing is on the wall, considering Frontpage is discontinued, is designed for simpler sites, and there are so many annoying little quirks as a result of Microsoft pretending that PHP doesn't exist. I would like something that lets me edit a plain html page with a degree of WYSIWYG, and launches the appropriate text editor or whatever when I open a php file, and also manages uploading any changed pages. Frontpage does all of these pretty well, though the FPServer Extensions are a bit flaky on our Linux server. Is there such a beast out there?
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 !
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 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 !
Site Flow Chart/site Map Creator For PHP?
I'm working on a site created by someone else, containing a hundred different pages or so in PHP, with connections (includes and form actions) going all over the place. Is there a utility out there that will create a visual site map of all the connecting pages in a site? I tried using Dreamweaver MX 2004's, but the best it can do is see connections in HTML. It'd only go one layer deep and find only a few connections for a total of about 6 pages out of the dozens.
View Replies !
PHP Script On One Site Access A Database On The Other Site.
I own 2 sites on 2 different providers. I wish a PHP script on one site access a database on the other site. I used following instruction: $link = mysql_connect("localhost", "mysql_user", "mysql_password") But I do not know what to put for "localhost", and I even don't know if this could work.
View Replies !
Trying To Make An Iframe Site Into A Include Site
Basically I have a site over at www.allFOTC.com and right now as you can see I'm using all Iframes. It works awesomely for function, but it's gotta be killing my SEO. I'd like to be able to have the same functionality but using php includes so it'll always look like one normal page as far as Search Engines are concerned. Would it be possible to create dynamically changing includes (like when someone wants to watch an ep, JUST the small center block changes to the video) without having to make each page with a full on layout? Right now it's so simple to go find a page I want to edit and only have to look at 5 or 6 lines of code. I'd hate to have to have full layouts on each page and have to fish through all that code to find something.
View Replies !
Site To Site Data Transfer
When a visitor goes to siteb i want it to send information to sitea, in this case lets choose browser type. Eventually I want to have more sites sending data back to sitea. some not managed by somebody that i know i can trust. so mysql passwords etc. cant be given out. I thought about $_GET vars, but there is no way to make that secure from bogus entries, is there? Unless i used some sort of encryption and the decrypt key was at sitea.
View Replies !
Site To Site Content
I am looking for a PHP function that can display content from a separate site preferably with error handling. This is in lieu of using frames. Something similar to the ColdFusion tag cfhttp.
View Replies !
HTML Email Using PHP Problem (Receive Html Tags)
When I send the html email, the only thing I receive is the tags (the html codes basically). I want to be able to see the email like a html page, what is wrong with my code? Here is a copy paste of it. $HTML = "</html><body><img src='http://www.somewebsite.com/ someimage.jpg'></body></html>"; $headers = "From: $from "; $headers .= "MIME-Version: 1.0 "; $boundary = uniqid("HTMLDEMO"); // Now we attach the HTML version $headers .= "--$boundary ". "Content-Type: text/html; charset=ISO-8859-1 ". "Content-Transfer-Encoding: base64 "; $headers .= chunk_split(base64_encode($HTML)); mail($to,$subject,"",$headers); print "mail Sent<br>"; The email I receive has this as text: </html><body><img src='http://www.somewebsite.com/someimage.jpg'></ body></html>
View Replies !
|