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




Force Reload


Is there any way I can force my php scripts to reload everytime they are used ?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How Do I Force A FRESH RELOAD Of A Page
I've built a few php scripts, but since its reloading the same page I can't get it to refresh the page. I've implemented some expire meta tag...but is there anyway I can try and force it to refresh?

Force Reload Of Page When User Press "Back" Button
Is there a way to force a page to reload if a user har pressed the "Back" button in the browser.

Can Header() Do A Div Reload Without A Page Reload (ie Ajax-type)?
I have a display page (displaypage.php) divided into two panes - one for content and one for feedback, referred to in the CSS as contentDiv and feedbackDiv respectively.

When I click on a word in the content pane, I do a PHP/PostgreSQL search for similar words, and the results appear in the feedback pane without a page reload. For this, I am using a very basic Ajax setup Code:

How Do You Force A Download?
Hello, how do I force a file to be downloaded instead of displaying it? I have PHP and HTML files that I don't want to be displayed but downloaded. How would I do this?

Force Https
I want to make sure people are on the secure version of a page (https). If a person is on the regular http, how can I force them to go to https?

Trying To Force A Login
I have an include file that I use to secure pages with a login. When I check the password, Im also trying to check the login date While testing, Im setting the time difference to less than 10 seconds. So the idea is that when i login, then come back to a protected page more than 10 seconds later, I should be forced to login again. However, im not getting forced to login after a 10 second wait. Code:

$sQuery = "Select iUser From Table Where sGUID = '$sGUID' and TIMEDIFF($login_date,LogInDate) < &#3900;:00:10'";
. . .
//so if no returned records...
header('Location: Login.php');

Force PHP CLI To Stay In RAM?
I have a couple of command-line PHP scripts that are often called, and
I was wondering if it were possible to have the PHP interpreter remain
in RAM instead of being removed after the scipts end?

Force A Download
i know that when i place a .zip, or .exe in my web directory, the  browser automatically asled the user to download the file. however i want to place a PDF into my site, and only make it available as a download, becauase i know that especially with IE and Firefox, it reads it within the browser instead.

how can i have the file a download, instead of read?

Force Post?
I'm wondering if there's a way to force a post from one page to another, without the user having to send it in a form.

If not, how do you make a textbox in a form automatically conain a variable in it (the post from the last page)?

Reload.
I have the following problem. Using php I have composed a file which
add to an html file text typed into text-field. Problem is that I can
see new conntent of html file only after pressing "reload" button of
browser. My question is whether I can add some fragment to the html
file to force it to reload atomatically?

Zip Files, Then Force Download
Is there any examples or scripts that already will do this?

I need to zip an arbitrary amount of files, say maybe a $files array full of path names to the files filled dynamically from database based on an id number...

then i need it to automatically force a download of the zip file to the browser, then automatically delete the zip file when its finished...

Force A Number To Have 2 Decimals
I have a query, and one of the results is a number that I want to forcefully have rounded to 2 decimal places. I couldn't find a good search query to find this if it's been asked before How can I achieve it, so it's like 1.00 or 187.25

$_REQUEST With Force Download
Im using this code forom the code snipits bit of the forum, but cant work out how to enter the file name?

I tried$file = $_REQUEST['/var/www/html/file.mp3']
but it gave me the error: QuoteNotice: Undefined index: /var/www/vhosts/qrecords.co.uk/httpdocs/PumpUpThePirates.mp3 in /var/www/html/file.mp3 on line 2
Code:

Force A Page To Be Re-validated?
I'm trying to force a page to be re-validated every time someone views it, even when they click the back button. I'm currently using:

header("Expires: " . gmdate("D, d M Y H:i:s", strtotime("-1 year")) . " GMT");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: no-cache");

However, my pages still seem to display without the server being called when the back button is pressed.

Can anyone suggest the correct headers/code I can use to force the server to be re-called when the back button is pressed?

Force Download .adr File
I have a .adr file (Opera bookmarks) that I want users of my website to download. The problem is that when I open it in my browser, it shows up just like a .css or .txt file, but I want to automatically start to download the file. I know there is a way to do that in php, but I don't know how.

Refresh Or Reload
Hi!

I need to make a webpage refresh using code, I don't want that the user uses the refresh button (you know! always forget to do it)

So, how can I do to do that in PHP?

Php Form Reload
I want to make a search form which contains make, model and year of make as search condition. All these information should be taken from the database. After selecting the make the model selection menu should take the value which is coming under the same make. Is it possible to reload the same page and take the value from the database. or it is possible to add a select table values where the select query contains a criteria which is taken from the same just before that.

Page Reload
I have succesfully created a login page for my site. I have used the PHP_SELF
so that once the user has succesfully logged on the page reloads. Everything
works fine the first time somebody tries to log in but when they revisit, the
log on page is bypassed and it goes straight to the information page. I have a
sneaky suspicion that this is due to the fact that the page is then in their
history of recently visited sites. How can I use PHP to refresh the page
automatically everytime it is requested?

Reload Isn't Reloading
Still getting the same issue i submitted a couple of days ago. I can use
PuTTY to edit files in-place, on production server, and when I refresh
the page the changes won't have any effect.

I have made sure the templates_c (smarty) is 777; httpd runs as "nobody"
so i made chgrp'd the whole htdocs directory to "nobody". i even
reinstalled Apache/MySQL/PHP. where should I start looking?

How Do I Reload The Php.ini File?
I can't figure out how to make PHP reload it's php.ini -file. I changed the default dirctory for storing sessions but can't make PHP re-read the file and apply my changes.
I'm using PHP 4.0.4pl1, Apache 1.3.14 and MySQL 3.23.34 on Windows 2000.

Reload Problem
I have a page that displays information from a database. I have a link that pops up a window with a form in it. The form adds content to the database. Here is my dilemma, I want the main page (not the pop up) to reload after the form has been submitted in the pop up window, so that the new content added to the database will now show up on the main page.

Reload Php-image
I've, inside an html page, an image which is created through a php file
:

<img src="<?php echo 'captcha.php' ?>">

file captcha.php, sends
header("Content-type: image/png");

All works fine, but I need to reload the image (a new captcha code
should be generated) without reloading the enitre page. Are there any
solution? I'll post a similar question in javascript forums

I'm working on a "post comment" form using ajax.

Will This SQL Dump Reload
I created and loaded a database.
The first three fields are id, first_name and last_name
I used addslashes on the first and last names.
Here is a portion of the SQL dump that I took for backup. I have
concerns about record 47 because of the single quote in the name.

Will this dump reload ?

47, 'Sean', 'O''Kelly', NULL, NULL,

It appears that SQL is using a double quote rather than escaping
the single quote.

As usual, after reassuring me, a pointer to a reference would be
adequate.

Reload Vs. Refresh
Is there a difference between reload and refresh? How is this coded in the header?

Redirection - Reload
I wonder if it posible to reload a web page using php ? ? ?

No javascript or something similar.

Force PHP Redirect Instead Of Displaying CGI Error
I am sure I found the answer before on here but I cant for the life of me find it now. I need to change the way one site in iis works when someone tries and goes to a non-existant php page, instead of displaying:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

How To Force A Download Of An Html File
I'm making a poll management system, and when the administrator creates a new poll I want an html file (containing the actual voting form) to be automatically forced to download via the save as dialog. How is this done? Secondly, I would prefer it not to have to be written to the server first. I just want to dump all of the text in a string variable to the save dialog.

Force Browser Download Of Content
Ok, this isn't a "How do i force the browser to download my file..." question.

This is a bit different because what i want to give the user isn't a file.

I want to provide a copy of a database table as a CSV file.

(force) Delete A Session File, How?
I dunno if this is meant for here or apache anyway.. my script uses sessions... if the person logsout.. the session is closed and the session file is deleted.. if the person just shuts down the browser the session file is not deleted and hence i've got hundreds of redundant session files.

Force 2 Decimal Places For Currency
How can I force a value to retain 2 decimal places (or atleast display them)? E.G. force $19.90 to be displayed as such, not $19.9

How Best To Avoid Brute-force Looping?
I have a style/php question. (I am a C hacker by background, and
thus everything is a loop... But PHP is different...)

I write out my array and read it back in. It comes in thus:

Array (
[currentField] => 103
[brgf1] => 0.000000
[brgt1] => 1.000000
[axa1] => 1
[brgf2] => 2.000000
[brgt2] => 2.000000
[axa2] => 2
[axb2] => 2
[axc2] => 2
[axd2] => 2
[brgf3] => 2.000000
[brgt3] => 3.000000
[axa3] => 2
[axb3] => 2
[axc3] => 2
[axd3] => 2

.....
.....
)

Basically each line consists of two bearings and 4 true/false switches.
The line number in the schedule is apended to the name of the field.

In my C mind, this calls for a loop, bruteforcing our way and appending
the counter to each name....

But I *know* there is a more elegant PHP way to do this. While it makes
sense in C, it just looks fugly in PHP....

As I use PHP to generate the field names, I can change those if it makes
things easier....

Force Download On Win2k Server
My win2k server has read write and execute permissions throughout the entire account and I can't really change it without removing those permissions throught the entire account, so what I need to do is force download an exe file, since just linking to it tries to execute it on the server. Is there some way in PHP or ASP that I can force it to download and not execute?

Any Way To Force Implict Variable Definition Etc?
A lot of languages you can force implict variable definition, where you must declare your variables at the top of the function/code before it's used. This way you create less bugs using the wrong variable name, which may not crop up until later on....

How Do You Force Received: Variable In Mail()?
I was able to change my Return-Path parameter
seen in the full headers of email sent with mail().

Now I still see my userID in the parameter as shown here seen in my full
headers of my email sent.

Received: (from userID@localhost) by mydomain.com

Is There A PHP Function To Force A Browser Refresh
I have an html page that gets updated about once a week. I would like to FORCE the browser (IE, Firefox, Netscape, or Opera) to REFRESH when the user opens the page to ensure they receive the latest update. Been searching around for some php code to add to the page to accomplish this without success. Can anyone give me a steer to how to accomplish this.

Create/force A New Session ID Different From The Existing One?
Is there a way to create/force a new session ID different from the existing one?

Force Header To Download File
I've created a document system that allows our company to upload files and create documents for internal use. I've completed the system except for the download system. When a user uploads a physical file say a .xls it's uploads outside of the home dir so it's not accessible via the web to anyone.

I'm trying to figure out the standard method for creating a download link for such a file. what it's the most common method for this? How can I cause the header or browser to call and then dowload the said file?

Reload Form Data
I am developing a web site using php. I have a form for login in page1, which has two input box and a submit button. When I click the submit button in page1, it runs page2. When I click BACK button(now in page1), and FORWARD button (supposed to be in page2). Both IE and Netscape give me a message like the following (note: the browser cache is not turned off either by php header() or by browser setting):
*********************************************
This document resulted from a POST operation and has expired from the cache. If you wish you can repost the form data to recreate the document by pressing the
reload button.
*********************************************

When I press the RELOAD button, page2 is load correctly. Now, how can let the browser automatically do the reload without showing me the above message?

Reload Text Only, Not Images
I have a webpage wich I need to reload every 3-5 seconds.
When I use the header("Refresh: 3"); for example, the images are sort of blinking.
Is there a way to avoid this?

Reload Image Directly
I am uploading a new image to my database. The upload works ok and the new image is stored ok on server. The problem is can I force a reload on cache to display the new image. If I reload the page it works fine but if i dont then the old image is displayed.is there a way to force a reload of image.

Combo Box Value On Page Reload
I am new to php and mySQL so this is probably something very basic that I'm
missing. Basically, on the page I have 2 combo boxes but 1 of them is not
getting the value passed when the page is reloaded so the database can be
updated. I am echoing the field names passed and the field "theDriver" is
there but it's empty. I've include the code parts where I believe the
problem should be but I'm stumped and I've been trying to solve this for 2
days without success. Would someone mind examing the following code and
tell me what I've done wrong?

Following code constructs the combo box on the page from a MySQL table:
<?PHP
$table = "tblEmployees";
$Link = mysql_connect ($host, $user, $password);

$Query = "select concat(empID,' ',empFirstName,'
',empLastName)
as full_name from $table WHERE empTitle =
'Driver'";
$results = mysql_db_query($database, $Query, $Link);
?>

&nbsp;&nbsp;&nbsp;&nbsp;<b>Driver:</b>
<select name = "theDriver" size="1">
<Option Value=" ">Select One:</option>

<?PHP
for($u=0;$u<mysql_num_rows($results); $u++)
{
$driver=mysql_result($results,$u,'full_name');
?>
<option value="<?PHP echo($ID); ?>"><?
echo($driver); ?></option>
<?PHP
}
?> //end php

</select>

When Page is reloaded the following code is run but the combo box titled
"theDriver" is empty

foreach($_POST as $field => $value)
{
echo $field; //field names from form
echo "; ";
if ($field == "theDriver")
{
echo " - here's the driver for ya: ";
$$field = strip_tags(trim($value));
echo $$field;
$pos = strpos($driver, ";");
echo "<br> the ; is in pos $pos <br>";.......

Page Cache/reload
I have created a facility for users of a site to enter details of property (e.g. location, size etc.). This allows them to upload a picture. Users can also update a picture, adding a new picture to replace an existing one.

My problem is that if a user changes/updates the picture and then views the details the old details are displayed unless the user manually clicks refresh.

I know that this is because IE is storing the page in cache. I have tried the Meta Tags with "no cache" and "expires" but they don't work. I have also tried to get the page to refresh itself on loading, but it either doesn't work at all or keeps refreshing over and over again. Ideally i would like the page to just refresh once and then stop refreshing but there doesn't appear to be any way of doing this.

Dyanmic Images Reload
I have a php script that dynamically creates images, reusing image files on
the server to save space and clutter.

The problem is described in the steps below:

1. User clicks on a button.
2. Same page loads, but the php script creates a new image in an old file.
3. It displays the image file, but the old image shows, even though the file
contains the new image.

My options are:

1. Use javascript to force a reload when the user clicks the button (not
desirable, because the user is forced to confirm the reload by the browser).
2. Put a cheesy blurb on the page telling the user to reload or refresh
(along with ideotic explanations of how to do it).
3. Some really great way someone here is going to describe to me (my
preference).

Page Reload With An <iframe>
Let me to explain the structure....

filename : api.php

Having an <iframe src="remotehost/index.php"> </iframe>

i have to reload current page api.php after some execution of remotehost/index.php ... I've tried header(); but got formal header error. can we reload current browser url from an iframed code?

Php COPY Command... Any Way To Force Chmod 0660?
I want to copy my MySQL table via copy(oldtable, newtable) but I hear that the mode it sets is 0777.... Is there any way to force it to be anything else?

How Do You Force Return-Path: Variable In Mail()?
I am sending email using the mail() function on a hosted account. I am
trying to override the RETURN-PATH variable but it is not working. The
server keeps overriding the variable I put in.

Here's what I have:
.....
$headers = "From: me <me@mine.com>
"
$headers .= "Return-Path: me <me@mine.com>
";
.....

When I send one to myself and display full headers, it shows my
userID@myserver.com as the Return-Path.

Reload The Same Page With A Form After Submit?
I have a page with a form, and the code to process the form answers, I want the same page/form to just reload when the user presses submit. The only function I have found is that location command. PHP Code:

PHP Form Keeps Resending Information On Reload.
I have PHP form that is basically a contact page when the user clicks on submit. I have the page update with your message that says it has been sent, but now if the user clicks on reload it ask to resubmit the information over again. And that's where i want to stop this so when the user clicks on reload it will not resubmit the information again. How can this be done?

Script Termination And Reload After 5 Minutes
Strange problem on a lamp installation: A script runs longer than 5
minutes and sends no output to the browser until it is finished. When
called at customer site it gets stopped after exactly 5 minutes and is
reloaded automatically 4 times, then it gives up. This is logged in
Apache access log.

I have no clue what causes the reload after 5 minutes of "no data
received". Could be the browser, could be the proxy. I even do not have
a problem with the behaviour, you could avoid that by sending something
to the browser periodically.

BUT: The script gets stopped completely after the 5 minute period. That
is what I dont like... No PHP log entry, no apache log entry about that.
Just like killed. "ignore_user_abort" is enabled in PHP configuration.

Any ideas what causes the script termination and how that can be avoided?

Configuration details:


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