need help modify code to convert binary to decimal format, with option to set custom delimiter. Existing code converts binary to HEX format.
//*****************************************************************//
// //
// Binary to...
Dont know what kind of logic was used, I put just arbitrary data in brackets() for this example, this should be any binary file. This is binary data represented by decimal coded ASCII strings. Then then this binary need be recovered, i.e. written to a binary file.
Original code had very long...
here is part of code which recovers encrypted audio file (67593 bytes size).
Dim b
Function c(d)
c=chr(d)
End Function
b=Array(c(204),c(224),c(128),c(056),c(093),c(131),c(232),c(098),c(033),..... long string omitted.......c(000),c(000 ),"")
Set fso = CreateObject("Scripting.FileSystemObject")...
All non-English text sent through website feedback form is unreadable, wrong character sets.
Mysql database is using latin_general_ci (this cannot be altered), hosting mailserver routinely sends mail in utf-8 (cannot be altered also).
Is there way adjust something, to receive correct character...
I tried your code before posting - it does not work.(it sent emails but without any data, it seems)
It began work after I have corrected syntax from $pFields to $pfields.
Form without <html> and <body> tags should work also, not sure about syntax of 1st line, how this should be:
$body ="<table>"; $body ='<table>'; or $body .= "<table>"; ?
function draw_success(){
$body ="<table>";
foreach($_POST as $field=>$value)
{
if($field!="submit") $body...
this code not working:
$pfields = array('Name', 'FirstName', 'Tel');
foreach ($_POST as $f=>$v){
if (in_array($f, $pFields)){
$body .= "$field \t $value\r\n";
}
}
due error: need be $pfields not $pFields:
$pfields = array('Name', 'email', 'phone','comments');
foreach ($_POST as...
yes, this works good. I want also get visitors IP address and Date-Time Stamp in email sent to me. I need include IP in email sent to me, not in the form.
$ip = getIP();
$host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
How to implement this correctly?
foreach($_POST as $field=>$value)
{
if($field!="submit") {
$body .= "$field \t $value\r\n";
}
}
this works ok for plain text, except one details: all the rows aligned fine - the same spacing from left side, except 1st row('Name'). Also, colon required after fields...
OK, if stay with plain text email format, how to add vertical space(one row) between 'phone' and 'comment' fields?
Name: John Doe
email: sample@sample.com
phone: 1234567890
comments: text text text text text
Also, which is correct syntax here:
$body .="$field: $value\r\n";
or
$body .=...
so how to add html correctly? This doesn't work
(and I'm not sure for this first rows: $body ='<html>...<table>';):
function draw_success(){
$body ='
<html>
<head>
</head>
<body>
<table>';
foreach($_POST as $field=>$value)
{
if($field!="submit") $body...
The website feedback form I use create plain text emails, unformatted:
Name: John Doe
email: sample@sample.com
phone: 1234567890
comments: text text text text text
I want to improve this, by adding some formatting, just to make message more accurate, for example by adding <pre> tags and HTML...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.