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




Data Transfer Problem - Ideas/solutions


I have an interesting problem. I have a (LARGE) set of historical data
that I want to keep on a central server, as several separate files. I
want a client process to be able to request the data in a specific file
by specifying the file name, start date/time and end date/time.

The files are in binary format, to conserve space on the server (as well
as to increase processing time). The data in each file can be quite
large, covering several years of data. New data will be appended to
these files each day, by a (PHP) script. The server machine is likely to
be a Unix machine, whereas my clients will be running on windows
machines. My clients program is written in C++.

My main problems/questions are as follows:

1). Transfer method issue:
What is the best (i.e. most efficient and fast way) to transfer data
from the server to clients ?. I think SOAP is likely to be too slow,
because of the sheer size of the data

2). Cross platform issue:
How can I insure that that the (binary?) data sent from the Unix server
can be correctly interpreted at the client side?

2). Security issue:
How can I prevent clients from directly accessing the files (to prevent
malicious or accidental corruption of the data files.?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Data Transfer From A Non-SSL To And From SSL
I would like to know how we can transfer data through a
secured channel to a non-secured site. I am designing an
e-commerce site and getting data from secured site
database(on a firewall) and display to my site.

Data Transfer
In mysql there is table downup
************************
site enum('site1', 'site2'),
down datetime,
up datetime
************************
and there is file with such statistics about site1, site2 down and up period
************************
2003-01-28 15:42:08 (back up)
2003-01-27 14:05:45 (down)
2003-01-25 15:54:17
2003-01-25 15:11:19
2003-01-23 09:38:19
2003-01-23 09:06:55
2003-01-10 13:42:38
2003-01-10 12:45:40
2003-01-07 01:56:44
2003-01-07 01:34:47
************************
how to transfer these datas to the mysql table. If there is not back up the data will not be transffered and always check the highest datetime / event has to be on the top/last.
should i use regular expression (preg_match).

Data Transfer Problem
I have an interesting problem. I have a (LARGE) set of historical data
that I want to keep on a central server, as several separate files. I
want a client process to be able to request the data in a specific file
by specifying the file name, start date/time and end date/time.

The files are in binary format, to conserve space on the server (as well
as to increase processing time). The data in each file can be quite
large, covering several years of data. New data will be appended to
these files each day, by a (PHP) script. The server machine is likely to
be a Unix machine, whereas my clients will be running on windows
machines. My clients program is written in C++.

My two main problems/questions are as follows:

1). Transfer method issue:
What is the best (i.e. most efficient and fast way) to transfer data
from the server to clients ?. I think SOAP is likely to be too slow,
because of the sheer size of the data

2). Cross platform issue:
How can I insure that that the (binary?) data sent from the Unix server
can be correctly interpreted at the client side?

2). Security issue:
How can I prevent clients from directly accessing the files (to prevent
malicious or accidental corruption of the data files.?

Data Transfer Problem
I have an interesting problem. I have a (LARGE) set of historical data
that I want to keep on a central server, as several separate files. I
want a client process to be able to request the data in a specific file
by specifying the file name, start date/time and end date/time.

The files are in binary format, to conserve space on the server (as well
as to increase processing time). The data in each file can be quite
large, covering several years of data. New data will be appended to
these files each day, by a (PHP) script. The server machine is likely to
be a Unix machine, whereas my clients will be running on windows
machines. My clients program is written in C++.

My main problems/questions are as follows:

1). Transfer method issue:
What is the best (i.e. most efficient and fast way) to transfer data
from the server to clients ?. I think SOAP is likely to be too slow,
because of the sheer size of the data

2). Cross platform issue:
How can I insure that that the (binary?) data sent from the Unix server
can be correctly interpreted at the client side?

2). Security issue:
How can I prevent clients from directly accessing the files (to prevent
malicious or accidental corruption of the data files.?

PHP Data Transfer In Forms
basically I am looking for a way to transfer form data into php variables. Most of them are not a problem but I can not figure out how to transfer select values or radio button values. Can anyone help? I will be posting the code for the page I am working on after I get home from work.

Transfer Data From An Xls Spreadsheet Into A Table
Is there any way I can transfer data from an excel spreadsheet to my table?? Example:
I have an .xls spreadsheet called hello.xls and it has 5 columns with hundreds of rows of data in it. I want to copy all this data to my table instead of copying line by line which will take me eternity. I have a table called hello which has the same 5 columns.

How To Transfer A Data With An Id To Another Table From A Table?
how am i going to transfer let say a name identified using the suer id and copy the name to the other table having the same user id>?

Logging Solutions Mail()
I'm wondering what solutions you are using for logging which php-pages are
sending emails. Especially for detecting spam. I found
http://ilia.ws/archives/149-mail-logging-for-PHP.html, but as I'm using the
Windows PHP Version I can't compile this all by myself. Any other ideas?
Solutions

Ecommerce Development Solutions
I'm an experienced web developer looking to create a custom application
using the PHP framework Code Igniter. The application will have an ecommerce
component. The shopping cart and checkout need to be integrated into the
existing design versus a stand alone store in a separate window.

I'm considering using CubeCart. Some of examples they reference (like
thepowershop.com) are impressive and don't "feel" like the typical canned
store front. How much time (i.e. hours) would you say it would take an
experienced CubeCart developer to create an integrated shopping cart &
checkout? I understand this might be tricky to answer, but I'm just looking
for a ballpark range.

Undefined Offset - Solutions?
I've been using the code below but it is throwing up "PHP Notice:  Undefined offset".

My pages are going to display varying numbers of photos and if I don't provide a full set of 8 photos then I get php notices. I tried using if(isset()) preceding 'echo' at the bottom of the code but got nowhere. How can I displaying varying quantities of information without generating these php notices? Code:

Speed Up Web Pages : MySQL Or PHP Solutions?
We are receiving many connections. People come to us to view 1 image or text + 1 PHP content. Some other people come to destroy.

Tasks to our servers:

1. Do we have to give the image ? = MYSQL Querry
2. Give the Image = Brandwidth
3. Give the text-content = PHP
4. Can you click on the image = MYSQL...

Screen Scraping Solutions - Maintain Sessions?
I have an affiliate deal with a company who have given me a number of affiliate urls to run in a frame.

Their branding is included in the site, and I want to remove this. I have their permission to do this.

The urls use sessions.

Is there a way to include these urls in my pages (with the branding stripped out), and maintain the sessions?

Im thinking i need to use CURL or sockets and run everything in an IFRAME .

any tips?

Its a linux server.

Perhaps there is software or scripts already avaible for this?

Solutions For Can't Use Mail() In Php 4.3.11 In Redhat Fedora 3 When SElinux Is Enabled
Looks like this is a common issue:

If you installed linux Fedora 3 with the default configuration and latest
patches, you will have Apache/2.0.53 (Fedora) and PHP 4.3.11 in your box.

Without any change you can use sendmail, that means you can use mail under
Terminal, but probably you can not use mail() in php.

The error message in maillog will looks like:
"SYSERR(APACHE), Can't write, ... Permission denied."

I spent several days to search Google and manual, no result. With the help
of ¨¢lvaro G. Vicario in this group, the solution is SELinux. Simply disable
SELinux or Check the "Disable SELinux protection for httpd daemon" in
SElinux config solves the problem within 1 second.

Not sure if this will effect FC4 or not. I remember the php mail() works in
my FC4(php5), but I can not remember during the linux install did I disable
the SELinux or not. But looks like this is SELinux thing not PHP's so the
version of PHP will not effect this. I have deleted the FC4 so I can not try
now.

Fread - Any Ideas?
I have a socket open (opened with fsockopen()) and I'm sending pop3 requests over it. When I use fread() to get the response of the pop server, there's the possibility that the response can be of length anywhere between 1 character and several million (obvious reasons).

Does anyone know if there's a way to read the entire incoming data when you don't know the length of it, without putting in some rediculously large number into fread's length parameter?

Ideas ..with Webpage
Hello I didn't do any web page development since university ,I wanted
to create a web page for the fun of it ,an I was surprised of how easy
it is to use frontpage and dramweaver to do basic stuff ,but I wanted
to do something that I am sure it can be done but I don't really know
the way .
The webpage is not something original and it has been done before .
Xe.com is a currency converter from a currency to another currency I
have the following questions :

1) Wanted to auto detect the users country and accordingly set the
starting currency (from this currency) to the currency that his country
is using.
And also change the language to the user's language ...

2)lets say that I have users from two countries Germany and Hungary I
can create two starting web pages one with Hungarian and one with
German ..but lets say I have users from 30 different countries is not
very convenient to have to create a web page for each language there
must be a way that someone can i have a webpage that takes textiles or
something with the language strings and just displays them.

3) Lets say that the language is wrong and the user is using a computer
of the Spanish person and the user is Japanese I want to give them the
option to change the language
at any time ..do they have to install another language e.g Japanese in
this case? or only the encoding has to be changed .?

4)I wanted to give the user the option to select the currency in a
better way than dropdown box ,or a list box .. like a menu somehow but
I can't come with anything ...I don't know what guys can you
suggest I guess the list box is the obvious especially if there are
so many currencies but I would like something nicer... for example to
display the currency image at the side ..not sure..

5) If I create user login for example and I have different users that
they pay for the services how can I restrict certain currency converter
for certain users e.g. we have two users and the one user didn't pay
subscribed for the free service (he can convert Euro to dollars, visa
versa, pounds to dollars visa versa, pounds to Euro visa versa), the
user that paid can convert any currency ..

6) How can I restrict users from copying the website (using offline
explorer for example).

I was wondering what tools do I need to use to create the
website(recommended reading books?/online tutorials ),how will I be
creating the functionality that I want and how will I be resolving
every problem listed ?

Anyone Got Any Ideas On The Best Webstat Packages Available
Im trying to get a good solution to monitor webstats, pages including visitors and referrers.

Mysql_num_rows .... Error??? Any Ideas?
Does anyone have a good reason why I'm getting this error.
I'm clueless on this one...

I'm getting the error:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource.

Aggregation Class Ideas?
I have many classes that use database connections to fetch data and manipulate on it. I also have database abstraction class that is handling all the database queries and so forth. Usually all my classes take instantiated database object as the first parameter to constructor so they know what database to use:...

Text To MySQL Problem Need Ideas
I know how to upload text files and such my problem is that I may have many many text files so any editing of the files is out of the question. The files are not delimited, well so far I use
and it works but with help of some editing.

Colance, Connecting Ideas With Professionals. J5j
Webmasters: Colance specialise in connecting your ideas with Freelance Professionals to produce your project.
Programmers: Providing your Service is made easy through Colance. It is free to sign up with no monthly costs.













UMwxniywdsCdYae

Any Ideas How To Read A Url That's Changed By The Server?
I apologize, but I posted this in the php general forum earlier and
realized that this is the more appropriate forum. Hopefully there's a
coder here who has done this in the past.

I've got code that uses CURL to go a web page to read the data.

When I type in www.website.com, the server automatically adds a
session variable to the url. I need to be able to read that session
variable. Then I will use that session variable to input into a new
CURL session.

Any ideas how I can do this?

If I use code like this:

// find out the domain:
$domain = $_SERVER['HTTP_HOST'];
// find out the path to the current file:
$path = $_SERVER['SCRIPT_NAME'];

It gives me the code for where my script is sitting on my server
rather than the values for the web site that I'm trying to read.

Any ideas?

Ideas For French/english Sites, Using PHP?
I run a small site, I used it to learn html, and now PHP, next MySQL! I live in Quebec Canada and I would like to translate my site into french. I think I can get many more hits if I let the people around here take a look at my site and understand it!

I wonder if I could use a smarter way to do this using PHP or even MySQL. Instead of having twice the html/php pages. I don't have any ideas with my limited knowlage of programming. Maybe using variables in the URL like mydomain.com/index.php?language=french&file_id=23 or something???

Well maybe it is more trouble than anything else and I shouldn't even think about it? Right now I'm just planning on making twice the pages and have a french/english page as my index for people to choose.

But if anyone has any ingenious ideas let me know! I like figureing things out for myself, but if you would point me in the right direction.

Any Ideas For Sending Out A Basic Newsletter
I want to send out a basic newsletter from my MySql database of contacts.

Does anyone know a nice and simple bit of PHP that allows me to do this?

Any Ideas On Invalidating A Session From Another Process?
I have a slight problem with sessions. I use a session var to store a
user's details and also a set of permissions to various parts of my
application. This involves several SQL queries which is why I do it once
and cache the result in a session var.

My problem occurs when I change a user's permissions. At this point I
need to invalidate that user's session to reload their new permissions.

I don't think it's possible to do it directly is it? I'm thinking at the
moment of a timestamp in the user record which requires an SQL query
every page.

Any Ideas How To Run Macro In Microsoft Publisher Through PHP COM ?
my macro in Publisher changes "123" into "321" (example)
but I can't be able to run it.
This is how far I get throught with PHP & Publisher:

<?
$pub = new COM('publisher.application') or die('Unable to load
Publisher');
print "Loaded Publisher, version {$word->Version}
";

$pub->Open('xxx.pub');

$pub->Documents[1]->SaveAs('xxx2.pub');

$pub = null;

?>

this works, but of course does not do anything else than open xxx.pub
and save it as xxx2.pub. I am trying to run my macro:

$pub->Documents[1]->RunMacro(replaceme);

where replaceme is my macro. I tried different variations:

$pub->Documents[1]->Run(replaceme);
$pub->Documents[1]->Application->Run(replaceme),

etc but no luck so far :(

Looking For Recent Visitor Code Examples/ideas
I am working on updating my content management page and wanted to overhaul my "recent visitor" code. The code that tracks who has been and is still on my pages.

I have not been able to find some examples I saw here a few months ago and was wondering if anyone could point me to some examples.

The more versatile the better.

Ideas To Create User Personalize Page Without Login.
Hi,I am new with PHP, I am a new junior internet programmer. My boss asked me to do a personalize page for his search engine. Do any one willing to give some ideas of how to create a personalize page without login by user(only read the user cookies and mysql)

PHP Search Engine Code? (Rather Verbose Php Link) Any Ideas?
I've totally hit a brick wall and I've checked the numerous (some
helpful) tutorials in making a php link search engine friendly but the
following link:

<font face="Tahoma" size="2">
<a
href='ps2reviewsdisplay.php?page=ps2/ps2acecombatsquadronleader&type=htm&title=-
Ace Combat Squadron Leader Review - www.impulsegamer.com Australia'>
<span style="text-decoration: none">Ace Combat: Squadron Leader<br>
</span></a></font>

I just don't know how on earth to make it search engine friendly?

File Transfer
I've worked with PHP for a few months and have had several problems, but that's the learning process. I developped a site for the company I work for which involves extensive database manipulation and image integration. The file upload script worked fine before, but now it won't work. My hosting company must have changed something, but now when I upload a file, it uploads but I can't move it. It crashes when I run the 'move_uploaded_file' function and runs the error script. PHP Code:

Session Transfer
I need some help in transferring my session from one page to the next. I know it has to do with the URL, but whenever I try it never fowards me. If anybody has a suggestion that would be great. Also referancing me to some tutorials would be great too!

Secure File Transfer
I'm trying to transfer a database dump from one web server to another in a SECURE way...

If I didn't care about security, I could just use PHP Code:

Remote File Transfer
hi, ive been messing around with uploaders and the like,
how can i use an uploader to transfer a file from server to my server ?

via a http://www. connection ?

my reason for this is that i am on 56k, and there would be no sense in me downloading from a website and uploading to my website, especially using huge files.

Database Transfer (using PhpMyAdmin)
I'd like to transfer a database from one server to another, using PhpMyAdmin (the only way I can manae the database)...
Only problem is I don't know how to do it.

The database isn't gigantic, so perhaps an idea would be to download it and upload it on the other server, but can this be done ? Any SQL wizards to give me an hand ?

Is There A PHP Equivalent Of Server.Transfer (in ASP.NET)
I've only been at PHP for a couple of
days, and I'm trying to get some stuff done as fast as possible. I'm an
experienced ASP.NET programmer, and am trying to find some equivalent
stuff in PHP.

In ASP.NET there is a method called Server.Transfer which transfers the
request to a different page from the one that the user requested, but
without doing a redirect. The user gets sent headers as though they were
seeing the page they requested.

Does PHP have such a function? I have seen the function...

header('Location: page.php');

....but these seems to be a redirect, which is not the same thing. I
don't want the headers altered as I want the search engines to see the
page with the original URL.

Transfer Variables To Another Page
I have a script that on the first page is a form for users to fill out, when they choose to submit the form it goes to another page that actually processes the form to my MySQL database. ATM I use statements like this to carry over those values:

$article_author = $_POST['news_author'];

Is there a better or more effecient way to do this? It's not too bad on a short form, but typing out all those lines for a long form is tedious.

Transfer Session To New Window
I have written a custom content management system for on of my clients.
I use sessions to achieve a multilevel acces system. One of the levels is Administrator.
Whenever the administrator is logged in, he has an extra set of menu-options to edit the database.

However, what I want is to open a new window from the main window, with the administrator screen in it. The problem is the following: When the administrator clicks the Admin-button a new window is opened. To validate if he is really the administrator I use the following code: PHP Code:

Encrypted File Transfer
the following problem occured to me

I need to implement an encrypted File download with
a PHP script on the server side and a c# client application.

I know there is a way to symmetrically encrypt files
with the php mcrypt routines and already did implement a
protocol based on xml for querying files from the
server.

So the problem is, I need to generate and exchange a
random key for each transfer. This is possible,
for example, with the Diffie-Hellman Key Exchange
Procedure. Because I found nothing about this
procedure in the php function list, I began
to implement it myself.

The problem in this case is that I need arithmetic
support for Big Numbers (>=1024 Bits). The bc* functions
are too slow and do not work in this case. An alternative
would be the GMP Library, which is not supported by the
ISP where the script will be running.

Setting up my own Server with GMP support is no alternative either in
this case.

So perhaps anybody knows how I could achieve an encrypted
file download with different keys for every "Download Session" in
php. Is it possible over an ssl / https connection ? Or what am I
missing here ?

Transfer Variabele Outside Function
how can I transfer a variable from a function to the part after the
function?

<?php

$var="before function";
func_xxxxx();
echo $var;

Function func_xxxxx() {
$var = "after function";
}
?>

Transfer Between 2 Mysql Databases
I wanted to know how one can transfer between two my sql databases on the same machine using PHP . The updated table in one of the database is to be transferred to an identical table in the other database.

GET Method Transfer Size ?
I want to know, whats the maximum amount of data that may be transferred via the get method ?? is it 1 KB or 4 Kb or something else ?

File Transfer Method (CLI)
I'm using PHP (CLI) on a client machine, and I need a script on the client (executed via CLI) to transfer/upload a file to a web server using HTTPS (I could use HTTP if I have to).

The catch is, I can't use FTP methods (firewall/port issues) ... but I have complete control over the client machine as well as the server machine.  I can however use the following ports; 8080, 443 & 3306.

I realize that of the three ports I can use, 8080 would be the best but still not suited for mass data blocks.  I think 8080 will be okay because I am transferring files that are less than 5k.

Anywho, I thought I could get away with fopen() but I'm reading in the manual that the HTTP & HTTPS wrappers are 'read-only' which isn't going to work (because I am trying to write a file to the server, not read one).

So as I research further I am think that somehow 'sockets' might do the trick.  I have a very basic understanding of sockets & php but I would like to know if I could do what I am trying to do using sockets?

Slow Down Local Transfer?
I am trying to test a loading bar, but I am running it off my local apache server, which means there isn't any real load time. Is there some way to lock my transfer rate at like 10kbs or something?

Problem With Http File Transfer
I have a web app that creates an image of a graph (as a png), based on
user input of a combination of drop-down box items.

I'm trying to add a function that allows the user to save the graph
image to his hard drive, just like right-clicking on the image and
selecting 'save image as...' There's a link next to the graph that
should open the save image dialog. The link calls the following php script:

<?php
require("myImageSave.php"); //contains getPNG() function

$QUERY_STRING = $_SERVER['QUERY_STRING'];
$data = explode("&", $QUERY_STRING);

$image = ('./temp.png');
$im = getPNG($data);

if(ImagePNG($im, $image)) {
header('Content-Description: File Transfer');
header('Content-Type: application/force-download');
header('Content-Type: image/png');
header('Content-Length: ' . filesize($image));
header('Content-Disposition: attachment;
filename="Graph.png"');
header("Content-Transfer-Encoding: binary");
readfile($image);

}

exit();
?>

So Here's the problem. This bit of code saves a png file on the server
called temp.png This file contains the correct png, so I know the
getPNG() function, and everything before that is working correctly.
However, the file that gets downloaded to the user's computer is
incorrect and will not display correctly in an image viewer.

I've tried comparing the file saved on the server with the file saved to
the user's computer, and the two files are *almost* exact, with one
exception: The user's downloaded version has 4 extra linefeed (&#390;A')
characters at the top.

I realize that there's some superfluous code there -- I've tried quite a
few variations of headers, all with the same results. I know I could
just send the file to the user without saving it on the server, but this
also gave me the same results.

How To Use GET Method To Encrypted The Password To Transfer?
I have no ideas to encrypt the user input password from the text
box.....

File Transfer From Server To Client
I'm trying to write a little php script to transfert some
files from a server to clients (web/http).

It's working fin with small files. But transfering big files
(try on 1Gb) failed! The transfert is stoped randomly (sometimes
at 25%, sometimes at 75%,...).

And I don't understand why?! :/

Here, a part of my php script:

- Firstly, I'm sending the http headers

header('HTTP/1.1 200 OK');
header('Status: 200 OK');
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Expires: ".gmdate("D, d M Y H:i:s", mktime(date("H")+2,
date("i"), date("s"), date("m"), date("d"), date("Y")))." GMT");

header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header('Accept-Ranges: bytes');
header('Content-Transfer-Encoding: Binary');
header('Content-Type: application/force-download');
//header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.$filename.'"');
//header("Content-Disposition: inline; filename=$name");
header('Content-Length: '.$length)

Why Php Doesn't Transfer Variable Submitted By Web Form?
I had previously installed php-4.3.9 and apache-2.0.49 on my solaris9
server and written a php script for user login, it ran well until
today...

today for some reasons I upgraded php to php-5.1.2, complied as
apache's DSO module, and I found the script couldn't work when being
accessed by IE. I didn't know why...It seemed php script hadn't
transfered variables submmitted by web form to itself...now the
following is my script:

<?php
if ($queryflag == 1) {
$ybn="admin";
$ybp="111";
$ybusername=$_POST["username"];
$ybuserpwd=$_POST["password"];
if ($ybusername==$ybn AND $ybuserpwd==$ybp){
session_start();
$_SESSION["admin"]=true;
header("location: testtest.php");
} else {
echo <<<EOM
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>login</title>
<style type="text/css">
<!--
..style5 {font-size: 24px}
..style6 {
font-family: "Times New Roman", Times, serif;
color: #FF0000;
}
..style7 {
font-size: 14px;
color: #FF0000;
}
-->
</style>
</head>

Server2Server Transfer W/o FXP Support Or Telnet Access Possible?
there are reason I´m asking this: I have FTP access to 2 servers and want to transfer big files from one to another. Both don´t allow FXP transfer and I also have no telnet access. One server allows me to execute PHP and Perl Scripts, so I´ve searched around the web and came across some scripts that sounded interested for me:

With one script I can login via FTP via my web browser but I can only upload files from my local hard disk. Wouldn´t there be an option to upload via the server the script is actually running on?

The other script was a sideload script that could transfer via servers but logically, it has to be installed on the server where the files should be copied to and since I do not have ability to execute scripts from that server I want them to be uploaded/sideloaded.
Or maybe someone in here can name me a FWP (Free Webspace Provider) that allows $cripting and FXP transfer.

Browser Trys To Transfer Something After Loading The Page
I have some real web pages in PHP and sometimes after loading them the
browser still show the transfer indicator in the status bar, although it
also says 'Done'. My client isn't very happy with this and I don't know why
this happens. Visit
http://193.247.86.118/loveparty/index.php
and click Home in the page header (the site is not really functional yet)

The page will reload and after that the transfer indicator in the status
bar (IE 6, Mozilla Firefox looks ok) will show an ever incomplete transfer.
Otherwise the page works. No errors, no warnings. The pages are some sort
of a tag soup unfortunately. I didn't do them from scratch.

This is an old problem of mine and appears on many pages, not only this
site.

Anyone knows what might be causing a last, ever incomplete transfer with
the browser, or maybe a tool which can show me what URL my browser is
trying to get ?

Automating Page Navigation And Control Transfer
Is there a system available to do the following:
consider an app of a few pages:

page1.php:
form1----->page3.php
form2----->page4.php

page2.php:
form3----->page3.php
form4----->page4.php

when I am at page3.php, I do not know whether I came there from
page1->form1 or page2->form3.
I can check for $_SERVER['HTTP_REFERER'] and get an answer. But this
example is simple. Let us generailze that I want an app that keeps a
track of all the pages the user requested, in the order that they were
sent to him.

Obviously, it can be written based on sessions. Is there already some
popular open source application for this?

Also, this brings me to a broader question of page navigation rules. In
an app made of 20-50 pages/scripts, life will be hell if there is no
systematic approach to transferring control between pages. Is there
some kind of structure already made and readily available into which
you just plug-in your pages by telling some rules ?

E.g. the scheme is something like:
$ListOfPages = array(
1=>"Main.php",
2=>"Edit.php",
3->"Add.php",
..........,
N->"Error.php");

$RuleSet = array(
1=>array("Main.php","Edit.php","allow_edit"),
2=>array("Main.php","Add.php","allow_add"),
...................
3=>array("Main.php","Error.php","my_error_handler")
);
The RuleSet is a set of page transfer rules based on evaluation to true
of the specified functions, i.e., allow_edit(), allow_add(),
my_error_handler() etc.
Obviously, form submission is the chief means of control transfer for
PHP programs and the use of ?op=add_something in URL's(GET) and <input
type=hidden name=op value=add_something> (POST) are a step towards
making some kind of structure.

So the grand code will look like:
$MyGrandAppControllerObj = new GrandAppControllerObj();
$MyGrandAppControllerObj->setPages($ListOfPages);
$MyGrandAppControllerObj->setRules($RuleSet);
$MyGrandAppControllerObj->Run();


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