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.





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 Complete Forum Thread with Replies

Related Forum Messages:
Extracting A Specific Part Of An URL
If I have links in these formats...

1) http://www.somewebsite.com/IWANTTHIS/
2) http://www.somewebsite.com/IWANTTHIS/this-is-unwanted-and-variable/

...and I'd like to extract the IWANTTHIS part (which is not constant) from the permalinks, how do I go about doing this?

I'm trying to find a way to achieve context sensitive menus in wordpress and this seems to be the only way to access the page-slug of pages and posts.

View Replies !
How To Add And Include To A Part Of The Script
How can i add this <? include("http://datadink.sytes.net/m/rate/rate.php")?> to this part of the script PHP Code:

View Replies !
How Does The "./" Part Of The Include Affect The Ability To Include?
I'm working with a script written by someone else, in which all of their includes are written as: include("./file.php");

I'm currently trying to include these files into other files, and am getting "failed to open required file" errors. I do NOT want to go through and modify all these files to remove the "./" part of the includes (which I understand means the current root directory, yes?).

I've tried setting the include path using set_include_path, but it's still saying it can't find the files. If I'm setting the full directory path with set_include_path, how does the "./" part of the include affect the ability to include? Any help or suggestions?

View Replies !
How Do You Include A Variable As Part Of The Name Of A Class
In bash, you can include a variable as part of a filename. For
example:

date=$(date)
cat log.txt > $date"_log.txt"

Which, when setting the right options in date, creates a file named
20040705_log.txt

I am now trying to call a class based on a previously defined variable
set by an array:

1 $field[1] = "first_name";
7 $field[2] = "mi";
8 $field[3] = "last_name";
12 foreach ($field as $field_name) {
13 $var_validate_field = &New "cls_validate_"$field_name;
14 $var_strip_field = &New "cls_strip_"$field_name;
15 $record[$field_name] = $_POST[$field_name];
16 $record_check[$field_name] =
$var_validate_field->fn_validate($record[$field_name]);
17 $record[$field_name] =
$var_strip_field->fn_strip($record[$field_name]);
18 print "<p>$field_name is $record[$field_name] and its check is
$record_check[$field_name]";
19 }

As you can see, I am trying to make $field_name part of the name of
the class, but it is not working. Everything else works fine; I've
tested the classes individually; but the array method will not work
without this.

View Replies !
Include Part Of A Text File
I have a text document that stores text for use in a flash movie. I'm
also using PHP to displace the same text on another page. However the
text document includes 2 tags for use by the flash movie... title= and
&content= ... see text file at end of post ....

when i use the php command <?php include ("info.txt"); ?> it also
displays those tags. Is there any way to use php to just display what
apprars after the &content= in my text file.

I can't remove the tag begause it is required for the flash file
elsewhere on the site.

"
title=CDN HOME &content=The COMPUTER DONATION NETWORK is a resource of
new, used and refurbished computer equipment, software, networking gear
and lab furnishings for "

View Replies !
Include Part Of Website By Using Strip_tags?
i would like to include a static (requested from a search engine) page into another page (in a noframes section). This will create double of <html>, <body>, and other tags that are only supposed to be on a page ONCE.

I found strip_tags() and understand I can put in the tags that are allowed, thereby removing the tags I don't want. I think there is a way to remove what is inbetween the tags that are removed as well (not sure I understand what people write about that).

How do I get it all started?
If I put <?php include ('filename collected through session')?> I will get the entire file, right?
So where do I put strip_tags()?
And what will the server say when the file is over 15 kb?

View Replies !
Include Part Of The File Isn't Working
i have a menu.inc file that i want to use on multiple pages and one of the pages can be found at http://members.aol.com/itsjojofasho/home2.php but for some reason, the include part of the file isn't working when i upload it. but it works when i'm working offline on my computer.

View Replies !
Echo To A Specific Div On A Specific Page
Is it possible to echo something from a php file to a specific div in a different specific html file?If so, can you let me know how to specify where the data should displayed.

$myName="john";

echo '$myName'//but i want to echo to a different page on a certain part of that page.

View Replies !
Specific Include
I have read a lot of posts about the include statement and understand the majority but there is one small thing missing for me. Maybe you could help enlighten me.

I read that I can include htm files or php files. Therefore I have two senarios. 1. If I include using a htm within a htm page, how much do I need to write in that htm file that will be included. Code:

View Replies !
Include The File On All Your Pages In A Specific Directory Recursivly
I have a configuration file called config.php" that I would like all my pages to have. The problem with it is that I have to include it in all my pages and have to specify the exact directory wherever it's located and I have my files throughout different files in the filesystem and it becomes a tedious job.

So my question is, is there a way to have php include the file on all your pages in a specific directory recursivly or is there an apache setting through .htaccess that can maybe pull this off?

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 !
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 !
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 !
Refreshing Certain Part Of Page
I need help with how to get my shoutbox I made to automatically refresh when someone posts a new shout.

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 !
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 !
Loading Part Of Page Using Includes
If I use includes to create a website pages, how can I make sure that the header part I where i have a flash movie, will load only once?

View Replies !
Include (Change Include File Within The Page)
I am working on a website that requires the use of include files, i have the include html files ready and can properly show them in the page but I am looking for a way to have a menu on the page where the user can choose which file he would like to read,

I dont want to have multiple pages I would like to just have the actual php include code change when the user picks the file he would like to read. Anyone know of a way to do this?

View Replies !
Get The Value You Pass From One Page As Part Of The Query String?
How do you get the value you pass from one page as part of the query string i.e

htttp://www.somesite.com/postage.pgp?newsid=2

How you you get the value of the variable in the next page, stumped.

View Replies !
How Do U Code A Printable Output Of A Part Of Your Page?
im trying to develop a website and im wondring how to make a connection with a printer and make a printable version of the page

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 !
Go To Specific Page
I have a search box, then I put in search criteria, got a returned result. When I click on to view that result, I got a page that says "you have to login first". After I login, I want my page to go to that "result page" instead of the member page. Is there a way to do that?

View Replies !
Load A Specific Page
I now have a simple php stylesheet switcher. I will expand on it as my 'kung-fu' gets better,(using some of the ideas you guys posted in that thread), but for now, it will do. Onto my next quandary. Is it possible to always load a specific page or the same page into the browser every time a user returns to my site? I know you can use redirects to push them in a certain direction, but they look a little unprofessional. I'm looking to create something a little more seamless, and a hell of a lot more classy.

View Replies !
Php Form To Allow The User To Enter Part Of A Last Name And/or Part Of A First Name To Display The Data
I'm sure this is not a hard thing to do, but for some reason I can't get my mind to figure this out. I have a database with Name, Address, and Car Type tables. 

I'm just trying to do a simple php form to allow the user to enter part of a last name and/or part of a first name to display the data in the tables. My brain has twisted around this and I cannot figure it out.

View Replies !
Extract Specific Parts Of A Page
I have a js script that runs from a remote location, it displays the latest lottery results, but there are ad's on it, i would like to extract the gif/jpegs from it, can it be done and if it can how??

View Replies !
Getting A Form To Post To A Specific Page
How do i get it so that a form can be submitted and have the information post directly to a page that i can specify without having to use a database.  I just want a direct post that inserts the new information at the top of a page already created.  Basically so every time the form is filled out a new piece of information is above the last.

View Replies !
User Login - Direct To Specific Page
If im looking to make a login system, that when someone login in with a specific username and password, it takes them to a specific page, ex.

login: world
password: world
page they must get sent to once logged in: world.php

login: hello
password: hello
page they must get sent to once logged in: hello.php

Can someone give me a start to it here please? been looking around but cant find a good explanation of it .

View Replies !
Make Sure User Is Referred By Specific Page.
I know this is possible because I have seen it in a few scripts before, but I forgot exactly how the language was put.

I have a link on a page inside a password protected folder, lets call it domain.com/protected/hide.php.

When the user clicks on the hyperlink, they will be redirected to domain.com/folder/page.php

I want to write somewhere on page.php to be sure the visitor came from hide.php, otherwise display an error message. How can I do this?

View Replies !
Is There Any Code In PHP That Shows A Page For A Specific Time?
Is there any code in PHP that shows a page for a specific time i.e 10 seconds and automaticlly redirect the page to the other URL ?

View Replies !
How Do You Display SPECIFIC File Types In A Directory On A Web Page Please?
Hello,

I have the following code:

<?php
$handle = opendir('images/');
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "<a href="images/$file">$file</a><br>";
}
}
closedir($handle);
?>

which lists ALL the files in a directory as links on a web page. How do I limit it so it just shows Word documents for example?

View Replies !
HTTP_REFERER. Need To Capture URL Entered To Direct To Specific Page
I need to be able to capture the URL which the user has entered so that I may direct them to a specific page.

e.g. website is www.mainwebsite.com

However, I have several aliases for this website. If user enters www.specificsite.com (one of several aliases), I want to be able to capture that URL as a variable and open a specific page.

In this way, depending on the URL (alias) entered, I can direct visitors to specific pages on the site.

Is HTTP_REFERER the best way of doing this. If so,
what would be the code [I am not an experienced PHP programmer]

View Replies !
How Do You Spider A Page And Search For A Specific Anchor Text
I've scoured the net for some simple code and my regex experience is nill. I find the darn thing totally confusing. Anyone have some snippet of code that will grab a url, skip the headers, pull out all links in the body and provide anchor text to the link?

View Replies !
Finding A Specific Area From Page Using Regular Expression
i have a bunch of html pages and i want to fetch records from them and i m really confused how i can do after working with regular expressions and other stuffs from last few days can anyone help me with this ?

i have a pages with html and table all scatter there..now i want just specific table from the page and all records in that page, i was successfull somehow but still have problems ,here are they.. Code:

View Replies !
How To Tell To Send A Specific E-mail At A Specific Time
How to tell PHP to send a specific e-mail at a specific time (newsletter).

View Replies !
How To Include A Page
I want my site to have a template so I'll use this format:
http://www.site.com/index.php?page=bio
I want that to mean that it will just include the bio.php page into the middle of index.php, which will be like a template. I hope you guys can understand this. This is my question. Is there a way to only let people see bio.php if it's included in index.php and NOT let people just go directly to http://www.site.com/bio.php?

View Replies !
Include A Page
I want to replace the frames in my current webpage. So I borrowed some script from wordpress (blog php) and created

Leftmenu.php - index.php - Rightmenu.php

With css file it makes the style. So far all well.

In the leftmenu.php I want to make a link with is included in the index.php. In some examples I see:

<a href="index.php?page_id=3" >link page 3 </a>

can I replace page_id=3 for another command to open a file called e.g. "page2.php" ?

View Replies !
Include Page
I am having some trouble with including a file from a external webpage. I have two servers on the main server I have set a session variable (eg. $name)on that server I have a file that reads:

session_start();
echo "hello " . $_SESSION['name'];

when I run this on the main server it prints the value of $name as expected. eg. "hello john" . When I include this file from a external page. it does not print it out, it only prints out "hello" and nothign else. even though the session value has been previously set on the main server.

Is this something I am doing wrong , or is that just the way it works when including from external pages. Is there a way to get the value of session values like this? I also tried readfile and that produced the same result, no session values when including from a external page.

View Replies !
2 Include On One Page
I havent been working with php for very long and now I am stuck, I want 2 include on the page, one is for my visual menu and the other is for the news and content. What I want is for the the visual menu just to change when the tabs are clicked but not the news page, unless it was clicked via the main navigation.

View Replies !
Include Page Into A Variable
I'm trying to automatically generate an email that includes information from a few different pages on my site. I'm creating a variable $message to contain the email output.

I would like to set the variable with html and then include a webpage inside the variable then echo the variable $message. i.e.

$message = "
<html>
<body>
Stuff in here but somehow include('cal_events.php')
</body>
</html>";

mail("someone@somewhere.com", "Subject", "$message","header info"); Can I get the informaion from an included page into the $message variable?

View Replies !
Include Php Page With Variable
I don't know if this is possible but I want to include a page with a variable. Like:

<?php include('somepage.php?variable=whatever');?>

How ever this gives me error (cannot be opened)Is this possible?

View Replies !
Include Header On Every Page
Is there a way to include this header on every page by calling it from my directory instead of copying and pasting all of that code on every page?

View Replies !
Better Way To Include A Lot Of File In One Page?
does anyone have a better way to include a lot of file in one page?

i got a page with a lot of scripts and everything I'm going to use one i have to include it so my page is staring to look like this

include_once($_SERVER['HTTP_HOST'].'/function/header.php');
include_once($_SERVER['HTTP_HOST'].'/function/up.php');
include_once($_SERVER['HTTP_HOST'].'/function/ad.php');
include_once($_SERVER['HTTP_HOST'].'/function/seven.php');

View Replies !
Include Referencing Page
Not sure if php is the ideal solution, but here goes. Basically,what I want to do is link to a form from various, static, html pages and include the referencing page name somewhere in the form result.

Pages abc.html, def.html and ghi.html all have a 'further information' link, which leads to a form. How could I include the reference abc, def, or ghi, in the form result, so I know what they want more information about? It wouldn't matter if the .html is tagged on the end of the reference.

View Replies !
Include Another Page With Equire_once
I have this page, template.php. On the page I can include another page with equire_once, like this:

<html>
<head></head>
<body>
<?php require_once ("mypage.html"); ?>
</body>
</html>

This works fine, no problem. But when I change it to:

<?php require_once ("$page.html"); ?>

and use the url www.xxxxxx.com/template.php?page=mypage to get it, the browser doesn't return anything. Acually it stops right before the php code, and only writes out:

<html>
<head></head>

View Replies !
How To Include .htm Into A Php Page (wordpress)
I just want to know what code to use (if there is) to include an .htm site into a .php page. I basically want a 'minisite' to fit inside a bigger site so when anything on the minisite is clicked those pages change but the main page doesnt.

View Replies !
Include A Dynamic Page
I am reworking a shoutbox script (removing it from the Iframe). I have a small problem thou. I am using seperate includes. One for the form and the other to display the shouts. The thing is to display the shouts properly i need to display tags.php?show=limit. When I try to include this PHP Code:

<?php include("tags.php?show=limit"); ?>

It just displays tags.php. Is there a trick to this? Can it be done?

View Replies !
Include Java Page
i am using include to include a chat page which uses java, problem is when i load the page it does not load the java at all but i have found that with incldue you need to include other stuff but do i need to somehow where the include code is include the java files.

View Replies !
Form Processor To Redirect To A Specific Page Based On The Selection Of A Radio Button On The Form.
I need to have a form processor to redirect to a specific page based on the selection of a radio button on the form.

It would be like this:

If selection is button "A" then goto A URL
If selection is button "B" then goto B URL
If selection is button "C" then goto C URL

I don't know how to code in php or when I would put such a statement.

View Replies !
Using An Include Header Pushes My Page.
When I try to use the "include" to add in a header file, php put my header flush left and the all the html flush right. The footer seems to work fine but for some reason I cant get the header to work right any ideas? ....

View Replies !

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