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.





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

Related Forum Messages:
Load A Button 7 Seconds After Page Load?
I was wondering if there was a way to make an input button appear on a page after an X amount of seconds?

View Replies !
Session Var Is Setting ONLY AFTER I Reload Page, Form Var Displays First Page Load
Page1 has a form that calls Page2. The beginning of Page2:
<? php session_start();
$s=$_POST['sSelected'];
session_register("s"); ?>

in the middle of Page2 I have a form varaible:
<?php echo $_POST['stateSelected']; ?>
<?php echo $_SESSION['s']; ?>

The form var displays the first time the page loads. The session var
displays only after reloading the page2.

View Replies !
Cookie - Page Load Or Page Refresh
this is supposed to show file1.txt, then file2.txt and so on on page load or page refresh. But it only shows the first 2 txt files. Can someone help me find out why?
I would think that as long as the cookie is still the same if (isset($_COOKIE['e'])) {
setcookie("e", $a++, time()+60*60*24*30);} that it would go to the next text file but its not. Please let me know, thank you very much.

<?php
$max_files = 12;
$a = 0;
if($a == 0) {setcookie("e", $a, time()+60*60*24*30);} /* expire 30 days*/
if (isset($_COOKIE['e'])) {
setcookie("e", $a++, time()+60*60*24*30);}
if ($a == $max_files)
$a;
$include_file = "file" . $a . ".txt";
include ($include_file);
?>

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 !
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 !
Page Load For IP
Is there any way only a certian IP address on our network can see a
particular Table on the page? or if a certian ip Adress goes to our intranet page load a certain page depending on that IP address.

View Replies !
How To Load CSV Onto PHP Page
is there a way to load CSV file into a PHP page? if ever, how and what is the code?

View Replies !
XML Page Cannot Load
I have very special case, i tried fopen, fsockopen, in php, then wget , get, on linux, but never had success, i want to download content of external xml file, it's not just stored xml file, it's php file that outputs xml page , i need to tell that php script 2 arguments, thats it. i can't see why i everytime i try to grab it, get binary data, i can see it in my IE ok, but when try any php script it gets as binary code. can anyone tell me what i'm doing wrong?

View Replies !
On Page Load
I am fairly new to PHP and have the following problem: I need some help with the coding for PHP includes. I am trying to get a simple include: <?php require("nav.php") ?> to load after the page itself has been completely loaded. Do I have to use the sleep() function for that? If yes, how exactly would my coding have to look in order to work. The reason I would want to have a delay in a PHP include, is because I would like to have the basic page load first, so the visitor can start reading, etc. and then have some larger files load while the visitor is reading. I assuming, this would decrease page load time by having larger items load while the basic page has already been loaded.

View Replies !
Page Has To Load From This Url
I have a page that is supposed to be secure, but I need a way to make it so if the page is accessed without https, it will reload with https.

<?
if(substr($_SERVER['SCRIPT_URI'],0,5)!="https")
header("Location: https://url");
?>

someone gave me this code to try but when I do so, the page just tries to load indefinitely.

View Replies !
Incrementing On Page Load
I have one form that I want to send email. Instead of using multiple pages, I have condensed it to one. However, I don't know how to increment a value, say "display", each time the submit button is clicked.

For instance - I have $display = "1". I want 1 to increment to 2, 3, and so on once the user clicks submit once, twice, etc. But I only want the "validation fields" to show after the user has clicked submit.

View Replies !
Set Time To Load A Page
I want to make a page which take time almost 60 seconds to load the contents....means a script in php which sleep for a 60 seconds and then execute the next part....

View Replies !
Page Load Frequency
I need a function to prevent a page from being loaded too often too
fast.
So say, one is only allowed to refresh a single page 5 times in 10
seconds, or 10 times in 5 seconds (or whatever ... ).
If the load frequency exceeds that, the site calls exit(); And a
message is displayed. Just like Expression Engine does ...

This way i want to protect the DB from being queried rediculously
often, and maybe even protect it from DDOS attacks.

I hope it's clear. I don't know where to start ..

View Replies !
Redirect If Page Does Not Load
I have a form that will not submit if certain data cannot be found in Mysql or it will take very long to submit. Is there a way i can have the form go to an error page if it does not submit or load results in 5 seconds.

If it does take long i need the following:
$msg[] = $error10;
header("Location: quote_error.php?");

View Replies !
Never Ending Page Load
When I run this script, it tries to load but after aout 10 minutes the whole browser locks up because it can't do it. I have a hunch it is because the while loop doesn't ever stop, but I don't know how to prevent it. Code:

View Replies !
Page Load Time
I have a php/html page that is taking longer to load then i think it should is there a way to see what part of the page is hanging it up?

View Replies !
FORCE Page To Load
On my main server, I have an html page (begins with <html> and ends with </html>. After the last </html> part, I have a short bit of PHP code which connects to a mysql database on another server. Yesterday, that other server was, "down," for a while (i.e. mysql wouldn't work). During the downtime, my main page wouldn't load! Visitors would see a blank page. because my php code at the bottom was trying to connect to the down site.

I have tried everything I could think of. I even tried "Set_time_out()" ... but that won't work because my shared server's host has safe mode on. My php mysql code starts with:

$link = mysql_connect etc.
if (!$link) { die(); }

...but that doesn't work either.

how do I "force" my html page to appear to my visitors regardless of whether php is having any luck w/ the mysql connection?

View Replies !
Php Page Wont Load
I uploaded it to a server and what the goal for this basic class is to have the form submit to the php page. once i click submit on the form page (<form name="form0" method="post" action="formpost.php"> ) Code:

View Replies !
Load A Php-page With Javascript
how can i load a .php page with javascript.

(I need this to be able to include a .php file in a .htm page.
So the javascript should include the .php file) !

View Replies !
Load Custom Page
I have two pages named index.htm and page.htm. Page.htm has an iframe. I want to open page.htm from index.htm with a specific page in the iframe for each link. How can I do that?

View Replies !
Load Time Of A Web Page
how to calculate the load time of a webpage using php?

View Replies !
Load / Save Page
Im looking for some information if its possible, maybe a link or two. Im wanting to show the user a page that lets them know that their data is saving or their data is loading, while php runs its functions. Then when the information is processed then redirect them. As it works now it just takes a few seconds where is looks like the page is frozen then redirects as it should. Im not even sure that this would be done in php, but i figured yall could shove me in the right direction.

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 !
Load External Page
I'm looking for a simple way to load an external web page inside of one of my pages, but it would need to be server-side, as in not frames or anything else client-side.

View Replies !
Want A Different Page To Load According To Checkbox
I have been trying to resolve this for a couple of days and I have tried using info I found on this board, but I am getting no closer.

I have a form with a single checkbox. If the user checks it, I want the orderthanks incl. to be returned. If they do not check it, then I want orderthanks2 incl to be returned. I am trying the isSet statement below.

If I do it this way then it always loads the first inc. file. If I try it with just the second if statement alone, then it returns the 2nd include, but not the first. When the box is checked the value returned is 'on', I have tried it using that as well, does not work. I am sure there is something simple that I am missing. Code:

View Replies !
Load Image Into Self Page ??
I have a bunch of pages which are all loaded into the index page by the code:

index.php?id=about

(etc for other pages)

- which then loads the relevant page into the index template. Works fine.

Now say when I load that 'about' page I want to load several different images when the user chooses whilst 'staying within' the 'about' page state. How can I do that ?

I feel the link code must be something like:

index.php?id=about&image=one
index.php?id=about&image=two
index.php?id=about&image=three

etc, but I don't know where to start with declaring my image variables or where to put all this code.

View Replies !
Make PHP Page Load
I have a PHP page with a mySQL insert statement at the top. If there's any mySQL problem (e.g. locked tables, database error, etc.), I'll only get a blank page in my web browser.
How do I code it so that whether or not there are mySQL errors, the PHP page will still load normally.

View Replies !
Random Page Load
I have a page setup with an iframe. What I am trying to do is to load one of 3 features in the iframe. The iframe is: Code:

<iframe src="featured1.html" name="player" id="player" scrolling="no" frameborder="0" height="316" width="490"></iframe>

I'd like it to load either:

featured1.html
featured2.html
featured3.html

View Replies !
Can´t Load Page Before Refresh??
Why my pages don´t appear after linking to them (.php3), I have to Refresh the page and then it appears. And of course I loose the passed information from previous page??? This is REALLY bothering me A LOT. Please, does anyone know the answer???

View Replies !
Submit Vs. A Fresh Page Load
I'm developing a page - mostly for the learning experience - that
includes a form with several text fields and a submit button. When
it's submitted, there is some server-side processing and the output is
displayed as part of the same page. (the form's action attribute is
set to: "<?php $PHP_SELF ?>").

One of the steps in the PHP script is to check for the existance of a
hidden element in the form so that I know whether the page is being
sent out as a result of a new request or from the form having been
submitted.

This all works as expected. When the page is sent out as a result of
having been requested from its "home" page, the results are not shown;
when the submit button is clicked, the page is sent out with the
results shown.

Finally my question: when viewing the page with the results shown, if
I press <F5> or click on "Refresh", it behaves as if I had clicked the
Submit button (that is, it shows the results). I would expect it to
return the page as if it was a new request (and NOT show the results).

View Replies !
How To Submit A Form Without New Page Load
I know that using a frame it can be done for AJAX. But
without frame is it possible to submit a form without
new page load?

View Replies !
Page Load Time + Iframe
There is any way to get the total load time of a page when you get an
"IFRAME" on it?
In all the tests, I got only the base page time without the "IFRAME"
time....

<?php
$bench = new phpCounter();
$bench->StartCouter();

$page = "<iframe class=......";
echo $page;

$bench->EndCounter();

echo $bench->GetCounter();
?>

Where:
// StartCounter() & EndCounter() call this function
function SetCounter ( ) // {{{
{

list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);

} // }}}

// Function to return the counter
function GetCounter ( ) // {{{
{

$output = ($this->end - $this->start);
return substr($output, 0, 5);

} // }}}

View Replies !
Set_error_handler: Page Does'nt Load
I've written a custom error handler and it works as it should on my development server(mac OS), but when I try to use it on the live server(freeBSD: PHP Version 4.0.1pl2) the pages that use set_error_handler("my_error_handler"); won't load. Is there some configuration setting that would prevent me from using a custom error handler?

View Replies !
Create A Pop-up (on Page Load) On Certain Dates
I'm new to PHP, and i want to create a pop-up (on page load) on certain dates..
What i have is the script for the pop-up:

<body scroll="auto" <?php $today =date("d-F"); if ($today==$datum)
{echo "onLoad=".$g_birthday_pop;}?>>

The pop-script =
$g_birthday_pop = <<<EOT
"MM_openBrWindow('http://www.nu.nl','popup','width=300,height=300')"
EOT;

$datum is in another file (include/datum.php):
<?php
$datum= "30-December";
?>

And this works if the date is 30th of December,
but i want it too on other dates that you put in $datum
Something like:
<?php
$datum= "30-December";"10-March";
?>
So i want to control the pop-up just by editing the "datum.php"-file

View Replies !
Load Page In Middle Without Anchors
i am using php and have an "update.php" page that is a long list of input forms for an admin user to update database entries. each entry has its own "update" button.

so when the user edits an entry and clicks "update" s/he is directed to a processing script which updates the database and returns the user to "update.php".

heres my problem: the user is returned to the top of page (which is fairly long) so they have to scroll back down every time if they want to edit a number of subsequent entries. i would like the "update" submission to somehow save the current page view so that the user is returned to precisely the same scrolled down view as before.

can this be done without anchors?

i know i could use anchors but am i right that this would cause some scrolling up or down to the nearest anchor in general? i would prefer some way of doing it by percentage, pixels, etc so as to cause a sort of transparent departure and return to the page.

View Replies !
$_SERVER['argv'] Doesn't Have A Value On First Page Load.
when i first load index.php with arguments ie: "index.php?page=x", the
$_SERVER['argv']value is null. I then get the session id appended to
each link. If i refresh the page, I get the $_SERVER['argv'] I want,
but if i click a link $_SERVER['argv'] returns the value I want and
the session id.
Any ideas as to how I can get the $_SERVER['argv'] to return the
arguments on first page load?

View Replies !
INSERT Data On Page Load?
I have an avatar system where certain avatars are locked until the user unlocks them by going to certain pages of the site.

So far ( being the newb I am ) I only know how to INSERT data from a form. Is there a way to do it on page load or similar?

I also need it to first check if the data already exists and if not it inserts the data and then displays a message to the user that they have unlocked the avatar. Code:

View Replies !
Insert To Database On Page Load
I have the code for inserting data to a database form a form (Code below) but I want the data to be entered upon a page loading, how would I do this? Code:

View Replies !
Setting A Cookie On Page Load
How can I set a cookie the first time page loads?

View Replies !
Curl Load Page That Has Variable In Url?
I'm trying to load a page that has a variable in the url. Such as:

index.php?name=bob

I tried acting like the page was just a normal page (such as index.php) but that didn't seem to work. How do I give the server the variable in the url?

View Replies !
Submit Information Before Page Is Load.
I have a page with the some user information. The function in the pages gets the username and returns some result from a database.The page uses a template.

When I link to the user page I used:

http://...../mypage.php?username=[username]

That link works perfect, the user gets his information with no problem.

But if the user reaches the page directly.

http://...../mypage.php

Then the user gets the first rows from the database. Code:

View Replies !
Screen Automatically Load A Different Page
I have a php page which checks a number of form fields to ensure that certain conditions are met. this is pretty much done and works very well. If the conditions are not met, the errors are displayed on the screen. if the conditions ARE met, I want to be able to have the screen automatically load a different php page. I have scrolled through a number of posts on this forum but haven't found what I'm looking for yet. any ideas?

View Replies !
Load Page Variables Every 10sec..
I would like to know how to include/load page2 variables into page1 every 10sec.. smoothly without any refreshing,

View Replies !
Upload Script - Cannot Load Page
I have an upload file script which use to work fine. Old server crashed, now it's on a new server. The script works fine with small files, but just doesn't load after submit with large (20meg) files.

It timed out after 4 minutes, still higher than the default server value. The script settings are enforced by a .htaccess, see below for some settings.

PHP4
max_execution_time: 12860
max_input_time: 12860
post_max_size: 55M
upload_max_filesize: 52M

Is there something I am over looking? Perhaps you have some troubleshooting advice?

View Replies !
Script To Load External Page
I run 2 websites, on 2 different domains/servers.

I need a php script on server A, which when run will go to server B
at (ex. http://serverB.com/images/counter.gif) and load that image 6
times, then exit.

View Replies !
Load Page In Webpage Area
im guessin an alternative to frames. i know how to use the include thing to jus call on a file with data i want to display. But is there a way to target a certain area to load (include) different files without use of database? say i have the home page wid some main links, and theres the main table where the bulk of the site is displayed. can i target this table to display the different main links? i.e. load the diff. files using include, but havin them all displayed in the same main table when main links are click on.

View Replies !
Queries Causing Page To Load Slowly
I'm currently having trouble getting a looped query to display the results in as quick a time as possible. At the moment the query takes far to long...and that's if it executes at all. At the moment i have around 3000 movie titles in the DB.

Can anyone suggest a way of populating the select box in a relatively quick manner?
Here is the code: PHP Code:

View Replies !
PHP Form Processing Hangs Page Load
I am trying to write a simple PHP script to process a form.. the
function seems to be working fine

// subscriber is the users email in the form
if (( $subscriber ) && ($_SERVER['REQUEST_METHOD'] == 'POST') )

thing is while this processing is taking place the page load hangs...
in IE i see nothing the page background, in Firefox (even worse) I get
only 1/2 the page....

I would like the whole page to load the the processign to take place,
except that my PHP is 1/2 way down the page, inside the form

View Replies !
Triggering A Mysql Query On Page Load
I need to trigger a mySQL select query when the page loads. Is there
a way I can do this with PHP, javascript, or some other language?

View Replies !
Page Load Time Show Really High
im running PHP 5.2 on IIS 6 (Windows 2003 Server) and im getting a weird load time result when trying to display page load times on each page. e.g. Page generated in 1193387528.5501 seconds. this is my current code:
<?php
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo '<p>Page generated in '.$total_time.' seconds.</p>'."
"; ?>

but i've tried 4 others which are all simular. Any idea as to why it's showing a false result as it's loading in unde 1 second (Dual Xeon 2.8 HT server and connecting over 100mb pipe (college campus)).

View Replies !
Auto Submit Form On Page Load
i have a cronjob to run a php file at a certain time of the day. it originally was suppose to run the php mail function, easy enough, right?? but no, the php mail function is not enabled on the server - just my luck.

all i need to do is send two values from a database table within an email.

i was thinking, i could probably create a form which plugs the two values into fields, and use the mail cgi file to send it that way, but I'd need to submit the form on page load (without someone actually clicking the submit button). I could use javascript, but the cronjob would ignore the javascript.

any ideas?

View Replies !
Mail Function Trying To Load A HUGE Page
The script then goes through the database, line by line, and sends out a personalised e-mail to the recipient. At the moment, the table is about 1500 odd recrods.

When I did the send for the first time, this probably took around 30 minutes to run. Once you click on the send button, it then sits there as if it's trying to load a HUGE page for 30 minutes and then comes back with a message to say that it was successful. Code:

View Replies !

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