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 Complete Forum Thread with Replies
Related Forum Messages:
Reading In A Part Of A HTML File
I am working on a script at the moment, and I want to be able to include some HTML snippets that a user can update at any given time. In most cases the snippets will be only a table, but I want to make allowances for the file if it is a full HTML file. What I would like some help in working out, is what would be the best way to read in the file and take all the code after the <body> tag upto but not including the </body>. Is there an eay way of doing this? So that if all I want is the table that is inside the page, that is all I will get.
View Replies !
Page Loades Part Of The Page
the below code is kinda working but its only loading part of the page, when I do a page refresh the rest of the page loads. the part of the page that is not loading correctly is the bottom 1/2 which displays images. Code:
View Replies !
Caching A Part Of A Page?
I am working on a custom banner generator for some of our users. Its basically a flash banner that can take vars for colors etc, so users can integrate with their sites colour scheme. Its set up currently with the banner at the top as a preview, with e.g. .swf?color1=00000&color2=45efef in the object and embed tags. Below this is a script that is 3 nested for loops, that increment a var each and convert that to hexidecimal. The three hex refs are then concat'd together, and set as a CSS background to a transparent gif with an href around that calls the same page with the new colors in the url, which get passed back to the flash movie. (hope im making sense here :)) So theres about 500 or so (im incrementing the vars by two,otherwise its way sloooow) <a><img></a> that have to be generated on each page load. Im wondering how and if i can speed this up?
View Replies !
Refreshing Part Of A Page
Can some one help me if it is possible to refresh a part of a page, without reloading the whole page. Let's say, i want to add a small message box to my webpage. After writing a message, the user presses the send button and i want only this part of the page to refresh and give him a status message saying his message was successfully received.
View Replies !
How To Let Php Reflesh Part Of Page
I want to write some code that when some variable condition is met, it will change a table cell value (only reflesh that value instead of the whole page), I used to think it as calling JavaScript function first, which in turn change that table cell value in the page. But I don't know how to let php call JavaScript, or mimic click button action to call JavaScript.
View Replies !
Selective Rendering Of Part Of A Page
I want to skip the rendering of certain parts of a Web page if the user doesn't have a certain permission (e.g. a cookie). I'd like to do it along these lines: <p>Anybody can see this paragraph.</p> <? start_protected_section($got_permission); ?> <p>Not everybody can see this paragraph.</p> <? end_protected_section(); ?> Is it possible to disable the rendering of a section outside the code like this (perhaps by setting a PHP flag to redirect subsequent output)? I don't really want to complicate things by moving part of the page into a separate "include file" or mixing the HTML and PHP by using a here-document (the <<<END syntax).
View Replies !
Include Specific Part Of Page
i know that the include() function allows you to include a page with php but how do i only include PART of a page like specific tables? what im trying to do is get the certain parts of this page: ...
View Replies !
Need To Copy Text From One Part Of Page To Another
It has been great so far but I hit a road block on one thing and I figured the brilliant minds here could help. This site isn't in a database because its 3000 pages of HTML now and we figured we can do work arounds to make it look right. We are starting a database for future data though Code:
View Replies !
Extract Each Part Of A Page That Are Enclosed In A <b>-tag
I would like to extract each part of a page that are enclosed in a <b>-tag, but ONLY if there are no other tags enclosed. <b>some text</b> <-- a match <b>some text <i>in italic </i></b> <-- should NOT match This is what I have so far: $pattern = "/<b>(.*?)</b>/si"; preg_match_all($pattern, "<b>some text <i>in italic </i></b>", $out); Any thoughts?
View Replies !
Change Part Of A Web Page After X Seconds Delay?
I was asking about how to pass a new array number with a page refresh and someone responded: But what I don't understand is why you want to change images like that on page reload, I have never seen it before. That raised the question to me - if I have written out a web page in PHP that has an image displayed on the page - is there a way to have it change the image every 10 seconds? Could you do this with a For Each or While type loop? I thought once the script was parsed it then wrote the page source and it doesn't change on the screen.
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 !
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 !
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 !
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 !
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 !
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 !
Add A PHP Element To An HTML Page?
I have a .htm page on which I want to add a PHP script that will display links depending on if the user is in session or not. I'm not sure if this can be done on a strictly .htm page, but hey you only live once right? Here's the script I'm attempting to execute: <? if ($_SESSION['auth'] == "yes"){ ?> <a href="/index.php?page=sign_in">Sign In[/url] <? }else{ ?> <a href="index.php?page=logout">Logout[/url] <? } ?> The problem is that I don't know all the back-end php coding for the 3rd party s/w I'm using, but since the design calls for a "main .htm page" that displays all the "include" pages, having 2 links displaying on the same page seems silly (1 link for login and anohter for logout).
View Replies !
Html Page - <style ... > Tag
If i have an html page and i am looking for the <style ... > tag. What would be the best way to look for it? I need to look for a special type, something like <script language="Javascript" type="text/javascript" >....<script> .
View Replies !
Parse Html Page
How can I import a html page with my php script? I have a simple html page that actually just generates a simple table of values. I just want to strip the values to insert in to a database. How do I import the html page to my php script to parse it?
View Replies !
Create HTML Page
I would like to make a form that once you insert data into the form,it ll automatically create a html format of the data you entered in a html and save it in a folder! How do i go by doing this?
View Replies !
Jump To Html Page
I am a php newbe and I am trying to figure out how to simply display an existing html page from my php script. Here is the code I use but I get the normal "output started" errors. $sql = "INSERT INTO author SET firstname='$name1', lastname='$name2', workphone='$workphone', email='$email', loginid='$loginid', password='$password'"; if (@mysql_query($sql)) { header("Location: formSubmit.htm"); <--------HERE
View Replies !
Convert A Html Page To PDF
I need a script that will convert a html page to PDF. The html page is an Invoice which contains tables and images, which i would need tobe converted to the PDF document. All the scripts I've found, all require specific modules tobe installed on the server like html2ps, Curl, pdflib etc. I havent yet found a script thats independent from having non-standard type modules installed. Maybe this is because of the resources to code such an application OR the amount of server resources it would take for php todo everything for the converting?
View Replies !
How To Insert Tab In An Html Page???
i am making one appllication inwhich the user enters text in textarea field. i am saving this value in database and when user accesses value from database, i want to display text in a format entered by user. i.e. if the user has entered some text in 2nd line then it should be displayed on second line and not after the end of first line in continuation. if user has entered tab in some location, the tab will be displayed while viewing data from database.
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 !
Database As Html Page
At both these sites. is there a way to make an .html page for each row of a database,and then to have a directory created automaticall for the date it's in. i thought i saw this done converting to html pages in a forum once. is this clear?
View Replies !
Sending HTML Page
I have a website where people can "join the mailing list" by entering their email address from the home page. THe email address goes into a simple, 1-field db. The field is called "email" and I'd like to write a PHP script to call the entire group of emails, and allow my client to send out a mass email to her list. In other words, maybe she edits the text on her HTML page with the latest "deals" and hits "send" and the script calls the emails fromn the db and, calls in the HTML page and out it goes. I'd like to automate this as much as possible for this client so the PHP works in the background and she is able to keep things very simple on her part. If there is a thread that addresses this task, I'd be interested in seeing it. INitial searches didn't really turn up much.
View Replies !
Html Page - <snip>
im trying to make this option: <snip> a little more easy by instead of having the user click on a number which takes them to an anchor on an html page- having them rather enter in the number of their bday in a field and when they hit enter have the prediction displayed on the page. however i have no clue about php. i do not even really know what question to ask to search for a tutorial about this. really i just want to be able to have a user enter in a number in a field and upon hitting enter have that number pull up and display data from a text file.
View Replies !
|