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.?
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
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).
View Replies !
View Related
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.
View Replies !
View Related
Transfer Filteref Data
I have two databases which are identical in structure. One is called stats and the other is called statistics. I have a program in php (encoded by zend hence I cannot make any changes to it) that updates the stats database tables with data. However I need to filter this data to trim it down and insert it into the statistics database tables. I want this to happen everytime a record is added in the stats table. So i guess i will be using triggers. I am using pgadmin III. Can anyone think of a solution to this?
View Replies !
View Related
Transfer Form Data Using A URL
I've tried looking this up using the forum SEARCH feature but have not been able to find anything that helped. What I am trying to do seems like it should be very simple, but I cannot get it to work for the life of me. I have a page. On the page is a list of names (generated from the DB), next to each name is an "approve" text link that when clicked changes the status of the person in the DB. This part of the process works. I am trying to add a text field (form item) at the top of this page where the individual who is approving the people on the list can enter a batch id# (ie: 7001) such that for every "Approve" clicked, it will change the status of that users account (as it is doing) AND stamp a field for that name with the indicated batch #. The problem is, I cannot get the number entered in the Batch ID text field to transfer to the following page without using a SUBMIT button (which I don't want to use). How can I transfer the contents of the text field (ie #7001) to the next page using only the URL in place of a submit button? I am currently transferring the user_id through the URL properly, so I need to know how to append the text field contents to that url as well. From what I've found searching this forum, it seems I may need to use the $_GET function rather than $_POST, but I do not know how to do that in this case.
View Replies !
View Related
Data Transfer On Php Pages
I want to be able to pass values in the controls say textbox on a form on one page to another and back. All my pages are php files. I would also like to be able to pass some of the values through session from one page to the other.
View Replies !
View Related
How To Detect Data Transfer...
Is there a way to detect if data transfer is occuring between the client and the server? Let me explain... I have a page that streams a movie. Is it possible to use php to detect if "transfer of data" to the client has stopped, or if it never started? This is an unconventional problem, and I don't want to conclude that php can/can't do it until you pros say so.
View Replies !
View Related
Data Transfer Worked In 4.4.4
I am passing data from an embedded device using Content-Type = multipart/form-data. My data passed nicely into $ variables when the server ran with PHP 4.4.4 but now that it is upgraded to 5.2.3 none of the data is passing.
View Replies !
View Related
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.
View Replies !
View Related
Transfer Form Data In A Different Frame
i've got a problem i have 5 frames and i want to transfer the data of a form to the other frame but the source of the frame is a different url. i want to create a button where when the user clicks on it, it will transfer the data of that form to the other from in another frame.
View Replies !
View Related
Large Data Transfer Between 2 Processes
fist the context: I have a web server which query a mySql database. but as the number of parralel queries increase, the server slows down too much. I got 2 ideas, one of which is to run N deamons which effectively execute requests. the PHP uses message queuing(1) to queue queries request to the daemons. but the answer may be quite large, larger than messages the message queueing service can handle. I thought to open back a communication link between the current daemon and the waiting PHP to tranfer/process the result, using the message queueing service to send back info regarding the opened link. I thought to open a pipe between the current daemon and the PHP. is this possible? and if so, how? if not, is an IP link to localhost be as fast as a pipe?
View Replies !
View Related
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 Replies !
View Related
Warning: Ftp_fput(): Opening BINARY Mode Data Connection ... But Zero Bytes Transfer
I am using the following short script to try and upload a file to an ftp server (the script is the example for ftp_fput from php.net). Usually the script executes perfectly and the file is created and filled correctly. However, occasionaly the file is created on the server, but it has a size of zero bytes and no data is in it and the following warning is recieved: Warning: ftp_fput(): Opening BINARY mode data connection for somefile.txt in ... on line 19 The server, username and password are correct, verified by maually logging in with an ftp program. The php version being run is 4.4.2.I have had safe mode turned off on both the server running the php script and the server i am ftping the file too, this seems to have made it work successfully more often. // Server, username and password settings removed for security // open some file for reading $file = 'somefile.txt' $fp = fopen($file, 'r'); // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); $response = ftp_chdir($conn_id, "httpdocs"); // try to upload $file if (ftp_fput($conn_id, $file, $fp, FTP_ASCII)) { echo "Successfully uploaded $file"; } else { echo "There was a problem while uploading $file"; } // close the connection and the file handler ftp_close($conn_id); fclose($fp);
View Replies !
View Related
Site To Site Data Transfer
When a visitor goes to siteb i want it to send information to sitea, in this case lets choose browser type. Eventually I want to have more sites sending data back to sitea. some not managed by somebody that i know i can trust. so mysql passwords etc. cant be given out. I thought about $_GET vars, but there is no way to make that secure from bogus entries, is there? Unless i used some sort of encryption and the decrypt key was at sitea.
View Replies !
View Related
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!
View Replies !
View Related
Files Transfer
Its like i am creating a website Builder and i have to transfer the files via PHP to the clients website after the website is created by the client. I dont have SSH - PHP has FTP Commands but in that i cant set permissions and file transfer is too slow and i fear it will give timeouts while transferring PHP Files. Also i need to create tables and db on the clients server and adjust the site. This i can do but the main thing is how do i transfer the files over.
View Replies !
View Related
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.
View Replies !
View Related
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 ?
View Replies !
View Related
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.
View Replies !
View Related
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.
View Replies !
View Related
Use Ftp To Transfer Or Download The File
I've just set up an apache web server on my Linux system. I would like to allow people to click on a link and download a file (from my server) using a php 4 web page - but i dont want to use ftp to transfer the file (i dont want to run an ftp daemon on my server). Is there an easy way to do this? Also a quick question on security - is there any way a remote user can get to see the php4 code via the web server (ie using only port 80 - assuming the rest of the server is secure etc)?
View Replies !
View Related
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:
View Replies !
View Related
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 ?
View Replies !
View Related
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?
View Replies !
View Related
Transfer Unique Records
i have a table.in that there are nearly 12000 email ids.in that may be 1000 email ids duplicates(repeated twice).i want to transfer the unique email ids from old table to new table.i tried the code but it is transfering the all ids but not unique.how to solve this.any of your help will be appreciated.here is my code <?php $conn4=mysql_connect("localhost","",""); mysql_select_db("mrj",$conn4); $sql="INSERT INTO cc (email) SELECT DISTINCT email FROM bb"; $result=mysql_query($sql,$conn4) or die(mysql_error()); if($result) { echo "transfered"; } else { echo "not"; }...
View Replies !
View Related
Transfer Variables To Another Php Script
I've one registration page where the users fills in their information, is it possible to trasnfer the things the fill in on the registration page to another script that does someting and returnes something to the first page like true/false and then the registration gives an error messange if the other php script returned false? Something like the script "activates" another script that does something and returnes the result back to the original script.
View Replies !
View Related
Simple File Transfer
how can i simple transfer a file from a server to my server and display the progress with ajax in the users browser? i've tried with curl, but i cant get the progress. are there any libraries for simple file transfers out there?
View Replies !
View Related
IIS FTP - Inconsistent File Transfer...
I am using copy() to copy a small text file from a local machine to an FTP site on another machine running XP Pro IIS FTP. I have this set-up on 3 other machines and it works a dream, however, on one PC running IIS FTP i am getting stange behavior... 1) An empty text file (zero bytes) copies over every time. 2) A text file with over 0 bytes only copies when it feels like it. I have a test script that loops the copy() script and at the moment it only copies over 2 - 3 times in 10. I am confused as there is no consistency. Sometimes, it will copy three times in a row, other times, it will only copy once.
View Replies !
View Related
Transfer My MS Access DB To MySQL?
How do I transfer my MS Access DB to MySQL? One issue though, in Access I have some special character such fraction, backquote, etc. how do I replace those characters to ASCI equivalent when transfering to MySQL, or do I have to do it outside MySQL?
View Replies !
View Related
Transfer Images From XML Feed
I am trying to load items into a car classifieds site via an XML feed (in GoogleBase format). The feed has links to images for each vehicle. I am only interested in one image. I can get the path out of the xml, but I don't really know how to proceed from there. We have a system for people to manually upload files which resizes and organizes the files and I would rather not have to write code to also use external images. I want to copy and resize the images to our servers. I don't really know how to proceed.
View Replies !
View Related
Binary Transfer With SOAP
I know that with soap it is possible to transfer a binary file, using the DIME protocol. Has this DIME protocol been implemented in a PHP class that handle SOAP, such as Nusoap or PEAR SOAP? Have you any examples?
View Replies !
View Related
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 (Ɔ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.
View Replies !
View Related
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)
View Replies !
View Related
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>
View Replies !
View Related
|