Jump to content

wrwom

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

wrwom's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Does anyone know where I can find a good example script (either on the web or example in a book) for using the USPS Address Validation Tool with php 4.3? I have done a lot of Googling but so far with little success, and the one commercially available script that I did find require php 5, I know the xml handling in php 5 is significantly different and unfortunately for the moment I am stuck with the older version. Thanks
  2. I am working on a script that parses a text file, extracts some information, stores the extracted information in a database, and writes a csv file for downloading and reading into a separate program. A simple html form is used to allow the user to point to the text file on their local machine, then on submitting the form runs the code to read, parse and write the file, the name of the csv file is determined by the code and changes with each text file processed. Everything is working at this point except that when I use the headers in php to create the download file the cvs that is downloaded to the local machine includes the written csv file and below that all of the html from the page beginning with the DOCTYPE line and continuing through the final </html> tag. The html comes after the csv data. The csv file that is written to the server (currently localhost) is correct, containing only the csv data. I suspect that there is something missing or incorrect in the header statements in the script that is causing this, but being new to this and a definite amature at programming, I have been unable to determine the problem.  The portion of the script that downloads the file is: [pre]//download the written file.  header('Content-Type: application/csv'); header("Content-Disposition: attachment; filename=\"$filename\"");  header("Content-Lenght:  filesize('$filename')"); readfile($filename);[/pre]   I am running this using a WAMP5 installation on a Windows XP machine. Thanks for any help, William
  3. I am new to working with php and am trying to set up a local server install for development. I am having a problem with sessions, the session id is being reset every time a page is called. I have spent a lot of time trying to find a solution to this, but none of the suggestions I have found solve the problem. The script I am using for test purposes, which simply echos back the session id works when uploaded to a unix based server on line, so I know that the script is working. The installation I am using is WAMP5, although I have also tried installing from xampp and reactor server with the same results. I have tried various settings for sessions.save_path and session.cookie_path. I have confirmed that a cookie is being written to the directory in session.cookie_path when a new page is called. Other relevant settings are: session.use_cookies = 1 session.use_only_cookies = tried both 0 and 1 session.use_trans_sid = 0 I have run out of ideas as to what might be causing this problem. Any suggestions of other things to try to get this working would be appreciated. I know I could work around this by passing the session id in links, but I would rather not have to do that since the server that the app will be uploaded to handles sessions fine and this would be a more streamlined way to do it, and I would rather not have to change code between my local and production apps. Thanks for any help!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.