[PHP] Is it possible to send POST vars through a header redirect?

2009-02-03 Thread TS
I'm trying to send vars via POST somehow. Is this possible?

Currently I'm doing 

header("Location: http://domain/index.php?var=3";);

but, want to send POST or some other method that doesn't stick with the session.

Thanks, T


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Is it possible to send POST vars through a header redirect?

2009-02-05 Thread TS
I thought the question was pretty straight forward. Sorry about that. As
someone mentioned, yes I'm just trying to hide the var from the user. What I
meant by I don't want it to stick with the session, is that I don't want it
to be available from page to page. I want my script to run and redirect with
the var to another page without the user seeing it. Currently, I am using
GET and

header("Location: http://domain/?somevar=somevalue";) 

I'll try some of the previous responses thanks for the help.



-Original Message-
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
Sent: Wednesday, February 04, 2009 12:58 PM
To: Mike Roberts
Cc: TS; php-general@lists.php.net
Subject: RE: [PHP] Is it possible to send POST vars through a header
redirect?

Just look at the headers of EVERY email that comes from the mailing
list, as they contain the unsubscribe email address.

On Wed, 2009-02-04 at 09:47 -0500, Mike Roberts wrote:
> Ladies and Gentlemen. 
>  I am a recruiter who joined this list to understand a little about PHP. I
respected the boundaries, and never tried to recruit you. Now I am asking
for a courtesy in return. I have tried several ways and several times to be
excluded from the list, but I still get emails. Can somebody who is 'in
charge' please remove me from the list. Thank you. 
> 
> 
> 
> 
> 
>  Michael Roberts
>  Senior Recruitment Strategist
>  Corporate Staffing Services
>  150 Monument Road, Suite 510
>  Bala Cynwyd, PA 19004
>  P 610-771-1084
>  F 610-771-0390
>  E mrobe...@jobscss.com
> 
> -Original Message-
> From: TS [mailto:sunnrun...@gmail.com] 
> Sent: Tuesday, February 03, 2009 5:47 PM
> To: php-general@lists.php.net
> Subject: [PHP] Is it possible to send POST vars through a header redirect?
> 
> I'm trying to send vars via POST somehow. Is this possible?
> 
> Currently I'm doing 
> 
> header("Location: http://domain/index.php?var=3";);
> 
> but, want to send POST or some other method that doesn't stick with the
session.
> 
> Thanks, T
> 
> 


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Looking for a configurable Flash or PHP Live Chat Box or Shout Box With Rooms Optional

2009-03-18 Thread TS
Does anyone have a good link to something like this for reasonable 
price or free?

Configurable meaning skinnable and sizeable?

Something Ajaxy would be cool but it would need to save state like the
facebook IM feature on their site.

Thanks, T


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Sort a multi-dimensional array on a certain key followed by another key

2009-03-27 Thread TS
Ok so, I have an array

[0(index)][1st key][2nd key]

Basically I don't care about the index. As a matter of fact I'd prefer it
reset to still be in order afterwards.

However, I need to sort the 1st key and keep correlation w the second key.
Then sort on the second key.

I have video volumes and scenes like 

[0][110][1]
[1][110][3]
[2][110][2]
[3][110][4]

Any help would be much appreciated.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] GD to IMAGEMAGICK

2009-07-09 Thread TS
Hello. I have this code and the getFrame returns a GD truecolor image.

However, I want to convert to imagemagick after I get that frame from
ffmpeg.

Here's my code:

// GRAB A FRAME FROM THE VIDEO FOR A THUMB VIEW 
$video = new ffmpeg_movie($data_temp, false);
$frame = $video->getFrame(90); //returns a ffmpeg_frame() object
$frame_full = $frame->toGDImage(); // Returns a truecolor GD image of the
frame.

// Here is where it fails so I'm assuming I need to convert the $frame_full
into something Imagick friendly. Any ideas? Or am I not returning any data
to the frame_full to process?

$frame_full = new Imagick($frame_full);
// get dimensions
$frame_height = $frame_full->getImageHeight();
$frame_width = $frame_full->getImageWidth();


ERROR:

Fatal error:  Uncaught exception 'ImagickException' with message 'Can
not process empty Imagick object' in
/home/httpd/html/domain.com/public_html/upload/albums.php:214
Stack trace:
#0 /home/httpd/html/domain.com/public_html/upload/albums.php(214):
Imagick->getimageheight()
#1 /home/httpd/html/domain.com/public_html/upload/albums.php(26):
upload_content(Object(ADODB_mysql), '58669', '77', 'my videos', 'video')
#2 {main}
  thrown in /home/httpd/html/domain.com/public_html/upload/albums.php
on line 214


Thanks for any help, T


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] [FCK 2.5.1] - forbidden error 403 - XML request error

2008-01-08 Thread TS
Hello,

Any help would be immensely appreciated.

Clicking on the Image upload button > browse server button

I get 

Forbidden error 403 - XML request error -  

You don't have permission to access
/fckeditor/editor/filemanager/browser/default/browser.html on this server.

Apache/1.3.39 Ben-SSL/1.57
Php 4.3

Googled it but can't find anything that works. Permissions are set properly.
We've even tried opening everything up to the world and it still throws an
error.

File image upload works just fine. 

Thanks ahead.

T

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] [FCK 2.5.1] - forbidden error 403 - XML request error

2008-01-08 Thread TS
Thanks Jim,

Turned out to be mod security. Geezus

Thanks again

-Original Message-
From: Jim Lucas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 08, 2008 6:23 PM
To: Daniel Brown
Cc: TS; php-general@lists.php.net
Subject: Re: [PHP] [FCK 2.5.1] - forbidden error 403 - XML request error

Daniel Brown wrote:
> On Jan 8, 2008 4:53 PM, TS <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> Any help would be immensely appreciated.
>>
>> Clicking on the Image upload button > browse server button
>>
>> I get
>>
>> Forbidden error 403 - XML request error -
>>
>> You don't have permission to access
>> /fckeditor/editor/filemanager/browser/default/browser.html on this
server.
>>
>> Apache/1.3.39 Ben-SSL/1.57
>> Php 4.3
>>
>> Googled it but can't find anything that works. Permissions are set
properly.
>> We've even tried opening everything up to the world and it still throws
an
>> error.
>>
>> File image upload works just fine.
> 
> If that error message is correct, you installed fckeditor in the
> root directory.  I can't think of a single Good Reason[tm] for doing
> this, but I can think of several reasons (security being paramount)
> why it's a Bad Idea[tm].
> 

Could be a jailed apache install :)

-- 
Jim Lucas

"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
 by William Shakespeare

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] What community software package gets your vote? PHPfox etc...

2008-02-19 Thread TS
Hello everyone. I'm not sure what the budget is but, obviously inexpensive
would be nice. Someone turned me on to PHPfox. Yet I don't have any others
to compare it to. If you all would be so kind as to put a shout out and vote
on your favorite, I'd be very grateful.

Extendability would also be nice along with customization in terms of
design.

Much Appreciation,

T


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] What community software package gets your vote? PHPfox etc...

2008-02-19 Thread TS
Well security is an issue always IMHO. However, there's no full proof
security. I'm hoping for the groups expertise while voting on this to
consider all of these things of course. In other words, picking the lesser
evil is where I'm stand with your previous question.

Thankyou for your comment.

-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 19, 2008 9:51 PM
To: php-general@lists.php.net
Subject: Re: [PHP] What community software package gets your vote? PHPfox
etc...

On Feb 19, 2008 8:41 PM, TS <[EMAIL PROTECTED]> wrote:
> Hello everyone. I'm not sure what the budget is but, obviously inexpensive
> would be nice. Someone turned me on to PHPfox. Yet I don't have any others
> to compare it to. If you all would be so kind as to put a shout out and
vote
> on your favorite, I'd be very grateful.

What about security?  Do you care if it has a large number of publicly
disclosed exploits in it's past?  That'd be the first thing to come to
(my) mind if I were about to put code someone else wrote on my web
server.

For example:

http://search.securityfocus.com/swsearch?sbm=%2F&metaname=alldoc&query=phpfo
x&x=0&y=0

Two exploits doesn't seem bad, but in what time span were they?

Something to think about.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] What community software package gets your vote? PHPfox etc...

2008-02-19 Thread TS
Yeah, I noticed the trash talk as well with searching. I'm not a hardcore
PHP programmer and it would take me more time to do it than we have.
Deadline is in next couple of months. I think finding a package to start
with is key. Basically, all the features phpfox has is what we're looking
for. We're creating this to get for those of you who know, the Burning Man
community more organized. I could see maybe a couple 100K users if done
properly. We want to create a place for people to create camps or groups
upload photos have a task list etc...

-Original Message-
From: Wolf [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 20, 2008 12:25 AM
To: TS
Subject: RE: [PHP] What community software package gets your vote? PHPfox
etc...

One thing to do is google the package name and see what hits are returned...
My search for phpfox returned a page of hits that was filled with trash talk
of the software.

One thing to consider is WHY the software is wanted.  Is there a specific
reason for the "community" software or can you build one that works for the
company..  Also, does your current web package maybe have it as a plugin
that just needs to be turned on?


HTH,
Wolf

-Original Message-
From: TS <[EMAIL PROTECTED]>
Sent: Tuesday, February 19, 2008 9:41 PM
To: php-general@lists.php.net
Subject: [PHP] What community software package gets your vote? PHPfox etc..

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] What community software package gets your vote? PHPfox etc...

2008-02-20 Thread TS
Hey party people. I have to say I’m a little surprised no hooting and hollering 
on this topic. I don’t think I heard a single positive comment which worries 
me. I’m jealous of myspace and facebook too but, someone has to have good news 
for one of these not so mainstream community appz.

 

W3RD ^ PEOPLE

 

 

 

From: Nathan Nobbe [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 20, 2008 1:51 PM
To: TS
Cc: php-general@lists.php.net
Subject: Re: [PHP] What community software package gets your vote? PHPfox etc...

 

On Tue, Feb 19, 2008 at 9:41 PM, TS <[EMAIL PROTECTED]> wrote:

Hello everyone. I'm not sure what the budget is but, obviously inexpensive
would be nice. Someone turned me on to PHPfox. Yet I don't have any others
to compare it to. If you all would be so kind as to put a shout out and vote
on your favorite, I'd be very grateful.

Extendability would also be nice along with customization in terms of
design.

Much Appreciation,


dude, you gotta scope this out;

http://cmsmatrix.org/


-nathan 

 



[PHP] REALLY NEWB QUESTION - include issue

2008-06-30 Thread TS
Trying to "include()" a script from another domain on my server and it won't
let me do it.

I'm getting this error.

open_basedir restriction in effect. Operation not permitted etc...

Please help and stop laughing at me.

Thanks ahead, T


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] REALLY NEWB QUESTION - include issue

2008-07-01 Thread TS
>Code segment?
>Exact error message? (Is there more context?)

Include (/file);

Function.include]: open_basedir restriction in effect.
File(/var/www/vhosts/domain/httpdocs/file.php) is not within the allowed
path(s): (/var/www/vhosts/differentdomain/httpdocs:/tmp) in
/var/www/vhosts/samedifferentdomain/httpdocs/custom-template.php on line 151

It's my server and it makes perfect security sense because the package I'm
using allows me to resell but, I don't care about that particular security
issue since I'm not reselling. I'm assuming it's something in php.ini. It's
a linux machine. I'm not sure what else there is to tell. 

Thanks, T





-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 01, 2008 1:08 AM
To: TS
Subject: RE: [PHP] REALLY NEWB QUESTION - include issue

Code segment?
Exact error message? (Is there more context?)

I probably don't have the answer to answer you, but make like a little
easier
for those who might by giving them some information to work with.

David

>-- Original Message --
>From: "TS" <[EMAIL PROTECTED]>
>To: 
>Date: Tue, 1 Jul 2008 00:50:50 -0600
>Subject: [PHP] REALLY NEWB QUESTION - include issue
>
>
>Trying to "include()" a script from another domain on my server and it
won't
>let me do it.
>
>I'm getting this error.
>
>open_basedir restriction in effect. Operation not permitted etc...
>
>Please help and stop laughing at me.
>
>Thanks ahead, T
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



FW: [PHP] REALLY NEWB QUESTION - include issue

2008-07-01 Thread TS
> To allow opening of remote url's you can enable 'allow_url_fopen' in
php.ini.

This isn't a remote url though. It's a local path.

Looking for something similar to crossdomain.xml file for Flash if anyone is
familiar with that.

Thanks, T


-Original Message-
From: Thijs Lensselink [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 01, 2008 1:58 AM
To: php-general@lists.php.net
Subject: RE: [PHP] REALLY NEWB QUESTION - include issue

Quoting TS <[EMAIL PROTECTED]>:

>> Code segment?
>> Exact error message? (Is there more context?)
>
> Include (/file);
>
> Function.include]: open_basedir restriction in effect.
> File(/var/www/vhosts/domain/httpdocs/file.php) is not within the allowed
> path(s): (/var/www/vhosts/differentdomain/httpdocs:/tmp) in
> /var/www/vhosts/samedifferentdomain/httpdocs/custom-template.php on line
151
>
> It's my server and it makes perfect security sense because the package I'm
> using allows me to resell but, I don't care about that particular security
> issue since I'm not reselling. I'm assuming it's something in php.ini.
It's
> a linux machine. I'm not sure what else there is to tell.
>
> Thanks, T
>
>
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 01, 2008 1:08 AM
> To: TS
> Subject: RE: [PHP] REALLY NEWB QUESTION - include issue
>
> Code segment?
> Exact error message? (Is there more context?)
>
> I probably don't have the answer to answer you, but make like a little
> easier
> for those who might by giving them some information to work with.
>
> David
>
>> -- Original Message --
>> From: "TS" <[EMAIL PROTECTED]>
>> To: 
>> Date: Tue, 1 Jul 2008 00:50:50 -0600
>> Subject: [PHP] REALLY NEWB QUESTION - include issue
>>
>>
>> Trying to "include()" a script from another domain on my server and it
> won't
>> let me do it.
>>
>> I'm getting this error.
>>
>> open_basedir restriction in effect. Operation not permitted etc...
>>
>> Please help and stop laughing at me.
>>
>> Thanks ahead, T
>>
>>

Looks like your hosting is blocking files included outside of the  
webroot. If you have root access you could change this. If you wanted  
to. But security is not a bad thing :)

To allow opening of remote url's you can enable 'allow_url_fopen' in
php.ini.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] [HTML MAIL FORM] - Body text not coming through

2008-07-20 Thread TS
Can someone spot what I'm doing wrong here? Must have something to do with
headers maybe?

The attached picture comes through but, no text. Here's the headers that do
come through. Thanks for any help. Mail is such a pain.

 

 

Received: (qmail 13640 invoked by uid 48); 19 Jul 2008 17:01:10 -0700

Date: 19 Jul 2008 17:01:10 -0700

Message-ID: <[EMAIL PROTECTED]>

To: [EMAIL PROTECTED]

Subject: 

From: <[EMAIL PROTECTED]>

MIME-Version: 1.0

Content-Type: multipart/mixed;

 boundary="==Multipart_Boundary_x8588974b51cbb9c326958df4c2f8b218x"

 

 

 

$fileatt = "test-send.jpg"; // Path to the file

$fileatt_type = "application/octet-stream"; // File Type

$fileatt_name = "picture.jpg"; // Filename that will be used
for the file as the attachment



$headers = "From: ".$_REQUEST['first_name']."
<".$_REQUEST['from'].">";



$file = fopen($fileatt,'rb');

$data = fread($file,filesize($fileatt));

fclose($file);



$semi_rand = md5(time());

$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";



$headers .= "\nMIME-Version: 1.0\n" .

 
"Content-Type: multipart/mixed;\n" .

"
boundary=\"--{$mime_boundary}\"";



$body .= "Text that should show up but, I'm a noob.\n" .

 
"--{$mime_boundary}\n" .

 
"Content-Type:text/html; charset=\"iso-8859-1\"\n" .

 
"Content-Transfer-Encoding: 7bit\n\n" .

$body . "\n\n";



$data = chunk_split(base64_encode($data));



$body .= "--{$mime_boundary}\n" .

 
"Content-Type: {$fileatt_type};\n" .

 
" name=\"{$fileatt_name}\"\n" .





//"Content-Disposition: attachment;\n" .

//" filename=\"{$fileatt_name}\"\n" .

"Content-Transfer-Encoding: base64\n\n" .

$data . "\n\n" .

"--{$mime_boundary}--\n";

 

@mail($toEmail, $subject, $body, $headers);

echo "sent=OK";

 



[PHP] RE: [HTML MAIL FORM] - Body text not coming through

2008-07-20 Thread TS
So when I tested before my boundaries were wrong in my code. It however was
copied into this email message correctly in the code below below. 

 

This was " boundary=\"--{$mime_boundary}\"";

 

  " boundary=\"{$mime_boundary}\"";

 

Notice the double dashes were missing so, when they were added it now works
but, all the header info is now showing in the message body. Any ideas?

 

Thanks

 

 

From: TS [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 20, 2008 1:36 PM
To: 'php-general@lists.php.net'
Subject: [HTML MAIL FORM] - Body text not coming through

 

Can someone spot what I'm doing wrong here? Must have something to do with
headers maybe?

The attached picture comes through but, no text. Here's the headers that do
come through. Thanks for any help. Mail is such a pain.

 

 

Received: (qmail 13640 invoked by uid 48); 19 Jul 2008 17:01:10 -0700

Date: 19 Jul 2008 17:01:10 -0700

Message-ID: <[EMAIL PROTECTED]>

To: [EMAIL PROTECTED]

Subject: 

From: <[EMAIL PROTECTED]>

MIME-Version: 1.0

Content-Type: multipart/mixed;

 boundary="==Multipart_Boundary_x8588974b51cbb9c326958df4c2f8b218x"

 

 

 

$fileatt = "test-send.jpg"; // Path to the file

$fileatt_type = "application/octet-stream"; // File Type

$fileatt_name = "picture.jpg"; // Filename that will be used
for the file as the attachment



$headers = "From: ".$_REQUEST['first_name']."
<".$_REQUEST['from'].">";



$file = fopen($fileatt,'rb');

$data = fread($file,filesize($fileatt));

fclose($file);



$semi_rand = md5(time());

$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";



$headers .= "\nMIME-Version: 1.0\n" .

 
"Content-Type: multipart/mixed;\n" .

"
boundary=\"--{$mime_boundary}\"";



$body .= "Text that should show up but, I'm a noob.\n" .

 
"--{$mime_boundary}\n" .

 
"Content-Type:text/html; charset=\"iso-8859-1\"\n" .

 
"Content-Transfer-Encoding: 7bit\n\n" .

$body . "\n\n";



$data = chunk_split(base64_encode($data));



$body .= "--{$mime_boundary}\n" .

 
"Content-Type: {$fileatt_type};\n" .

 
" name=\"{$fileatt_name}\"\n" .





//"Content-Disposition: attachment;\n" .

//" filename=\"{$fileatt_name}\"\n" .

"Content-Transfer-Encoding: base64\n\n" .

$data . "\n\n" .

"--{$mime_boundary}--\n";

 

@mail($toEmail, $subject, $body, $headers);

echo "sent=OK";

 



[PHP] RE: [HTML MAIL FORM] - Body text not coming through

2008-07-20 Thread TS
Alright in doing that the text comes through but, no picture. Geez

 

From: TS [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 20, 2008 1:47 PM
To: 'php-general@lists.php.net'
Subject: RE: [HTML MAIL FORM] - Body text not coming through

 

So when I tested before my boundaries were wrong in my code. It however was
copied into this email message correctly in the code below below. 

 

This was " boundary=\"--{$mime_boundary}\"";

 

  " boundary=\"{$mime_boundary}\"";

 

Notice the double dashes were missing so, when they were added it now works
but, all the header info is now showing in the message body. Any ideas?

 

Thanks

 

 

From: TS [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 20, 2008 1:36 PM
To: 'php-general@lists.php.net'
Subject: [HTML MAIL FORM] - Body text not coming through

 

Can someone spot what I'm doing wrong here? Must have something to do with
headers maybe?

The attached picture comes through but, no text. Here's the headers that do
come through. Thanks for any help. Mail is such a pain.

 

 

Received: (qmail 13640 invoked by uid 48); 19 Jul 2008 17:01:10 -0700

Date: 19 Jul 2008 17:01:10 -0700

Message-ID: <[EMAIL PROTECTED]>

To: [EMAIL PROTECTED]

Subject: 

From: <[EMAIL PROTECTED]>

MIME-Version: 1.0

Content-Type: multipart/mixed;

 boundary="==Multipart_Boundary_x8588974b51cbb9c326958df4c2f8b218x"

 

 

 

$fileatt = "test-send.jpg"; // Path to the file

$fileatt_type = "application/octet-stream"; // File Type

$fileatt_name = "picture.jpg"; // Filename that will be used
for the file as the attachment



$headers = "From: ".$_REQUEST['first_name']."
<".$_REQUEST['from'].">";



$file = fopen($fileatt,'rb');

$data = fread($file,filesize($fileatt));

fclose($file);



$semi_rand = md5(time());

$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";



$headers .= "\nMIME-Version: 1.0\n" .

 
"Content-Type: multipart/mixed;\n" .

"
boundary=\"--{$mime_boundary}\"";



$body .= "Text that should show up but, I'm a noob.\n" .

 
"--{$mime_boundary}\n" .

 
"Content-Type:text/html; charset=\"iso-8859-1\"\n" .

 
"Content-Transfer-Encoding: 7bit\n\n" .

$body . "\n\n";



$data = chunk_split(base64_encode($data));



$body .= "--{$mime_boundary}\n" .

 
"Content-Type: {$fileatt_type};\n" .

 
" name=\"{$fileatt_name}\"\n" .





//"Content-Disposition: attachment;\n" .

//" filename=\"{$fileatt_name}\"\n" .

"Content-Transfer-Encoding: base64\n\n" .

$data . "\n\n" .

"--{$mime_boundary}--\n";

 

@mail($toEmail, $subject, $body, $headers);

echo "sent=OK";