Jump to content

fallguy

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

About fallguy

  • Birthday 06/01/1983

Contact Methods

  • Website URL
    http://www.davidshumway.info/

Profile Information

  • Gender
    Male
  • Location
    Ithaca, NY

fallguy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. fallguy

    Oh Hai!

    Nice to meet you =)
  2. Hello, I've been creating a program using Ajax and PHP. The program is a javascript text-editor and it uses the ASCII characters & #255; & #254; (ÿ and þ) to create break lines. The program relies on Ajax to fetch MySQL content using a PHP script. The script has been working OK. It's very odd, but I've ran into some problems and I can't seem to figure out what's going on. In my local environment the script is running OK; Windows with Apache 2.2.6 and PHP 5.2.5. On my remote server, it was running great up until a few hours ago; Debian with Apache 2.2.3 and PHP 5.2.9. I think that on my remote server, the PHP or Apache environment might be altering the rendering of my ASCII characters... All of the ASCII characters are embedded only within Javascript. For example, when I use alert("ÿ or þ") on my remote server, it comes up with one of those undefined/bad character sybmols. On my local server, the same alert shows the ASCII characters. The script it running from a php file (index.php), but the ASCII characters are only placed in a javascript file (js.js). The program is running on my server at http://davidshumway.info/sites/30510-journal/login.html .. The login is (admin/admin). Is there a content-type/character-set variable for Apache or PHP that might be different on my remote server? Many thanks =) =) PS. The PHP info outputs for my local and remote servers are here: http://davidshumway.info/phpinfo().htm http://davidshumway.info/phpinfo()local.htm
  3. Thanks for the response. On a side note, this seems to be working on my local setup when running a test, such as echo "Subject: 19800131 Body.." | ./parse.sh. The script.php at the end, however, is failing to recognize the post variables. #!/bin/bash in=`fold -s -w 64` BODY=`echo "$in" | sed -n 'H;${g;s/.*\n\n\(.*\)/\1/g;p}'` BODY=$(echo -n "$BODY" | \ perl -pe's/([^-_.~A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg'); SUBJECT=`echo "$in" | grep -m1 -i 'Subject:.*[0-9]\{8\}.*' | \ sed 's/^Subject:\(.*\)$/\1/'` SUBJECT=$(echo -n "$SUBJECT" | \ perl -pe's/([^-_.~A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg'); curl -s -d "subject=${SUBJECT}&body=${BODY}" http://www.domain.com/script.php exit 0
  4. Hello, This is my post here, so I'll try to remain this clean and concise I'm using a .forward file to forward email to a shell script in order to parse out the Subject and Body for later use. It's important that I use a shell script here, rather than perl or another language. After receiving the Subject and Body, I'm trying to forward these to a php script on an external server via curl. However, when I send an email the php script does not receive the Subject and Body. I believe the problem may be with curl, because when I run a simulated email through parse.sh, via cat test.txt | ./parse.sh, both the Subject and Body are properly returned. Here is the content of the .forward file, located at /home/Dave/: |/home/Dave/parse.sh The content of the shell script (parse.sh) is attached. Is the curl command that I'm using not formatted correctly, and/or is there any error is my methods used to parse the Subject and Body? Any help would be appreciated. --Thanks [attachment deleted by admin]
×
×
  • 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.