Re: [PHP] What would you like to see in most in a text editor?

2011-09-14 Thread Brad Huskins

Thanks Tim.

That is some very useful feedback.

I am aiming to build something that is almost as easy to use as Notepad.

Don't know if I'll be successful or not, but nice to know people value 
simplicity.


--Brad.

On 09/14/2011 08:18 AM, Tim Streater wrote:

On 14 Sep 2011 at 12:40, Richard Quadlingrquadl...@gmail.com  wrote:


On 14 September 2011 01:23, tamouse mailing lists
tamouse.li...@gmail.com  wrote:

On Tue, Sep 13, 2011 at 3:35 PM, Robert Cummingsrob...@interjinn.com
wrote:

I'm a big fan of editors that work in the terminal.


You'll get my emacs when you pry it out of my cold dead hands.


Pah! You and your full screen editor.

EDLIN is the way to go.


Is that more or less terse than TECO?

Back in 1989 when I was at SLAC, they were just getting into unix, and debates were 
raging about which editor to standardise on and teach people (emacs, vi, jove, 
etc). Because this wasn't settled, I started using notepad (and later, dxnotepad) 
and got on with coding. Six months later, the debates were still raging. I then had 
an epiphany: I'd been using notepad for six moths  got work done. It took me 5 
minutes to find out how to use it. I didn't need teaching about it or to have a 
manual. So IMO, emacs, vi, and all their ilk belong in the dustbin of history.

--
Cheers  --  Tim



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



[PHP] What would you like to see in most in a text editor?

2011-09-13 Thread Brad Huskins

Hello all you php coders out there,

I'm doing an Open Source text editor (just a hobby) that's designed for 
PHP developers and is accessible through the web. This has been stewing 
for a while, and has gotten to the point where I can use it for my own 
work. I would like any feedback on things that people really 
like/dislike about their current editors, as I believe some of these 
things could be resolved in mine.


I currently have username/password protection (with Salted-Hash 
passwords), a file-system browser, file loading/saving, and syntax 
highlighting -- and these things seem to work reasonably well. As well, 
most things about the editor are scriptable with JavaScript. This would 
seem to imply that in a few weeks I would have something useful. So I 
would like to get some feedback on what features people would most want, 
since I am still at a very flexible stage in development.


If you would like to see what I have, you can go to 
un1tware.wordpress.com. You can also peruse the code at 
github.com/bhus/scriptr. In particular, the README on github gives a 
little bit better rationality for why something like this might be 
useful, and how things are currently structured.


--Brad

[ Yes, this is based on the layout of Linus' original post to 
comp.os.minix. ]


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



[PHP] What would you like to see in a text editor?

2011-09-13 Thread Brad Huskins
Hello all you PHP devs,

I'm building an Open Source text editor accessible through the web. It 
has been brewing for a while in one form or another. But I think I 
finally have something solid to build on. I would like some feedback on 
things people like/dislike about their current editors.

I currently have a basic system working with a login, file browser, 
ability to load/save files and syntax highlighting working. All 
keystrokes are sent through a client-side JavaScript API built on JQuery. 
This would seem to imply that something usable is not more than a few 
weeks away, so I figured I would get some input now while things are 
still quite flexible. All suggestions are welcome, though not all will be 
implemented.

If you want, you can visit the web site for the project at 
un1tware.wordpress.com. There's a link to a video demo, as well as a the 
current version of the source code to try out.

As well, the project can be found at github.com/bhus/scriptr. I have 
tried to make the README readable and yet comprehensive.

--Brad

[And yes, this message is modeled after Linus' original post to 
comp.os.minix]

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



[PHP] What would you like to see in most in a text editor?

2011-09-13 Thread Brad Huskins

Hello all you php coders out there,

I'm doing an Open Source text editor (just a hobby) that's designed for 
PHP developers and is accessible through the web. This has been stewing 
for a while, and has gotten to the point where I can use it for my own 
work. I would like any feedback on things that people really 
like/dislike about their current editors, as I believe some of these 
things could be resolved in mine.


I currently have username/password protection (with Salted-Hash 
passwords), a file-system browser, file loading/saving, and syntax 
highlighting -- and these things seem to work reasonably well. As well, 
most things about the editor are scriptable with JavaScript. This would 
seem to imply that in a few weeks I would have something useful. So I 
would like to get some feedback on what features people would most want, 
since I am still at a very flexible stage in development.


If you would like to see what I have, you can go to 
un1tware.wordpress.com. You can also peruse the code at 
github.com/bhus/scriptr. In particular, the README on github gives a 
little bit better rationality for why something like this might be 
useful, and how things are currently structured.


--Brad

[ Yes, this is based on the layout of Linus' original post to 
comp.os.minix. ]


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



[PHP] Sorry!

2011-09-13 Thread Brad Huskins
My apologies for the triplicate errors. My newsgroup client is doing 
screwy things.


Again, I am SO sorry for the multiple posts.

/Brad.

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



Re: [PHP] What would you like to see in most in a text editor?

2011-09-13 Thread Brad Huskins

On 09/13/2011 04:35 PM, Robert Cummings wrote:

On 11-09-13 03:56 PM, Brad Huskins wrote:

Hello all you php coders out there,

I'm doing an Open Source text editor (just a hobby) that's designed for
PHP developers and is accessible through the web. This has been stewing
for a while, and has gotten to the point where I can use it for my own
work. I would like any feedback on things that people really
like/dislike about their current editors, as I believe some of these
things could be resolved in mine.

I currently have username/password protection (with Salted-Hash
passwords), a file-system browser, file loading/saving, and syntax
highlighting -- and these things seem to work reasonably well. As well,
most things about the editor are scriptable with JavaScript. This would
seem to imply that in a few weeks I would have something useful. So I
would like to get some feedback on what features people would most want,
since I am still at a very flexible stage in development.

If you would like to see what I have, you can go to
un1tware.wordpress.com. You can also peruse the code at
github.com/bhus/scriptr. In particular, the README on github gives a
little bit better rationality for why something like this might be
useful, and how things are currently structured.


I'm a big fan of editors that work in the terminal.

Cheers,
Rob.


Thanks for the input.

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



Re: [PHP] What would you like to see in most in a text editor?

2011-09-13 Thread Brad Huskins

Daniel,

Thanks for your response. That's the direction I was thinking of taking 
this, but wanted to get some input before I got ahead of myself.


-Brad.

On 09/13/2011 06:54 PM, Daniel Brown wrote:

On Tue, Sep 13, 2011 at 18:50, Brad Huskinsbrad.husk...@gmail.com  wrote:


Thanks for the input.


 Brad, I'd be willing to bet that, if you added in the ability for
multiple users to simultaneously view and edit the same file without
issues of corruption and such (think along the same lines as Google
Docs), you'd have quite a winner on your hands there.




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



Re: [PHP] What would you like to see in most in a text editor?

2011-09-13 Thread Brad Huskins

Oh geez. Didn't mean to start a flame war...

On 09/13/2011 08:56 PM, James Yerge wrote:

On 09/13/2011 08:40 PM, Jim Lucas wrote:

On 9/13/2011 5:23 PM, tamouse mailing lists wrote:

On Tue, Sep 13, 2011 at 3:35 PM, Robert Cummingsrob...@interjinn.com  wrote:

I'm a big fan of editors that work in the terminal.

You'll get my emacs when you pry it out of my cold dead hands.


+1

mg too





I'd have to go agree with the exception of s/emacs/vi/ :P



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



[PHP] How PHP handles memory on exit

2011-06-24 Thread Brad Lorge
Hey All,

I have a question pertaining to how PHP handles the residual values in
memory once a thread exits. I am working on some credit card processing
logic and would like to ensure that the values I am working with are not
being left to their own fortune after the application exits. Out of habbit,
I have just been overwriting all the sensitive variables with x's (strings
only).

The concerns I have are:



   - Am I wasting my time? Does PHP already do this?
   - If a sensitive var had somehow been cast as an int, and then I
   overwrite it as a string, does that just change the pointer to another *
   copy* of the var typecast, or does it actually overwrite the original?
   - Does PHP store the argv/$_SERVER/$_REQUEST vars anywhere other than
   what is reachable in userland? If so is there a way to ensure they do not
   persist?


Any help you can provide would be hugely useful!


Regards,
Brad


RE: [PHP] Upload Progress Meter

2011-03-24 Thread Brad Broerman
Essentially, they all require Flash or Java... 

Most use Flash...  

If you want one that is in Java, and is scriptable in JavaScript, I have one
on my website: http://www.bbroerman.net/code.html

-Brad


-Original Message-
From: Floyd Resler [mailto:fres...@adex-intl.com] 
Sent: Wednesday, March 23, 2011 10:29 AM
To: sstap...@mnsi.net
Cc: PHP
Subject: Re: [PHP] Upload Progress Meter


On Mar 23, 2011, at 10:10 AM, Steve Staples wrote:

 On Wed, 2011-03-23 at 09:59 -0400, Floyd Resler wrote:
 I am in need of an upload progress meter.  I've seen plenty of tutorials
=
 on-line requiring installing modules, hooks, patches, etc.  However, my =
 Wordpress install accomplished this without me having to make any =
 modifications to my PHP install.  So, how is it done?
 
 Thanks!
 Floyd
 
 
 you can google this...
 
 jquery upload progress meter
 
 or:
 http://www.nixboxdesigns.com/demos/jquery-uploadprogress.php
 
 http://www.bitrepository.com/uploading-files-with-progress-bar.html
 
 
 
 Steve
 

I'll check it out!

Thanks!
Floyd




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



Re: [PHP] Detecting Multi-Scope Variables

2011-02-01 Thread Brad Lorge
Perhaps my question was not as succinct as it could have been.

Basically, can you think of a means through which to detect whether or not a
variable is currently present in multiple scopes.

IE:

?php

$bob = fish;

echo is_multiscoped($bob); //False

function something()
{
 echo is_multiscoped($fish); //False
 gloabal $bob;
 echo is_multiscoped($bob);//True
}

function getJam($ref)
{
echo is_multiscoped($ref);//True
}

$jim = nothing special;

echo is_multiscoped($jim); //False

getJam($jim);


?

On Tue, Feb 1, 2011 at 7:12 PM, Tommy Pham tommy...@gmail.com wrote:

  -Original Message-
  From: Brad Lorge [mailto:b...@lorge.com.au]
  Sent: Monday, January 31, 2011 9:53 PM
  To: php-general@lists.php.net
  Subject: [PHP] Detecting Multi-Scope Variables
 
  Hello All,
 
  I am new to the list so please be gentle :)
 
  I am working on a PHP framework and have run up against a functionality
  hurdle which I keep falling at. Basically, I have three mechanisms which
 all
  function in a similar way and require this functionality: templating,
 event
  handling and action handling. Within the core code of the application,
 as
  is common with many applications with plugin architecture, I pass a
 number
  of parameters to functions which have hooked into a particular event.
 Part
  of the mechanism is that parameters can be passed by reference to allow
  for the listeners to make modifications.
 
  $username=bob;$account_type=ISV;$password=fishbum;
 
  register_action_listener('process_user', function($username,
  $account_type, $password){$username.=. . $account_type;} // Or
  whatever
 
  call_action('process_user', $username, $account_type, $password);
  //Result: $username == bob.ISV

 I think you meant to use [1].

 
  Now, what I am trying to do is establish a method to prevent the hook
  functions from making changes by reference without reference explicitly
  being passed to them by the calling code.
 

 Perhaps you  should review [2] and see if your logic works with your
 'call_action'.

  I have thought of a method which simply makes a copy of all the
 parameters
  for each listener within call_action(), however what I would really love
 is a
  function which returns whether or not the supplied variable is available
 in
  multiple scopes or is in the original scope which it was initialized in.
  Does anyone know of a way to achieve this?
 
  Regards,
  Brad

 Happy coding,
 Tommy

 [1] http://php.net/call_user_func
 [2] http://php.net/references





Re: [PHP] Detecting Multi-Scope Variables

2011-02-01 Thread Brad Lorge
Hmm, would this then be a question for internals?

On Wed, Feb 2, 2011 at 9:59 AM, Ashley Sheridan 
a...@ashleysheridan.co.ukwrote:

 Brad Lorge b...@lorge.com.au wrote:

 Perhaps my question was not as succinct as it could have been.
 
 Basically, can you think of a means through which to detect whether or
 not a
 variable is currently present in multiple scopes.
 
 IE:
 
 ?php
 
 $bob = fish;
 
 echo is_multiscoped($bob); //False
 
 function something()
 {
  echo is_multiscoped($fish); //False
  gloabal $bob;
  echo is_multiscoped($bob);//True
 }
 
 function getJam($ref)
 {
 echo is_multiscoped($ref);//True
 }
 
 $jim = nothing special;
 
 echo is_multiscoped($jim); //False
 
 getJam($jim);
 
 
 ?
 
 On Tue, Feb 1, 2011 at 7:12 PM, Tommy Pham tommy...@gmail.com wrote:
 
   -Original Message-
   From: Brad Lorge [mailto:b...@lorge.com.au]
   Sent: Monday, January 31, 2011 9:53 PM
   To: php-general@lists.php.net
   Subject: [PHP] Detecting Multi-Scope Variables
  
   Hello All,
  
   I am new to the list so please be gentle :)
  
   I am working on a PHP framework and have run up against a
 functionality
   hurdle which I keep falling at. Basically, I have three mechanisms
 which
  all
   function in a similar way and require this functionality:
 templating,
  event
   handling and action handling. Within the core code of the
 application,
  as
   is common with many applications with plugin architecture, I pass a
  number
   of parameters to functions which have hooked into a particular
 event.
  Part
   of the mechanism is that parameters can be passed by reference to
 allow
   for the listeners to make modifications.
  
   $username=bob;$account_type=ISV;$password=fishbum;
  
   register_action_listener('process_user', function($username,
   $account_type, $password){$username.=. . $account_type;} // Or
   whatever
  
   call_action('process_user', $username, $account_type,
 $password);
   //Result: $username == bob.ISV
 
  I think you meant to use [1].
 
  
   Now, what I am trying to do is establish a method to prevent the
 hook
   functions from making changes by reference without reference
 explicitly
   being passed to them by the calling code.
  
 
  Perhaps you  should review [2] and see if your logic works with your
  'call_action'.
 
   I have thought of a method which simply makes a copy of all the
  parameters
   for each listener within call_action(), however what I would really
 love
  is a
   function which returns whether or not the supplied variable is
 available
  in
   multiple scopes or is in the original scope which it was
 initialized in.
   Does anyone know of a way to achieve this?
  
   Regards,
   Brad
 
  Happy coding,
  Tommy
 
  [1] http://php.net/call_user_func
  [2] http://php.net/references
 
 
 

 In more low level languages like C and C++ you could look at the actual
 value of the pointer, I'm not sure that that is available in php.


 Thanks
 Ash
 http://www.ashleysheridan.co.uk
 --
 Sent from my Android phone with K-9 Mail. Please excuse my brevity.



[PHP] Detecting Multi-Scope Variables

2011-01-31 Thread Brad Lorge
Hello All,

I am new to the list so please be gentle :)

I am working on a PHP framework and have run up against a functionality
hurdle which I keep falling at. Basically, I have three mechanisms which all
function in a similar way and require this functionality: templating, event
handling and action handling. Within the core code of the application, as
is common with many applications with plugin architecture, I pass a number
of parameters to functions which have hooked into a particular event. Part
of the mechanism is that parameters can be passed by reference to allow for
the listeners to make modifications.

$username=bob;$account_type=ISV;$password=fishbum;

register_action_listener('process_user', function($username, $account_type,
$password){$username.=. . $account_type;} // Or whatever

call_action('process_user', $username, $account_type, $password);
//Result: $username == bob.ISV

Now, what I am trying to do is establish a method to prevent the hook
functions from making changes by reference without reference explicitly
being passed to them by the calling code.

I have thought of a method which simply makes a copy of all the parameters
for each listener within call_action(), however what I would really love is
a function which returns whether or not the supplied variable is available
in multiple scopes or is in the original scope which it was initialized in.
Does anyone know of a way to achieve this?

Regards,
Brad


RE: [PHP] Re: How safe is a .htaccess file?

2010-08-24 Thread Brad Broerman
One thing I would do, and I have done this in many of my applications:

   a) Store the username / password in a database.
   b) Encrypt passwords (with a salt) with AES-256 using a key stored in a
file OUTSIDE the document path.
   c) Add code to the beginning of the included file to ensure it is only
executed by approved files.

?php

 if( 0 == preg_match( /maplerunfarm-secure\/admin.php/,
$_SERVER[SCRIPT_FILENAME] ) )
 {
 exit(Error: invalid inclusion of file. Please contact your system
administrator);
 }


 $CONST_SECURE_KEY = DKTAZ+2EFaSHexdE0hbKJKiO/mQeF1hd;

?

-Original Message-
From: Jan G.B. [mailto:ro0ot.w...@googlemail.com] 
Sent: Tuesday, August 24, 2010 9:09 AM
To: Andre Polykanine
Cc: Nathan Rixham; tedd; php-general@lists.php.net
Subject: Re: [PHP] Re: How safe is a .htaccess file?

2010/8/19 Andre Polykanine an...@oire.org:
 Hello Nathan,

 Sorry, could you provide any links to read for a security noob?)
 Actually, I know that the md5 is decryptable (there are bases with
 words encrypted in md5), but I thought the SHA1 was secure...
 --
 With best regards from Ukraine,
 Andre
 - Original message -
 From: Nathan Rixham nrix...@gmail.com
 To: tedd t...@sperling.com
 Date: Thursday, August 19, 2010, 12:03:12 PM
 Subject: [PHP] Re: How safe is a .htaccess file?

 tedd wrote:
 Hi gang:

 The subject line says it all.

 How secure is a .htaccess file to store passwords and other sensitive
 stuff?

 Can a .htaccess file be viewed remotely?

 Semi-safe,

 .htaccess is prevented from being served by configuration options (which
 come as default), however these can be overwritten so best to check by
 doing a GET on the resource URI.

 This doesn't prevent them from being exposed via other processes though,
 for instance a poorly coded 'download.php?path=/path/to/.htaccess' could
 still expose the file.

 Typically, its obviously better to store only a hash of a password
 rather than the pass in plain text, choosing the strongest algorithm you
 can; password security is of course relative though, a sha-512 of
 'password1' is far from secure.

 A good way to approach encryption for files is to openssl_seal them
 using a public key which is only available to your application - this
 doesn't negate insecure code, but it at least ensures the raw files are
 encrypted securely enough to negate any of these worries. (just keep
 your private key safe, preferably in a pkcs12 w/a strong 64char+ pass)

 Best,

 Nathan

 --
 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


Hi Nathan,

I'm not a crypto expert.. but I'll try to explain it:

The weakness of MD5 is mainly because MD5 collisions are possible.
That means, that different strings can have the same MD5-hash...

When you use test as a secret password, then no hashing algorythm at
can be considered as safe. The first two passwords a cracker will
try might be 1234 and test.. No big deal.

Databases of MD5-hashes exists. And so can exist Databases of SHA-*
hashes. To get around these databases you can just salt your hash..
that way the Hash of the word test will not be the same as the hash
in the database without *your* salt. No matter if you use MD5 or
SHA256

$ echo -ne test | md5sum
098f6bcd4621d373cade4e832627b4f6  -
$ echo -ne test-mySecretSalt | md5sum
c62fb41567c476e36ba46e5b53ae6d59  -

Only the first string will be available in a hash-database.

So you see - as long as a cracker only get's your salted hashes
WITHOUT the used salt, it's pretty safe.. as long as you don't think
about ignore collisions!



Back to topic:
 - as mentioned before the biggest risk in authentication via .ht*
files is that one can try to get these files via a bug in an
application.. (e.g. ?read_file=.htaccess%00)
 - that's why you don't want to use plain text-passwords in .htaccess
files. most used is the htdigest algorythm. Be sure to use a STRONG
password: long string with letter, numbers and more chars.
 - if you're curious, get a copy of John the Ripper password cracker
and try to decode your passwords.. that's what the bad guys use once
they get your .htaccess file.


Regards



Regards


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



[PHP] regex pattern for extracting URLs

2009-10-23 Thread Brad Fuller
I'm looking for a regular expression to accomplish a specific task.

I'm hoping someone who's really good at regex patterns can lend a quick hand.

I need a regex pattern that will grab URLs out of HTML that have a
certain link text. (i.e. the word Continue)

This is what I have so far but it does not work properly (If there are
other attributes in the a tag it returns them as part of the URL.)

    
preg_match_all('#a[\s]+[^]*href\s*=\s*([\\']+)([^]+?)(\1|)Continue/a#i',
$html, $matches);

It needs to be able to extract the URL and disregard arbitrary
attributes in the HTML tag

Test it with the following examples:

a href=/path/to/url.htmlContinue/a
a href='/path/to/url.html'Continue/a
a href=http://example.com/path/to/url.html; class=linkContinue/a
a style=font-size: 12px href=http://example.com/path/to/url.html;
onlick=someFunction('foo','bar')Continue/a

Please reply

Your help is much appreciated.

Thanks in advance,
Brad F.

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



Re: [PHP] regex pattern for extracting URLs

2009-10-23 Thread Brad Fuller
On Fri, Oct 23, 2009 at 1:28 PM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:

  On Fri, 2009-10-23 at 13:23 -0400, Brad Fuller wrote:

 I'm looking for a regular expression to accomplish a specific task.

 I'm hoping someone who's really good at regex patterns can lend a quick hand.

 I need a regex pattern that will grab URLs out of HTML that have a
 certain link text. (i.e. the word Continue)

 This is what I have so far but it does not work properly (If there are
 other attributes in the a tag it returns them as part of the URL.)

 
 preg_match_all('#a[\s]+[^]*href\s*=\s*([\\']+)([^]+?)(\1|)Continue/a#i',
 $html, $matches);

 It needs to be able to extract the URL and disregard arbitrary
 attributes in the HTML tag

 Test it with the following examples:

 a href=/path/to/url.htmlContinue/a
 a href='/path/to/url.html'Continue/a
 a href=http://example.com/path/to/url.html; class=linkContinue/a
 a style=font-size: 12px href=http://example.com/path/to/url.html;
 onlick=someFunction('foo','bar')Continue/a

 Please reply

 Your help is much appreciated.

 Thanks in advance,
 Brad F.



 preg_match_all('#a[\s]+[^]*href\s*=\s*[\\']+([^\\']+?).+?Continue/a#i',
 $html, $matches);

 I just changed your regex a bit. What your regex was previously doing was
 matching everything from the first quote after the href= right up until the
 first  it found, which would usually be the one that closes the opening
 tag. You could make it a bit more intelligent if you wished with
 backreferencing to make sure it matches against the same type of quotation
 character it matched as the start of the href's value.

   Thanks,
 Ash
 http://www.ashleysheridan.co.uk




I appreciate the help.  However, when try this I only get the first
character of the URL.  Can you double check it please.

Thanks again


Re: [PHP] regex pattern for extracting URLs

2009-10-23 Thread Brad Fuller
On Fri, Oct 23, 2009 at 1:48 PM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:

  On Fri, 2009-10-23 at 13:45 -0400, Brad Fuller wrote:

 On Fri, Oct 23, 2009 at 1:28 PM, Ashley Sheridan
 a...@ashleysheridan.co.ukwrote:

   On Fri, 2009-10-23 at 13:23 -0400, Brad Fuller wrote:
 
  I'm looking for a regular expression to accomplish a specific task.
 
  I'm hoping someone who's really good at regex patterns can lend a quick 
  hand.
 
  I need a regex pattern that will grab URLs out of HTML that have a
  certain link text. (i.e. the word Continue)
 
  This is what I have so far but it does not work properly (If there are
  other attributes in the a tag it returns them as part of the URL.)
 
  
  preg_match_all('#a[\s]+[^]*href\s*=\s*([\\']+)([^]+?)(\1|)Continue/a#i',
  $html, $matches);
 
  It needs to be able to extract the URL and disregard arbitrary
  attributes in the HTML tag
 
  Test it with the following examples:
 
  a href=/path/to/url.htmlContinue/a
  a href='/path/to/url.html'Continue/a
  a href=http://example.com/path/to/url.html; class=linkContinue/a
  a style=font-size: 12px href=http://example.com/path/to/url.html;
  onlick=someFunction('foo','bar')Continue/a
 
  Please reply
 
  Your help is much appreciated.
 
  Thanks in advance,
  Brad F.
 
 
 
  preg_match_all('#a[\s]+[^]*href\s*=\s*[\\']+([^\\']+?).+?Continue/a#i',
  $html, $matches);
 
  I just changed your regex a bit. What your regex was previously doing was
  matching everything from the first quote after the href= right up until the
  first  it found, which would usually be the one that closes the opening
  tag. You could make it a bit more intelligent if you wished with
  backreferencing to make sure it matches against the same type of quotation
  character it matched as the start of the href's value.
 
Thanks,
  Ash
  http://www.ashleysheridan.co.uk
 
 
 

 I appreciate the help.  However, when try this I only get the first
 character of the URL.  Can you double check it please.

 Thanks again


 I think it's probably the first ? in ([^\\']+?)

 Remove that and it should do the trick

   Thanks,
 Ash
 http://www.ashleysheridan.co.uk



That did the trick.  Thanks Ash you are awesome!

Also thanks Jim for your suggestion.  I may move to SimpleXML if the project
grows much bigger.  But for now I was looking for a nice one liner and this
is it.

Cheers,
Brad


Re: [PHP] regex pattern for extracting URLs

2009-10-23 Thread Brad Fuller
On Fri, Oct 23, 2009 at 1:54 PM, Israel Ekpo israele...@gmail.com wrote:


 On Fri, Oct 23, 2009 at 1:48 PM, Ashley Sheridan a...@ashleysheridan.co.uk
 wrote:

 On Fri, 2009-10-23 at 13:45 -0400, Brad Fuller wrote:

  On Fri, Oct 23, 2009 at 1:28 PM, Ashley Sheridan
  a...@ashleysheridan.co.ukwrote:
 
    On Fri, 2009-10-23 at 13:23 -0400, Brad Fuller wrote:
  
   I'm looking for a regular expression to accomplish a specific task.
  
   I'm hoping someone who's really good at regex patterns can lend a
   quick hand.
  
   I need a regex pattern that will grab URLs out of HTML that have a
   certain link text. (i.e. the word Continue)
  
   This is what I have so far but it does not work properly (If there are
   other attributes in the a tag it returns them as part of the URL.)
  
  
   preg_match_all('#a[\s]+[^]*href\s*=\s*([\\']+)([^]+?)(\1|)Continue/a#i',
   $html, $matches);
  
   It needs to be able to extract the URL and disregard arbitrary
   attributes in the HTML tag
  
   Test it with the following examples:
  
   a href=/path/to/url.htmlContinue/a
   a href='/path/to/url.html'Continue/a
   a href=http://example.com/path/to/url.html;
   class=linkContinue/a
   a style=font-size: 12px href=http://example.com/path/to/url.html;
   onlick=someFunction('foo','bar')Continue/a
  
   Please reply
  
   Your help is much appreciated.
  
   Thanks in advance,
   Brad F.
  
  
  
  
   preg_match_all('#a[\s]+[^]*href\s*=\s*[\\']+([^\\']+?).+?Continue/a#i',
   $html, $matches);
  
   I just changed your regex a bit. What your regex was previously doing
   was
   matching everything from the first quote after the href= right up
   until the
   first  it found, which would usually be the one that closes the
   opening
   tag. You could make it a bit more intelligent if you wished with
   backreferencing to make sure it matches against the same type of
   quotation
   character it matched as the start of the href's value.
  
     Thanks,
   Ash
   http://www.ashleysheridan.co.uk
  
  
  
 
  I appreciate the help.  However, when try this I only get the first
  character of the URL.  Can you double check it please.
 
  Thanks again


 I think it's probably the first ? in ([^\\']+?)

 Remove that and it should do the trick

 Thanks,
 Ash
 http://www.ashleysheridan.co.uk



 Hi Brad,

 I agree with Jim.

 Take a look at this. It might help.

 ?php

 $xml_string = TEXT_BOUNDARY
 html
     head
     title/title
     /head
     body
     div
     a href=http://example.com/path/to/urlA.html;Continue/a
     a href=http://example.com/path/to/url2.html;Brad Fuller/a
     a href=http://example.com/path/to/urlB.html;Continue/a
     a href=http://example.com/path/to/url4.html;PHP.net/a
     a href=http://example.com/path/to/urlC.html;
 class=linkContinue/a
     a style=font-size: 12px
 href=http://example.com/path/to/urlD.html;
 onclick=someFunction('foo','bar')Continue/a
     /div
     /body
 /html
 TEXT_BOUNDARY;

 $xml = simplexml_load_string($xml_string);

 $continue_hrefs = $xml-xpath(//a[text() = 'Continue']/@href);

 print_r($continue_hrefs);

 ?


Thanks, I'm sure I will use this at some point in the future :)

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



[PHP] RE: Paypal and Php

2009-05-03 Thread Brad Broerman
A couple years ago, I wrote a simple PayPal gateway. If you'd like, I can
zip up the files and send them to you. It's really not that difficult.

After registering, you have to call a SOAP api, redirect to their page, and
then call another api when they return to your site. I can go into more
detail later if you're interested. As others have mentioned, there are some
more complex Zend framework classes for this, but you may opt for the
simpler and more direct route...

Cheers,
  Brad Broerman


-Original Message-
From: Matthieu [mailto:spama...@gmail.com] 
Sent: Saturday, May 02, 2009 7:01 PM
To: php-general@lists.php.net
Subject: Paypal and Php

Hello,

I'd like to know if somebody already configured a paypal account usin php 
and a mysql database. What are the major things to know when starting to 
code the php code?

I know it's quite a large question but I'd like to know the amount of time 
needed, or if I directly go through a drupal server.

Thanks for your help

Matthieu 



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



[PHP] RE: Multiple return statements in a function.

2009-04-23 Thread Brad Broerman
Well, the latter method is generally easier to understand later. Most
programming style books preach this method, and it's the one that most of my
previous employers use.

Cheers...

-Original Message-
From: Peter van der Does [mailto:pvanderd...@gmail.com]
Sent: Thursday, April 23, 2009 8:13 AM
To: php-general@lists.php.net
Subject: Multiple return statements in a function.


I tend to put my return value in a variable and at the end of the
function I have 1 return statement.
I have seen others doing returns in the middle of the function.

Example how I do it:
function check($a) {
  $return='';
  if ( is_array( $a ) ) {
$return='Array';
  } else {
$return='Not Array';
  }
  return $return;
}

Example of the other method:
function check($a) {

  if ( is_array( $a ) ) {
return ('Array');
  } else {
return ('Not Array');
  }
}

What is your take? And is there any benefit to either method?


--
Peter van der Does

GPG key: E77E8E98
Blog: http://blog.avirtualhome.com
Forums: http://forums.avirtualhome.com
Jabber ID: pvanderd...@gmail.com

GetDeb Package Builder
http://www.getdeb.net - Software you want for Ubuntu


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



[PHP] RE: AJAX with POST

2009-04-04 Thread Brad Broerman
Well, as the A in Ajax is asynchronous, there's no real way to make it
wait. What you would normally do is use a callback:

function createXHRObject( )
{
if (typeof XMLHttpRequest != undefined)
{
return new XMLHttpRequest();
}
else if (typeof ActiveXObject != undefined)
{
return new ActiveXObject(Microsoft.XMLHTTP);
}
else
{
throw new Error(XMLHttpRequest not supported);
}
}

function sendAjaxRequest( websvcurl , params, callbackFn )
{
var xhrObject = createXHRObject();

xhrObject.open(POST, websvcurl, true);
xhrObject.onreadystatechange = function()
{
if (xhrObject.readyState == 4)
{
if( xhrObject.responseXML != null )
{
callbackFn (xhrObject.responseXML);
}
}
}

xhrObject.setRequestHeader(Content-type,
application/x-www-form-urlencoded);
xhrObject.setRequestHeader(Content-length, params.length);
xhrObject.setRequestHeader(Connection, close);
xhrObject.send(params);
}


-Original Message-
From: Skip Evans [mailto:s...@bigskypenguin.com]
Sent: Saturday, April 04, 2009 5:30 PM
To: php-general@lists.php.net
Subject: AJAX with POST


Hey all,

At the risk of being told this is a PHP and not a JS list, but
also knowing the discussions on this list, to the benefit of
all I believe, very wildly, I'm posting this JS code snippet
for some advice.

As I posted earlier, my AJAX app that uses a GET to post to
the server (and get a response), fails on IE with larger data,
so I thought I'd take a shot at writing a POST function, but
so far I can get it to get the data back, but the problem is
by the time the data has come back the function has already
returned null back to the calling function. What I need this
function to do is wait for the data to come back and then send
it back to caller. Here's the function. Any advice would be
greatly appreciated. (The code to get the appropriate object
per browser has been omitted.)

http.open(POST, url, true);

//Send the proper header information along with the request
http.setRequestHeader(Content-type,
application/x-www-form-urlencoded);
http.setRequestHeader(Content-length, url.length);
http.setRequestHeader(Connection, close);

http.send(url);

http.onreadystatechange = function() {//Call a function when
the state changes.
if(http.readyState == 4  http.status == 200) {
alert('['+http.responseText+']');
return (http.responseText);
}
}
--

Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com

Those of you who believe in
telekinesis, raise my hand.
  -- Kurt Vonnegut


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



[PHP] Issues with mcrypt (Rijndael 128) and external C application.

2009-03-14 Thread Brad Broerman
Hi, I am trying to encode a string using Rijndael-128 using a C application
that I wrote, based on the BSD crypt/rijndael libarary and decode it in PHP
using mcrypt_decrypt. Each part of the program works separately (I can
encrypt with the c app, and decrypt with it, and I can encrypt with
mcrypt_encrypt and decrypt with the mcrypt_decrypt method).

Both use CBC mode, and I have the C process generate a random IV that is
also sent to the PHP process. I have verified that the IV is correctly
picked off of the stream, and stored.

Additionally, the key is stored in hex, and converted to binary for both
processes. The output strings are converted to Base64.

Both applications are currently running on the same system.

Demo app is at http://www.bbroerman.net/aestest.php

The PHP code for the decode is:

// Base64 decode the input (turn into binary)
$decoded = base64_decode($decrypt);

// Get the size of the IV
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);

// Split the incoming message into the original IV and the cryptext
$iv = substr($decoded,0,$iv_size);
$string = substr($decoded,$iv_size);

// Decode the cryptext.
$decrypted = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, pack('H*',$key), $string,
MCRYPT_MODE_CBC, $iv);


and the C code for encrypt is (unnecessary helper methods removed):

// Convert key to binary from a hex string.
char* binkey = NULL;
int tmpkeylen;
hex2dec( key, binkey, tmpkeylen );

// Make sure the message is padded to the correct block length.
unsigned int msglen = strlen(messageSrc);
char* paddedMsg = NULL;
if( msglen % 16 != 0 )
{
int padding = 16 - msglen % 16;
paddedMsg = malloc( msglen + padding + 1 );
memset( paddedMsg, 0, msglen + padding + 1 );
strncpy( paddedMsg, messageSrc, msglen );
msglen = msglen + padding;
}
else
{
paddedMsg = malloc( msglen+1 );
memset( paddedMsg, 0, msglen+1 );
strncpy( paddedMsg, messageSrc, msglen );
}

// Build a random IV block.
int idx;
char iv[RIJNDAEL_MAX_IV_SIZE];
for(idx = 0; idx  RIJNDAEL_MAX_IV_SIZE; ++idx)
{
iv[idx] = get_random()  0xFF;
}

// Initialize the cypher instance, in CBC mode.
int retCd = rijndael_cipherInit(ci, MODE_CBC, iv);

// Make the key.
rijndael_makeKey(ki, DIR_ENCRYPT, 128, binkey);

// Encrypt the message.
out = (char*)malloc(msglen*8);
retCd = rijndael_blockEncrypt(ci, ki, paddedMsg, msglen * 8, out);

// Now, take the IV and the output cryptext, and compose the output message.
char* fullmsgbuff = malloc( RIJNDAEL_MAX_IV_SIZE + msglen + 1);

for( idx = 0; idx  RIJNDAEL_MAX_IV_SIZE; ++idx )
fullmsgbuff[idx] = iv[idx];

for(; idx  RIJNDAEL_MAX_IV_SIZE + msglen; ++idx )
fullmsgbuff[idx] = out[idx - RIJNDAEL_MAX_IV_SIZE];

// Base64 encode the output.
char* buffout;
base64encode(fullmsgbuff, msglen + RIJNDAEL_MAX_IV_SIZE, buffout);

// and print it all out.
fprintf(stdout, %s, buffout);


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



[PHP] strtr array replace issue...

2009-02-09 Thread Brad Freshour
Apache: 2.2.8 threaded
 PHP: 5.2.4-2
 mySQL: 5.051.a

 Ubuntu 8.04 minimal with everything needed installed via apt-get.

 Using SMF forum, I'm having an issue with the strtr command...  Here's
 the code...

 $ftp_file = strtr($filename, array ($_SESSION['pack_ftp']['root'] =''));

 The $_SESSION['pack_ftp']['root'] variable is an empty set: ''

 Well, if the above strtr command was translated it would look like this:

 strtr(/home/user/public_html/Packages/temp, array ('' =''));

 You would think that the return would be : /home/user/public_html/Packages/temp

 However, it returns '' instead.

 I can get around this by modifying the code to the site manually and
 checking to see if $_SESSION['pack_ftp']['root'] == '' and if it does
 assign it something crazy, like $_SESSION['pack_ftp']['root'] =
 '%'

 However, the code works on another site I have that's hosted for me
 (shared hosting).

 Anyone have any ideas?

 I was wondering if it was related to this: http://bugs.php.net/bug.php?id=27457
 But that seems like an old bug...

 Thanks.

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



[PHP] running python in php timeout

2008-12-29 Thread brad

Hi,

I'm executing a python script from php that runs quite a long time (15+ 
minutes) and ends up timing out. Is there a way I can execute the python 
code and move on executing the remaining php code on the page?

Thanks!

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



[PHP] two small issues with php mail

2007-11-19 Thread Brad
Implementing Bcc and smtp.

 

#1 email is only being sent to a few recipients.

I need to implement 

$smtp = ‘localhost’; 

Somewhere, but I keep getting parse errors?

 

#2 trying to do a Bcc but that gives me parse errors as well

It should be as easy as?

$Bcc [EMAIL PROTECTED]; $eol = \r\n;

 

Here is the working code, but if I implement the above needed inserts
anywhere, I get a big ‘ol fat parse error

 

Any assistance would be truly appreciated.

An explanation of why would really help since this is for a school project.

 

Working code as is:

 

?

$email = $_REQUEST['email'];

$fromaddress = '[EMAIL PROTECTED]';

$fromname = 'Zone of success Club'; $eol = \r\n;

$headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;

// $headers = 'bcc: '[EMAIL PROTECTED]';

$headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;

$headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;

$headers .= 'X-Mailer: PHP '.phpversion().$eol;

$headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;

$headers .= 'Content-Transfer-Encoding: 8bit';

$subject = 'Your free book!';

$body = 'a
href=http://www.zoneofsuccessclub.com/freePDF/autopilotebook.pdf;Click
ME/a  Here is your FREE autopilot book';

mail($email, $subject, $body, $headers);

?


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 


RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
$headers = 'bcc: [EMAIL PROTECTED]';

Works but corrupts the from portion and changes it to nobody
Which I think goes back too the smtp portion.
Let me try that!

Thank you!

-Original Message-
From: Jim Lucas [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 12:49 PM
To: Brad
Cc: php-general@lists.php.net
Subject: Re: [PHP] two small issues with php mail

Brad wrote:
 Implementing Bcc and smtp.
 
  
 
 #1 email is only being sent to a few recipients.
 
 I need to implement 
 
 $smtp = ‘localhost’; 

if the previous line is a cut/paste, it looks like you are using M$ special
quotes or back tics maybe.

make sure they are single or double quotes and you should be good to go.

 
 Somewhere, but I keep getting parse errors?
 
  
 
 #2 trying to do a Bcc but that gives me parse errors as well
 
 It should be as easy as?
 
 $Bcc [EMAIL PROTECTED]; $eol = \r\n;
 
  
 
 Here is the working code, but if I implement the above needed inserts
 anywhere, I get a big ‘ol fat parse error
 
  
 
 Any assistance would be truly appreciated.
 
 An explanation of why would really help since this is for a school
project.
 
  
 
 Working code as is:
 
  
 
 ?
 
 $email = $_REQUEST['email'];
 
 $fromaddress = '[EMAIL PROTECTED]';
 
 $fromname = 'Zone of success Club'; $eol = \r\n;
 
 $headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;
 
 // $headers = 'bcc: '[EMAIL PROTECTED]';
You have an extra single quote in the previous line.  Hence your parse
error.

 
 $headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;
 
 $headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;
 
 $headers .= 'X-Mailer: PHP '.phpversion().$eol;
 
 $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;
 
 $headers .= 'Content-Transfer-Encoding: 8bit';
 
 $subject = 'Your free book!';
 
 $body = 'a
 href=http://www.zoneofsuccessclub.com/freePDF/autopilotebook.pdf;Click
 ME/a  Here is your FREE autopilot book';
 
 mail($email, $subject, $body, $headers);
 
 ?
 
 
 No virus found in this outgoing message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date:
11/18/2007
 5:15 PM
  
 


-- 
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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
No parse error, but still nobody.

Here is my new code.

How do you tell the difference between the need for '' and ?

Working kind of code

?
$email = $_REQUEST['email'];
$fromaddress = '[EMAIL PROTECTED]';
$fromname = 'Zone of success Club'; $eol = \r\n;
$smtp = localhost;
$headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;
$headers = 'bcc: [EMAIL PROTECTED]';
$headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;
$headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;
$headers .= 'X-Mailer: PHP '.phpversion().$eol;
$headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;
$headers .= 'Content-Transfer-Encoding: 8bit';
$subject = 'Your free book!';
$body = 'a
href=http://www.zoneofsuccessclub.com/freePDF/autopilotebook.pdf;Click
ME/a  Here is your FREE autopilot book';
mail($email, $subject, $body, $headers);
?



-Original Message-
From: Brad [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 1:26 PM
To: 'Jim Lucas'
Cc: php-general@lists.php.net
Subject: RE: [PHP] two small issues with php mail

$headers = 'bcc: [EMAIL PROTECTED]';

Works but corrupts the from portion and changes it to nobody
Which I think goes back too the smtp portion.
Let me try that!

Thank you!

-Original Message-
From: Jim Lucas [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 12:49 PM
To: Brad
Cc: php-general@lists.php.net
Subject: Re: [PHP] two small issues with php mail

Brad wrote:
 Implementing Bcc and smtp.
 
  
 
 #1 email is only being sent to a few recipients.
 
 I need to implement 
 
 $smtp = ‘localhost’; 

if the previous line is a cut/paste, it looks like you are using M$ special
quotes or back tics maybe.

make sure they are single or double quotes and you should be good to go.

 
 Somewhere, but I keep getting parse errors?
 
  
 
 #2 trying to do a Bcc but that gives me parse errors as well
 
 It should be as easy as?
 
 $Bcc [EMAIL PROTECTED]; $eol = \r\n;
 
  
 
 Here is the working code, but if I implement the above needed inserts
 anywhere, I get a big ‘ol fat parse error
 
  
 
 Any assistance would be truly appreciated.
 
 An explanation of why would really help since this is for a school
project.
 
  
 
 Working code as is:
 
  
 
 ?
 
 $email = $_REQUEST['email'];
 
 $fromaddress = '[EMAIL PROTECTED]';
 
 $fromname = 'Zone of success Club'; $eol = \r\n;
 
 $headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;
 
 // $headers = 'bcc: '[EMAIL PROTECTED]';
You have an extra single quote in the previous line.  Hence your parse
error.

 
 $headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;
 
 $headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;
 
 $headers .= 'X-Mailer: PHP '.phpversion().$eol;
 
 $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;
 
 $headers .= 'Content-Transfer-Encoding: 8bit';
 
 $subject = 'Your free book!';
 
 $body = 'a
 href=http://www.zoneofsuccessclub.com/freePDF/autopilotebook.pdf;Click
 ME/a  Here is your FREE autopilot book';
 
 mail($email, $subject, $body, $headers);
 
 ?
 
 
 No virus found in this outgoing message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date:
11/18/2007
 5:15 PM
  
 


-- 
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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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


No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
Apperently my smtp portion is not working.
This did not solve my problem of sending email to only 50% of the
recipients, just no parse error
This is what the php mail manual page suggest?

And

Where should the bcc go if not the header?



-Original Message-
From: Per Jessen [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 1:55 PM
To: php-general@lists.php.net
Subject: RE: [PHP] two small issues with php mail

Brad wrote:

 $headers = 'bcc: [EMAIL PROTECTED]';
 
 Works but corrupts the from portion and changes it to nobody
 Which I think goes back too the smtp portion.

There is no bcc: header. BCC'ing someone is normally done by sending
them the email without listing them explicitly in to: or cc:.


/Per Jessen, Zürich

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


No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
PHP mailer is not in the assignment and will be counted against me!

-Original Message-
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 3:43 PM
To: Brad
Cc: php-general@lists.php.net
Subject: Re: [PHP] two small issues with php mail

Brad wrote:
 Implementing Bcc and smtp.

Here we go again

 #1 email is only being sent to a few recipients.
 
 I need to implement 
 
 $smtp = ‘localhost’; 
 
 Somewhere, but I keep getting parse errors?

Those are not normal quotes, but I'm guessing you actually typed that in 
the evil that is Outlook.

 #2 trying to do a Bcc but that gives me parse errors as well
 
 It should be as easy as?
 
 $Bcc [EMAIL PROTECTED]; $eol = \r\n;

That's not valid code. Ok, the second bit is, but still rather pointless.

 Here is the working code, but if I implement the above needed inserts
 anywhere, I get a big ‘ol fat parse error
 
 Any assistance would be truly appreciated.
 
 An explanation of why would really help since this is for a school
project.

Ahh, suddenly everything becomes clear. You can't use PHPMailer because 
that would mean that you didn't learn it yourself you just used somebody 
elses work. So instead you ask here rather than reading the PHPMailer 
source code. Nice.

 Working code as is:
 
 ?
 
 $email = $_REQUEST['email'];
 
 $fromaddress = '[EMAIL PROTECTED]';
 
 $fromname = 'Zone of success Club'; $eol = \r\n;
 
 $headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;
 
 // $headers = 'bcc: '[EMAIL PROTECTED]';

This should work. However, because you're assigning this to $headers 
rather than concatenating it you're trampling over the From line above.

BTW, Bcc usually has a capital letter. Probably wouldn't cause any 
problems but has the potential to stop it working.

 $headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;
 
 $headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;
 
 $headers .= 'X-Mailer: PHP '.phpversion().$eol;
 
 $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;
 
 $headers .= 'Content-Transfer-Encoding: 8bit';
 
 $subject = 'Your free book!';
 
 $body = 'a
 href=http://www.zoneofsuccessclub.com/freePDF/autopilotebook.pdf;Click
 ME/a  Here is your FREE autopilot book';

Click ME indeed. I'm guessing this isn't an HCI course you're doing.

 mail($email, $subject, $body, $headers);
 
 ?

Try the veal.

-Stut

-- 
http://stut.net/

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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
This information is pulled directly off the php website when used for other
applications, so if I am wrong, then so are they.

As for php mailer, my professor explained it very well today,
Learn the in's and out's of the programming and it's quarks to understand
the logic and then he will show us the tricks.

Yes, here we go again!

I am just seeking valid knowledge and understanding. Reading material is
great too as long as it is relevant.

Sarcasm does not help with the learning curve sir!

-Original Message-
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 3:43 PM
To: Brad
Cc: php-general@lists.php.net
Subject: Re: [PHP] two small issues with php mail

Brad wrote:
 Implementing Bcc and smtp.

Here we go again

 #1 email is only being sent to a few recipients.
 
 I need to implement 
 
 $smtp = ‘localhost’; 
 
 Somewhere, but I keep getting parse errors?

Those are not normal quotes, but I'm guessing you actually typed that in 
the evil that is Outlook.

 #2 trying to do a Bcc but that gives me parse errors as well
 
 It should be as easy as?
 
 $Bcc [EMAIL PROTECTED]; $eol = \r\n;

That's not valid code. Ok, the second bit is, but still rather pointless.

 Here is the working code, but if I implement the above needed inserts
 anywhere, I get a big ‘ol fat parse error
 
 Any assistance would be truly appreciated.
 
 An explanation of why would really help since this is for a school
project.

Ahh, suddenly everything becomes clear. You can't use PHPMailer because 
that would mean that you didn't learn it yourself you just used somebody 
elses work. So instead you ask here rather than reading the PHPMailer 
source code. Nice.

 Working code as is:
 
 ?
 
 $email = $_REQUEST['email'];
 
 $fromaddress = '[EMAIL PROTECTED]';
 
 $fromname = 'Zone of success Club'; $eol = \r\n;
 
 $headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;
 
 // $headers = 'bcc: '[EMAIL PROTECTED]';

This should work. However, because you're assigning this to $headers 
rather than concatenating it you're trampling over the From line above.

BTW, Bcc usually has a capital letter. Probably wouldn't cause any 
problems but has the potential to stop it working.

 $headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;
 
 $headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;
 
 $headers .= 'X-Mailer: PHP '.phpversion().$eol;
 
 $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;
 
 $headers .= 'Content-Transfer-Encoding: 8bit';
 
 $subject = 'Your free book!';
 
 $body = 'a
 href=http://www.zoneofsuccessclub.com/freePDF/autopilotebook.pdf;Click
 ME/a  Here is your FREE autopilot book';

Click ME indeed. I'm guessing this isn't an HCI course you're doing.

 mail($email, $subject, $body, $headers);
 
 ?

Try the veal.

-Stut

-- 
http://stut.net/

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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
This is why I am on this mailing instead of the php site for their mailer
which is utterly useless!

I could probably recite the entire page by heart and gained nothing compared
to the insight and reading material offered by this list.

Just seeking knowledgeable guidance!

Any assistance on methods to solve my issue would be duly appreciated!

-Original Message-
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 4:17 PM
To: Brad
Cc: php-general@lists.php.net
Subject: Re: [PHP] two small issues with php mail

Brad wrote:
 This information is pulled directly off the php website when used for
other
 applications, so if I am wrong, then so are they.
 
 As for php mailer, my professor explained it very well today,
 Learn the in's and out's of the programming and it's quarks to understand
 the logic and then he will show us the tricks.

I wouldn't call PHPMailer a trick as such, but your professor is 
absolutely right about learning the in's and out's of programming. 
Unfortunately your posts so far have demonstrated that you haven't yet 
grasped the syntactic basics yet but it doesn't seem to bother you.

 Yes, here we go again!
 
 I am just seeking valid knowledge and understanding. Reading material is
 great too as long as it is relevant.

The use of BCC with the PHP mail function is pretty well-explained on 
the PHP manual page for said function.

 Sarcasm does not help with the learning curve sir!

You will find that if you read my reply carefully the answers you seek 
are in there. I rarely answer a question with sarcasm alone, but I'm a 
little ashamed to say that it does happen occasionally.

I hang about on this list for entertainment. I get that from helping 
people and mocking those I think deserve it. If you don't like it feel 
free to ignore me or add me to your kill list, but don't ask me to stop.

-Stut

-- 
http://stut.net/

 -Original Message-
 From: Stut [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 19, 2007 3:43 PM
 To: Brad
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] two small issues with php mail
 
 Brad wrote:
 Implementing Bcc and smtp.
 
 Here we go again
 
 #1 email is only being sent to a few recipients.

 I need to implement 

 $smtp = ‘localhost’; 

 Somewhere, but I keep getting parse errors?
 
 Those are not normal quotes, but I'm guessing you actually typed that in 
 the evil that is Outlook.
 
 #2 trying to do a Bcc but that gives me parse errors as well

 It should be as easy as?

 $Bcc [EMAIL PROTECTED]; $eol = \r\n;
 
 That's not valid code. Ok, the second bit is, but still rather pointless.
 
 Here is the working code, but if I implement the above needed inserts
 anywhere, I get a big ‘ol fat parse error

 Any assistance would be truly appreciated.

 An explanation of why would really help since this is for a school
 project.
 
 Ahh, suddenly everything becomes clear. You can't use PHPMailer because 
 that would mean that you didn't learn it yourself you just used somebody 
 elses work. So instead you ask here rather than reading the PHPMailer 
 source code. Nice.
 
 Working code as is:

 ?

 $email = $_REQUEST['email'];

 $fromaddress = '[EMAIL PROTECTED]';

 $fromname = 'Zone of success Club'; $eol = \r\n;

 $headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;

 // $headers = 'bcc: '[EMAIL PROTECTED]';
 
 This should work. However, because you're assigning this to $headers 
 rather than concatenating it you're trampling over the From line above.
 
 BTW, Bcc usually has a capital letter. Probably wouldn't cause any 
 problems but has the potential to stop it working.
 
 $headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;

 $headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;

 $headers .= 'X-Mailer: PHP '.phpversion().$eol;

 $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;

 $headers .= 'Content-Transfer-Encoding: 8bit';

 $subject = 'Your free book!';

 $body = 'a
 href=http://www.zoneofsuccessclub.com/freePDF/autopilotebook.pdf;Click
 ME/a  Here is your FREE autopilot book';
 
 Click ME indeed. I'm guessing this isn't an HCI course you're doing.
 
 mail($email, $subject, $body, $headers);

 ?
 
 Try the veal.
 
 -Stut

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
Well, since

http://forums.hostmysite.com/about1171.html

states

$headers .= CC: [EMAIL PROTECTED];

Which does not work for me AT ALL and Stut called me a [EMAIL PROTECTED] for 
doing
it, I am assuming that all this key wording on google is not going to and
the problem appears to be else where!



-Original Message-
From: Wolf [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 4:39 PM
To: Brad
Cc: php-general@lists.php.net; 'Stut'
Subject: RE: [PHP] two small issues with php mail

Since it is not in the assignment, find out how to do things within the
parameters of your assignment.

http://www.google.com
php: {issue}

Googling PHP: mail bcc (sans quotes) has 5 viable workings on how to do
it.  If it fails, then you need to be examing the php.ini file for
information or talking with the server admins as to what piece is wrong.
Also, if you are error checking your own stuff, then the error log should be
able to tell you what has failed out.

I'm glad your professor is teaching you how to learn, but shouldn't this be
something you should be able to do already?  

And wasn't this whole thing started with you looking for something that you
were already too much money into to change for the next roll-out?  So now
you are fessing up to trying to get the PHP board to do your assignments for
you?

I sure hope your instructor is on this board too...

Wolf

 Brad [EMAIL PROTECTED] wrote: 
 PHP mailer is not in the assignment and will be counted against me!
 
 -Original Message-
 From: Stut [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 19, 2007 3:43 PM
 To: Brad
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] two small issues with php mail
 
 Brad wrote:
  Implementing Bcc and smtp.
 
 Here we go again
 
  #1 email is only being sent to a few recipients.
  
  I need to implement 
  
  $smtp = ‘localhost’; 
  
  Somewhere, but I keep getting parse errors?
 
 Those are not normal quotes, but I'm guessing you actually typed that in 
 the evil that is Outlook.
 
  #2 trying to do a Bcc but that gives me parse errors as well
  
  It should be as easy as?
  
  $Bcc [EMAIL PROTECTED]; $eol = \r\n;
 
 That's not valid code. Ok, the second bit is, but still rather pointless.
 
  Here is the working code, but if I implement the above needed inserts
  anywhere, I get a big ‘ol fat parse error
  
  Any assistance would be truly appreciated.
  
  An explanation of why would really help since this is for a school
 project.
 
 Ahh, suddenly everything becomes clear. You can't use PHPMailer because 
 that would mean that you didn't learn it yourself you just used somebody 
 elses work. So instead you ask here rather than reading the PHPMailer 
 source code. Nice.
 
  Working code as is:
  
  ?
  
  $email = $_REQUEST['email'];
  
  $fromaddress = '[EMAIL PROTECTED]';
  
  $fromname = 'Zone of success Club'; $eol = \r\n;
  
  $headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;
  
  // $headers = 'bcc: '[EMAIL PROTECTED]';
 
 This should work. However, because you're assigning this to $headers 
 rather than concatenating it you're trampling over the From line above.
 
 BTW, Bcc usually has a capital letter. Probably wouldn't cause any 
 problems but has the potential to stop it working.
 
  $headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;
  
  $headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;
  
  $headers .= 'X-Mailer: PHP '.phpversion().$eol;
  
  $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;
  
  $headers .= 'Content-Transfer-Encoding: 8bit';
  
  $subject = 'Your free book!';
  
  $body = 'a
 
href=http://www.zoneofsuccessclub.com/freePDF/autopilotebook.pdf;Click
  ME/a  Here is your FREE autopilot book';
 
 Click ME indeed. I'm guessing this isn't an HCI course you're doing.
 
  mail($email, $subject, $body, $headers);
  
  ?
 
 Try the veal.
 
 -Stut
 
 -- 
 http://stut.net/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 No virus found in this incoming message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date:
11/18/2007
 5:15 PM
  
 
 No virus found in this outgoing message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date:
11/18/2007
 5:15 PM
  
 
 --
 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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
You say

 The use of BCC with the PHP mail function is pretty well-explained on 
 the PHP manual page for said function.

I say,

No it doesn't, I tried everything on that page and it either parse error'ed
or didn't work.

The php manual page goes from baby basics to crazy smtp authentication
processes with a snippet of my issue which when extracted does not work.
When add lib is added, it does not work, when the entire code piece is
extracted, it does not work, when attempted to clean it up and cater to my
environment, it parse errors.

How about a relational examination or how they got from point a to point d?

-Original Message-
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 4:41 PM
To: Brad
Cc: php-general@lists.php.net
Subject: Re: [PHP] two small issues with php mail

Brad wrote:
 This is why I am on this mailing instead of the php site for their mailer
 which is utterly useless!
 
 I could probably recite the entire page by heart and gained nothing
compared
 to the insight and reading material offered by this list.
 
 Just seeking knowledgeable guidance!
 
 Any assistance on methods to solve my issue would be duly appreciated!

Once again... my reply contained everything you needed to get your code 
to work properly. Please read it again.

-Stut

-- 
http://stut.net/

 -Original Message-
 From: Stut [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 19, 2007 4:17 PM
 To: Brad
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] two small issues with php mail
 
 Brad wrote:
 This information is pulled directly off the php website when used for
 other
 applications, so if I am wrong, then so are they.

 As for php mailer, my professor explained it very well today,
 Learn the in's and out's of the programming and it's quarks to understand
 the logic and then he will show us the tricks.
 
 I wouldn't call PHPMailer a trick as such, but your professor is 
 absolutely right about learning the in's and out's of programming. 
 Unfortunately your posts so far have demonstrated that you haven't yet 
 grasped the syntactic basics yet but it doesn't seem to bother you.
 
 Yes, here we go again!

 I am just seeking valid knowledge and understanding. Reading material is
 great too as long as it is relevant.
 
 The use of BCC with the PHP mail function is pretty well-explained on 
 the PHP manual page for said function.
 
 Sarcasm does not help with the learning curve sir!
 
 You will find that if you read my reply carefully the answers you seek 
 are in there. I rarely answer a question with sarcasm alone, but I'm a 
 little ashamed to say that it does happen occasionally.
 
 I hang about on this list for entertainment. I get that from helping 
 people and mocking those I think deserve it. If you don't like it feel 
 free to ignore me or add me to your kill list, but don't ask me to stop.
 
 -Stut

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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
I am very much aware of phpinfo()
Which has nothing to do with being able to edit the php.ini file!

-Original Message-
From: Wolf [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 4:59 PM
To: Brad; php-general
Subject: RE: [PHP] two small issues with php mail

1.  Always copy the list back
2.  HERE is the right word you want, since you can't HEAR someone's on email
or when reading the system files.  Maybe you should take English  Grammar
101 for your next course.
3.  Who says you need access to the server backend...  Google phpinfo() - 
very basic,  ALL books say to make this page when verifying PHP is installed
correctly.

I didn't assume anything, merely followed the threads.  And since from the
looks of things the thread has not changed, the back-story has...  Well draw
your own conclusions there.

Wolf

 Brad [EMAIL PROTECTED] wrote: 
 Wolf write!
 ###
 Since it is not in the assignment, find out how to do things within the
 parameters of your assignment.
 
 http://www.google.com
 php: {issue}
 
 Googling PHP: mail bcc (sans quotes) has 5 viable workings on how to do
 it.  If it fails, then you need to be examing the php.ini file for
 information or talking with the server admins as to what piece is wrong.
 
 ##
 
 Me
 
 No access to the server backend!
 
 #
   Also, if you are error checking your own stuff, then the error log
should
 be able to tell you what has failed out.
 
 ###
 Me
 
 Doing it, but since these are situational and specific to my problem
alone,
 I am batting zero and now on the list!
 
 
 I'm glad your professor is teaching you how to learn, but shouldn't this
be
 something you should be able to do already?  
 
 And wasn't this whole thing started with you looking for something that
you
 were already too much money into to change for the next roll-out?  So
now
 you are fessing up to trying to get the PHP board to do your assignments
for
 you?
 
 ###
 Me
 
 You are assuming hear and one guarantee about assumptions is that they are
 99% incorrect.
 
 ##
 
 I sure hope your instructor is on this board too...
 
 Wolf
  !-- Snipped for brevity --

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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
[CPANEL] active 
_ENV[USER] root 
_ENV[LD_LIBRARY_PATH] /usr/local/apache/lib: 
_ENV[PATH] /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin 
_ENV[PWD] / 
_ENV[WHM50] 10.8.0 
_ENV[SHLVL] 1 
_ENV[HOME] /root 
_ENV[RESTARTSRV] 1 
_ENV[_] /usr/local/apache/bin/httpd

-Original Message-
From: Wolf [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 5:15 PM
To: Brad
Cc: php-general@lists.php.net
Subject: RE: [PHP] two small issues with php mail

I didn't say TO edit the php.ini file, but it will tell you what the setup
of said server is, including compiled in pieces and smtp settings.

Are you aware of .htaccess files?  google override php.ini using .htaccess
and you should get some good hits there.  But then that is probably outside
the scope of your assignment.  However some professors see that as
insightful, YMMV.

Wolf


 Brad [EMAIL PROTECTED] wrote: 
 I am very much aware of phpinfo()
 Which has nothing to do with being able to edit the php.ini file!
 
 -Original Message-
 From: Wolf [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 19, 2007 4:59 PM
 To: Brad; php-general
 Subject: RE: [PHP] two small issues with php mail
 
 1.  Always copy the list back
 2.  HERE is the right word you want, since you can't HEAR someone's on
email
 or when reading the system files.  Maybe you should take English  Grammar
 101 for your next course.
 3.  Who says you need access to the server backend...  Google phpinfo() -

 very basic,  ALL books say to make this page when verifying PHP is
installed
 correctly.
 
 I didn't assume anything, merely followed the threads.  And since from the
 looks of things the thread has not changed, the back-story has...  Well
draw
 your own conclusions there.
 
 Wolf
 
  Brad [EMAIL PROTECTED] wrote: 
  Wolf write!
  ###
  Since it is not in the assignment, find out how to do things within the
  parameters of your assignment.
  
  http://www.google.com
  php: {issue}
  
  Googling PHP: mail bcc (sans quotes) has 5 viable workings on how to
do
  it.  If it fails, then you need to be examing the php.ini file for
  information or talking with the server admins as to what piece is wrong.
  
  ##
  
  Me
  
  No access to the server backend!
  
  #
Also, if you are error checking your own stuff, then the error log
 should
  be able to tell you what has failed out.
  
  ###
  Me
  
  Doing it, but since these are situational and specific to my problem
 alone,
  I am batting zero and now on the list!
  
  
  I'm glad your professor is teaching you how to learn, but shouldn't this
 be
  something you should be able to do already?  
  
  And wasn't this whole thing started with you looking for something that
 you
  were already too much money into to change for the next roll-out?  So
 now
  you are fessing up to trying to get the PHP board to do your assignments
 for
  you?
  
  ###
  Me
  
  You are assuming hear and one guarantee about assumptions is that they
are
  99% incorrect.
  
  ##
  
  I sure hope your instructor is on this board too...
  
  Wolf
   !-- Snipped for brevity --
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 No virus found in this incoming message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date:
11/18/2007
 5:15 PM
  
 
 No virus found in this outgoing message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date:
11/18/2007
 5:15 PM
  

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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
As per your email!

#

Brad wrote:

 $headers = 'bcc: [EMAIL PROTECTED]';
 
 Works but corrupts the from portion and changes it to nobody
 Which I think goes back too the smtp portion.

There is no bcc: header. BCC'ing someone is normally done by sending them
the email without listing them explicitly in to: or cc:.


/Per Jessen, Zürich



-Original Message-
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 5:18 PM
To: Brad
Cc: 'Wolf'; php-general@lists.php.net
Subject: Re: [PHP] two small issues with php mail

Brad wrote:
 Well, since
 
 http://forums.hostmysite.com/about1171.html
 
 states
 
 $headers .= CC: [EMAIL PROTECTED];
 
 Which does not work for me AT ALL and Stut called me a [EMAIL PROTECTED] for 
 doing
 it, I am assuming that all this key wording on google is not going to and
 the problem appears to be else where!

I don't believe I did that at all (if I did can someone else please let 
me know - it's never my intention).

Since you don't seem willing to properly read my original reply to you, 
the one with the answer in it, I give up. I wish your professor luck.

-Stut

-- 
http://stut.net/

 -Original Message-
 From: Wolf [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 19, 2007 4:39 PM
 To: Brad
 Cc: php-general@lists.php.net; 'Stut'
 Subject: RE: [PHP] two small issues with php mail
 
 Since it is not in the assignment, find out how to do things within the
 parameters of your assignment.
 
 http://www.google.com
 php: {issue}
 
 Googling PHP: mail bcc (sans quotes) has 5 viable workings on how to do
 it.  If it fails, then you need to be examing the php.ini file for
 information or talking with the server admins as to what piece is wrong.
 Also, if you are error checking your own stuff, then the error log should
be
 able to tell you what has failed out.
 
 I'm glad your professor is teaching you how to learn, but shouldn't this
be
 something you should be able to do already?  
 
 And wasn't this whole thing started with you looking for something that
you
 were already too much money into to change for the next roll-out?  So
now
 you are fessing up to trying to get the PHP board to do your assignments
for
 you?
 
 I sure hope your instructor is on this board too...
 
 Wolf
 
  Brad [EMAIL PROTECTED] wrote: 
 PHP mailer is not in the assignment and will be counted against me!

 -Original Message-
 From: Stut [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 19, 2007 3:43 PM
 To: Brad
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] two small issues with php mail

 Brad wrote:
 Implementing Bcc and smtp.
 Here we go again

 #1 email is only being sent to a few recipients.

 I need to implement 

 $smtp = ‘localhost’; 

 Somewhere, but I keep getting parse errors?
 Those are not normal quotes, but I'm guessing you actually typed that in 
 the evil that is Outlook.

 #2 trying to do a Bcc but that gives me parse errors as well

 It should be as easy as?

 $Bcc [EMAIL PROTECTED]; $eol = \r\n;
 That's not valid code. Ok, the second bit is, but still rather pointless.

 Here is the working code, but if I implement the above needed inserts
 anywhere, I get a big ‘ol fat parse error

 Any assistance would be truly appreciated.

 An explanation of why would really help since this is for a school
 project.

 Ahh, suddenly everything becomes clear. You can't use PHPMailer because 
 that would mean that you didn't learn it yourself you just used somebody 
 elses work. So instead you ask here rather than reading the PHPMailer 
 source code. Nice.

 Working code as is:

 ?

 $email = $_REQUEST['email'];

 $fromaddress = '[EMAIL PROTECTED]';

 $fromname = 'Zone of success Club'; $eol = \r\n;

 $headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;

 // $headers = 'bcc: '[EMAIL PROTECTED]';
 This should work. However, because you're assigning this to $headers 
 rather than concatenating it you're trampling over the From line above.

 BTW, Bcc usually has a capital letter. Probably wouldn't cause any 
 problems but has the potential to stop it working.

 $headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;

 $headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;

 $headers .= 'X-Mailer: PHP '.phpversion().$eol;

 $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;

 $headers .= 'Content-Transfer-Encoding: 8bit';

 $subject = 'Your free book!';

 $body = 'a

 href=http://www.zoneofsuccessclub.com/freePDF/autopilotebook.pdf;Click
 ME/a  Here is your FREE autopilot book';
 Click ME indeed. I'm guessing this isn't an HCI course you're doing.

 mail($email, $subject, $body, $headers);

 ?
 Try the veal.

 -Stut

 -- 
 http://stut.net/

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

 No virus found in this incoming message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus

RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
Why is this?

It makes no sense?

Can anyone show me where an order of operations for php mail might be
hidden?
Or is this top secret information requiring clearance which I have?


Wrong bit. I also said...

  // $headers = 'bcc: '[EMAIL PROTECTED]';

This should work. However, because you're assigning this to $headers rather
than concatenating it you're trampling over the From line above.

BTW, Bcc usually has a capital letter. Probably wouldn't cause any problems
but has the potential to stop it working.

Fin.

-Stut
###

-Original Message-
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 5:25 PM
To: Brad
Cc: php-general@lists.php.net
Subject: Re: [PHP] two small issues with php mail

Brad wrote:
 You say
 
 The use of BCC with the PHP mail function is pretty well-explained on 
 the PHP manual page for said function.
 
 I say,
 
 No it doesn't, I tried everything on that page and it either parse
error'ed
 or didn't work.

Wrong bit. I also said...

  // $headers = 'bcc: '[EMAIL PROTECTED]';

This should work. However, because you're assigning this to $headers 
rather than concatenating it you're trampling over the From line above.

BTW, Bcc usually has a capital letter. Probably wouldn't cause any 
problems but has the potential to stop it working.

Fin.

-Stut

-- 
http://stut.net/

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
Why are you being to belligerent?
English 101-104 I have aced.
Top secret security clearance I maintain.
Concatenate I know well (why would I combine the from, and the bcc?)

A logical explanation as to the order these guys get plugged into in an
array and why one requires a  another a '' and the other a \r\n with
little to no documentation available on google or the text book,
If this is representation to my ignorance in syntax, then yes, I am guilty!

I am simply trying to understand..



-Original Message-
From: Wolf [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 6:23 PM
To: Brad
Cc: php-general@lists.php.net; 'Stut'
Subject: RE: [PHP] two small issues with php mail

Why is what?  Sorry, you are going to have to go back and phrase this into a
complete sentence.

it makes no sense refers to what exactly?

No, you don't have clearance since you haven't passed syntax 101 along with
English and Grammar 101.  Once you have completed these courses, the answers
to your questions should be as obvious as the keyboard in front of you.

If Stut's answer does not make sense to you, google concatenate in the
dictionary (dictionay: concatenate), then re-read his answer.

Your professor MUST have a bottle stored somewhere...

Wolf


 Brad [EMAIL PROTECTED] wrote: 
 Why is this?
 
 It makes no sense?
 
 Can anyone show me where an order of operations for php mail might be
 hidden?
 Or is this top secret information requiring clearance which I have?
 
 
 Wrong bit. I also said...
 
   // $headers = 'bcc: '[EMAIL PROTECTED]';
 
 This should work. However, because you're assigning this to $headers
rather
 than concatenating it you're trampling over the From line above.
 
 BTW, Bcc usually has a capital letter. Probably wouldn't cause any
problems
 but has the potential to stop it working.
 
 Fin.
 
 -Stut
 ###
 
 -Original Message-
 From: Stut [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 19, 2007 5:25 PM
 To: Brad
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] two small issues with php mail
 
 Brad wrote:
  You say
  
  The use of BCC with the PHP mail function is pretty well-explained on 
  the PHP manual page for said function.
  
  I say,
  
  No it doesn't, I tried everything on that page and it either parse
 error'ed
  or didn't work.
 
 Wrong bit. I also said...
 
   // $headers = 'bcc: '[EMAIL PROTECTED]';
 
 This should work. However, because you're assigning this to $headers 
 rather than concatenating it you're trampling over the From line above.
 
 BTW, Bcc usually has a capital letter. Probably wouldn't cause any 
 problems but has the potential to stop it working.
 
 Fin.
 
 -Stut
 
 -- 
 http://stut.net/
 
 No virus found in this incoming message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date:
11/18/2007
 5:15 PM
  
 
 No virus found in this outgoing message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date:
11/18/2007
 5:15 PM
  
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
Thank you so much!
That really helps and makes sense!

Thank you.

I will try that now

Concatenate with the dot will not cancel them out!
Now this makes sense!
And clears up some other questions I had!.

Thank you.


-Original Message-
From: Philip Thompson [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 7:00 PM
To: php-general@lists.php.net
Subject: Re: [PHP] two small issues with php mail

On Nov 19, 2007 5:52 PM, Brad [EMAIL PROTECTED] wrote:

 Why are you being to belligerent?
 English 101-104 I have aced.
 Top secret security clearance I maintain.
 Concatenate I know well (why would I combine the from, and the bcc?)


I will refrain from the rest of the posts/slams and stick to your question
in the (...).

From and Bcc are *BOTH* part of the headers - that's why you want to
concatenate them. By not using the . (dot), you are over-writing the From
line.

Bad/Pointless assignment:
$headers = From: ...;
$headers = Bcc: ...;

Good/Useful assignment:
$headers = From: ...;
$headers .= Bcc: ...;

Good luck.
~Philip

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
It makes sense, but the Bcc is still not making it through.

Not sure if the smtp portion is correct either.
No parse errors, but no email from the bcc either.

?
$email = $_REQUEST['email'];
$fromaddress = '[EMAIL PROTECTED]';
$fromname = 'Zone of success Club'; $eol = \r\n;
$smtp = localhost;
$headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;
$headers .= 'Bcc: [EMAIL PROTECTED]'; $eol = \r\n;
$headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;
$headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;
$headers .= 'X-Mailer: PHP '.phpversion().$eol;
$headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;
$headers .= 'Content-Transfer-Encoding: 8bit';
$subject = 'Your free book!';
$body = 'a
href=http://www.g.com/freePDF/autopilotebook.pdf;Click
ME/a  Here is your FREE autopilot book';
mail($email, $subject, $body, $headers);
?



-Original Message-
From: Philip Thompson [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 7:00 PM
To: php-general@lists.php.net
Subject: Re: [PHP] two small issues with php mail

On Nov 19, 2007 5:52 PM, Brad [EMAIL PROTECTED] wrote:

 Why are you being to belligerent?
 English 101-104 I have aced.
 Top secret security clearance I maintain.
 Concatenate I know well (why would I combine the from, and the bcc?)


I will refrain from the rest of the posts/slams and stick to your question
in the (...).

From and Bcc are *BOTH* part of the headers - that's why you want to
concatenate them. By not using the . (dot), you are over-writing the From
line.

Bad/Pointless assignment:
$headers = From: ...;
$headers = Bcc: ...;

Good/Useful assignment:
$headers = From: ...;
$headers .= Bcc: ...;

Good luck.
~Philip

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



FW: [PHP] two small issues with php mail

2007-11-19 Thread Brad
 

 

   _  

From: Brad [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 8:26 PM
To: 'David Giragosian'
Subject: RE: [PHP] two small issues with php mail

 

My original issue is trying to implement a Bcc and 

 

Emails are only making it to 50% of the recipients.

Research and past experience says that I need to implement smtp into my
code.

 

Testing of the present “parse free” code show that email addresses on the
same server: To: works Bcc: does not

 

Once Bcc: works on same server, I will need to test Bcc on another server
which I am sure requires the proper smtp configuration.

 

Working code:

 

?

$email = $_REQUEST['email'];

$fromaddress = '[EMAIL PROTECTED]';

$fromname = ‘g'; $eol = \r\n;

$smtp = localhost;

$headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;

$headers .= 'Bcc: [EMAIL PROTECTED]'; $eol = \r\n;

$headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;

$headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;

$headers .= 'X-Mailer: PHP '.phpversion().$eol;

$headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;

$headers .= 'Content-Transfer-Encoding: 8bit';

$subject = 'Your free book!';

$body = 'a
href=http://www..com/freePDF/autopilotebook.pdf;Click
ME/a  Here is your FREE autopilot book';

mail($email, $subject, $body, $headers);

?

 

   _  

From: David Giragosian [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 7:25 PM
To: Brad
Cc: php-general@lists.php.net
Subject: Re: [PHP] two small issues with php mail

 

 

On 11/19/07, Philip Thompson HYPERLINK
mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: 

On Nov 19, 2007 5:52 PM, Brad HYPERLINK
mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote:

 Why are you being to belligerent? 
 English 101-104 I have aced.
 Top secret security clearance I maintain.
 Concatenate I know well (why would I combine the from, and the bcc?)


I will refrain from the rest of the posts/slams and stick to your question 
in the (...).

From and Bcc are *BOTH* part of the headers - that's why you want to
concatenate them. By not using the . (dot), you are over-writing the From
line.

Bad/Pointless assignment:
$headers = From: ...;
$headers = Bcc: ...;

Good/Useful assignment:
$headers = From: ...;
$headers .= Bcc: ...;

Good luck. 
~Philip

 

Brad, 

 

If Philip's suggestion doesn't fix the problem, please post the relevant
code, again. 

 

I've lost track of your original question.   

 

David
 

 

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM



No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 


RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
This is a new trick for me, can you kindly explain?
I know what you are getting at, I am just not real sure on th method?

Do I just replace mail and the end with print?
Aka
mail($email, $subject, $body, $headers);
with
print($email, $subject, $body, $headers);

??

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 8:44 PM
To: Brad
Subject: RE: [PHP] two small issues with php mail

well, you need to do some basic debugging.

a) replace your mail() function with print statements and review the
output to make certain that it is correct. [this will require that
you look at appropriate documentation to see how message headers/body
should be formatted.]

b) if a) looks right, then look at your mail server's logs to see
what shows up there.

  - Rick


 Original Message 
 Date: Monday, November 19, 2007 08:19:49 PM -0500
 From: Brad [EMAIL PROTECTED]
 To: 'Philip Thompson' [EMAIL PROTECTED]
 Cc: php-general@lists.php.net
 Subject: RE: [PHP] two small issues with php mail
 
 It makes sense, but the Bcc is still not making it through.
 
 Not sure if the smtp portion is correct either.
 No parse errors, but no email from the bcc either.
 
 ?
 $email = $_REQUEST['email'];
 $fromaddress = '[EMAIL PROTECTED]';
 $fromname = 'Zone of success Club'; $eol = \r\n;
 $smtp = localhost;
 $headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;
 $headers .= 'Bcc: [EMAIL PROTECTED]'; $eol = \r\n;
 $headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;
 $headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;
 $headers .= 'X-Mailer: PHP '.phpversion().$eol;
 $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;
 $headers .= 'Content-Transfer-Encoding: 8bit';
 $subject = 'Your free book!';
 $body = 'a
 href=http://www.g.com/freePDF/autopilotebook.pdf;Cli
 ck ME/a  Here is your FREE autopilot book';
 mail($email, $subject, $body, $headers);
 ?
 
 
 
 -Original Message-
 From: Philip Thompson [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 19, 2007 7:00 PM
 To: php-general@lists.php.net
 Subject: Re: [PHP] two small issues with php mail
 
 On Nov 19, 2007 5:52 PM, Brad [EMAIL PROTECTED] wrote:
 
 Why are you being to belligerent?
 English 101-104 I have aced.
 Top secret security clearance I maintain.
 Concatenate I know well (why would I combine the from, and the
 bcc?)
 
 
 I will refrain from the rest of the posts/slams and stick to your
 question in the (...).
 
 From and Bcc are *BOTH* part of the headers - that's why you
 want to concatenate them. By not using the . (dot), you are
 over-writing the From line.
 
 Bad/Pointless assignment:
 $headers = From: ...;
 $headers = Bcc: ...;
 
 Good/Useful assignment:
 $headers = From: ...;
 $headers .= Bcc: ...;
 
 Good luck.
 ~Philip
 

-- End Original Message --

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
For the purposes of this task, mailer is not an option.
This is a class assignment to put us into the weeds.
I am neck deep googling the heck out of this and finding snippets of
un-related code which do not fit.

Just seek help from a knowledgeable community to help me past the learning
curve.

And getting hit hard from hecklers in the process.

I am not having a good day with php!

I took this class because of it's Linux and Unix origin...

I am not having a good day!

-Original Message-
From: Andrés Robinet [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 8:49 PM
To: 'Brad'
Cc: php-general@lists.php.net
Subject: RE: [PHP] two small issues with php mail

Did I miss something or the following line in your code is useless?

 $smtp = localhost;

Brad, if you really need SMTP configuration, and you want to make your life
easier with attachments and extra headers, give a chance to PHPMailer
http://phpmailer.codeworxtech.com/. It's free, easy to set up and use, and
can do much more than you need.

Rob

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308
| TEL 954-607-4207 | FAX 954-337-2695 | 
Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE:
bestplace |  Web: bestplace.biz  | Web: seo-diy.com
Confidentiality:
All information in this email message, including images, attachments,
contains confidential and proprietary information of BESTPLACE CORPORATION
and should only be used or serves for the intended purpose and should not be
copied, used or disclosed to anyone other than the sole recipient of this
e-mail message.

 -Original Message-
 From: Brad [mailto:[EMAIL PROTECTED]
 Sent: Monday, November 19, 2007 10:27 PM
 To: php-general@lists.php.net
 Subject: FW: [PHP] two small issues with php mail
 
 
 
 
 
_
 
 From: Brad [mailto:[EMAIL PROTECTED]
 Sent: Monday, November 19, 2007 8:26 PM
 To: 'David Giragosian'
 Subject: RE: [PHP] two small issues with php mail
 
 
 
 My original issue is trying to implement a Bcc and
 
 
 
 Emails are only making it to 50% of the recipients.
 
 Research and past experience says that I need to implement smtp into my
 code.
 
 
 
 Testing of the present “parse free” code show that email addresses on
 the
 same server: To: works Bcc: does not
 
 
 
 Once Bcc: works on same server, I will need to test Bcc on another
 server
 which I am sure requires the proper smtp configuration.
 
 
 
 Working code:
 
 
 
 ?
 
 $email = $_REQUEST['email'];
 
 $fromaddress = '[EMAIL PROTECTED]';
 
 $fromname = ‘g'; $eol = \r\n;
 
 $smtp = localhost;
 
 $headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;
 
 $headers .= 'Bcc: [EMAIL PROTECTED]'; $eol = \r\n;
 
 $headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;
 
 $headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;
 
 $headers .= 'X-Mailer: PHP '.phpversion().$eol;
 
 $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;
 
 $headers .= 'Content-Transfer-Encoding: 8bit';
 
 $subject = 'Your free book!';
 
 $body = 'a
 href=http://www..com/freePDF/autopilotebook.pdf;Clic
 k
 ME/a  Here is your FREE autopilot book';
 
 mail($email, $subject, $body, $headers);
 
 ?
 
 
 
_
 
 From: David Giragosian [mailto:[EMAIL PROTECTED]
 Sent: Monday, November 19, 2007 7:25 PM
 To: Brad
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] two small issues with php mail
 
 
 
 
 
 On 11/19/07, Philip Thompson HYPERLINK
 mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote:
 
 On Nov 19, 2007 5:52 PM, Brad HYPERLINK
 mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote:
 
  Why are you being to belligerent?
  English 101-104 I have aced.
  Top secret security clearance I maintain.
  Concatenate I know well (why would I combine the from, and the bcc?)
 
 
 I will refrain from the rest of the posts/slams and stick to your
 question
 in the (...).
 
 From and Bcc are *BOTH* part of the headers - that's why you want
 to
 concatenate them. By not using the . (dot), you are over-writing the
 From
 line.
 
 Bad/Pointless assignment:
 $headers = From: ...;
 $headers = Bcc: ...;
 
 Good/Useful assignment:
 $headers = From: ...;
 $headers .= Bcc: ...;
 
 Good luck.
 ~Philip
 
 
 
 Brad,
 
 
 
 If Philip's suggestion doesn't fix the problem, please post the
 relevant
 code, again.
 
 
 
 I've lost track of your original question.
 
 
 
 David
 
 
 
 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date:
 11/18/2007
 5:15 PM
 
 
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date:
 11/18/2007
 5:15 PM
 
 
 
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date:
 11/18/2007
 5:15 PM
 

No virus found in this incoming message.
Checked

FW: [PHP] two small issues with php mail

2007-11-19 Thread Brad


-Original Message-
From: Brad [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 9:48 PM
To: 'Chris'
Subject: RE: [PHP] two small issues with php mail

Sir, I am trying...

It just is not working...

I am trying to implement the auth info, I go from parse error to no response
from the server.

I am reading your material and batting ZERO!

I will keep on reading and somehow figure it out.
You have been kind.

I have the admin of this list now being a jerk!

Brad

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 9:39 PM
To: Brad
Cc: php-general@lists.php.net
Subject: Re: [PHP] two small issues with php mail

Brad wrote:
 For the purposes of this task, mailer is not an option.
 This is a class assignment to put us into the weeds.
 I am neck deep googling the heck out of this and finding snippets of
 un-related code which do not fit.

Just because you can't use php-mailer in your project doesn't mean you 
can't use it as a reference.

Grab phpmailer and look at the process it follows to do smtp sending.

smtp authentication is a pain at the best of times but trying to do it 
the way you are now will just drive you mad (been there, done that).

Looking at a working code sample will make things a lot clearer in your 
head rather than random code from 100 different locations.

http://www.cosmonroe.org/~devin/postfix/smtp-auth.txt under SMTP 
Authentication will give you an idea of what you need to do but there 
is a ton more error checking and validation you need to do along the way.

-- 
Postgresql  php tutorials
http://www.designmagick.com/

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



FW: [PHP] two small issues with php mail

2007-11-19 Thread Brad


-Original Message-
From: Brad [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 9:34 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] two small issues with php mail

Thought it was a support forum!
Support usually does not mean piss off.

Brad

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 9:31 PM
To: Brad
Subject: RE: [PHP] two small issues with php mail

the php mailing list is not intended as a tutor. we have all provided
you with pointers and direction. it is for you, as the student, to
use your skills, seek out examples if necessary, and then determine
how to implement a solution.

the online php manual is really sufficient documentation. if the core
documentation provided by the php developers isn't sufficient, then
look at the included user-provided examples (realizing that they
aren't vetted, so aren't always 100% accurate). if you don't do well
with things in manual format (some people do, some don't), then you
might want to buy the o'reilly php book or something similar.

on the specifics, if you don't know how to format a print statement,
then look it up:

  http://www.php.net/manual/en/

a tutor might turn the manual to the appropriate page and point to an
example, but as that's not our role so i'll let you thumb through to
the right page.



 Original Message 
 Date: Monday, November 19, 2007 09:16:13 PM -0500
 From: Brad [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] two small issues with php mail
 
 Provide the proper documentation and that is not necessary!
 Brad
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 19, 2007 9:07 PM
 To: Brad
 Subject: RE: [PHP] two small issues with php mail
 
 I'm sorry, but if you have to ask this question you need to get
 yourself a tutor - the intent of this mailing list is not that.
 
 
   - Rick
 
 
  Original Message 
 Date: Monday, November 19, 2007 08:52:36 PM -0500
 From: Brad [EMAIL PROTECTED]
 Cc: php-general@lists.php.net
 Subject: RE: [PHP] two small issues with php mail
 
 This is a new trick for me, can you kindly explain?
 I know what you are getting at, I am just not real sure on th
 method?
 
 Do I just replace mail and the end with print?
 Aka
 mail($email, $subject, $body, $headers);
 with
 print($email, $subject, $body, $headers);
 
 ??
 
 -Original Message-
 
 Sent: Monday, November 19, 2007 8:44 PM
 To: Brad
 Subject: RE: [PHP] two small issues with php mail
 
 well, you need to do some basic debugging.
 
 a) replace your mail() function with print statements and review
 the output to make certain that it is correct. [this will require
 that you look at appropriate documentation to see how message
 headers/body should be formatted.]
 
 b) if a) looks right, then look at your mail server's logs to see
 what shows up there.
 
   - Rick
 

-- End Original Message --

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
Responses like that is encouragement to drop php and move straight to ruby!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 9:07 PM
To: Brad
Subject: RE: [PHP] two small issues with php mail

I'm sorry, but if you have to ask this question you need to get
yourself a tutor - the intent of this mailing list is not that.


  - Rick


 Original Message 
 Date: Monday, November 19, 2007 08:52:36 PM -0500
 From: Brad [EMAIL PROTECTED]
 Cc: php-general@lists.php.net
 Subject: RE: [PHP] two small issues with php mail
 
 This is a new trick for me, can you kindly explain?
 I know what you are getting at, I am just not real sure on th
 method?
 
 Do I just replace mail and the end with print?
 Aka
 mail($email, $subject, $body, $headers);
 with
 print($email, $subject, $body, $headers);
 
 ??
 
 -Original Message-

 Sent: Monday, November 19, 2007 8:44 PM
 To: Brad
 Subject: RE: [PHP] two small issues with php mail
 
 well, you need to do some basic debugging.
 
 a) replace your mail() function with print statements and review the
 output to make certain that it is correct. [this will require that
 you look at appropriate documentation to see how message
 headers/body should be formatted.]
 
 b) if a) looks right, then look at your mail server's logs to see
 what shows up there.
 
   - Rick
 
 
  Original Message 
 Date: Monday, November 19, 2007 08:19:49 PM -0500
 From: Brad [EMAIL PROTECTED]
 To: 'Philip Thompson' [EMAIL PROTECTED]
 Cc: php-general@lists.php.net
 Subject: RE: [PHP] two small issues with php mail
 
 It makes sense, but the Bcc is still not making it through.
 
 Not sure if the smtp portion is correct either.
 No parse errors, but no email from the bcc either.
 
 ?
 $email = $_REQUEST['email'];
 $fromaddress = '[EMAIL PROTECTED]';
 $fromname = 'Zone of success Club'; $eol = \r\n;
 $smtp = localhost;
 $headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;
 $headers .= 'Bcc: [EMAIL PROTECTED]'; $eol = \r\n;
 $headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;
 $headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;
 $headers .= 'X-Mailer: PHP '.phpversion().$eol;
 $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;
 $headers .= 'Content-Transfer-Encoding: 8bit';
 $subject = 'Your free book!';
 $body = 'a
 href=http://www.g.com/freePDF/autopilotebook.pdf;Cli
 ck ME/a  Here is your FREE autopilot book';
 mail($email, $subject, $body, $headers);
 ?
 
 
 
 -Original Message-
 From: Philip Thompson [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 19, 2007 7:00 PM
 To: php-general@lists.php.net
 Subject: Re: [PHP] two small issues with php mail
 
 On Nov 19, 2007 5:52 PM, Brad [EMAIL PROTECTED] wrote:
 
 Why are you being to belligerent?
 English 101-104 I have aced.
 Top secret security clearance I maintain.
 Concatenate I know well (why would I combine the from, and the
 bcc?)
 
 
 I will refrain from the rest of the posts/slams and stick to your
 question in the (...).
 
 From and Bcc are *BOTH* part of the headers - that's why you
 want to concatenate them. By not using the . (dot), you are
 over-writing the From line.
 
 Bad/Pointless assignment:
 $headers = From: ...;
 $headers = Bcc: ...;
 
 Good/Useful assignment:
 $headers = From: ...;
 $headers .= Bcc: ...;
 
 Good luck.
 ~Philip
 
 
 -- End Original Message --
 
 No virus found in this incoming message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date:
 11/18/2007 5:15 PM
  
 
 No virus found in this outgoing message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date:
 11/18/2007 5:15 PM
  

-- End Original Message --

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007
5:15 PM
 

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



RE: [PHP] two small issues with php mail

2007-11-19 Thread Brad
Sir, you are very kind, but your implementation of array has me as the
monkey with a light bulb
I know BASIC (the language) at a minimal.
Basic functionality I know;
Your implementation of core knowledge programming to php quarks is blowing
my mind when looking at my existing problem.

#1
You build your array with;
= array(
'Function 1',
'function 2',
//...
);

?
//...
);
??

Skip the ... and end with ):

Php has enough goof ball stuff, with it's mail function.

Your suggestion is kind but you are shooting over my head...
  $headers = implode(\r\n, $headers);

Implode
Hmmm = build array here but, the usage of \r\n is already confusing me.
The manual says to use it for Bcc
Parse error says otherwise when not in you array.
Why?

Else blame casey

Never, you are trying to help!

Brad




-Original Message-
From: Casey [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 9:48 PM
To: Brad
Cc: Andrés Robinet; php-general@lists.php.net
Subject: Re: [PHP] two small issues with php mail

Note this code is untested and directly typed from a phone.

?php
  $to = '[EMAIL PROTECTED]';
  $subject = 'Free iPod!';
  $message = 'Even though I will be filtered, get your FREE iPod at
http://www.obviouslyascam.com 
!';
  $headers = array(
   'From: [EMAIL PROTECTED]',
   'Bbc: [EMAIL PROTECTED]',
   // ...
  );
  $headers = implode(\r\n, $headers);
  if (mail($to, $subject, $message, $headers))
   echo 'Success!';
  else blameCasey();
?

Note: you might need to change some code before you use it (in an  
attempt to stop you from ripping off my code).



On Nov 19, 2007, at 6:26 PM, Brad [EMAIL PROTECTED] wrote:

 For the purposes of this task, mailer is not an option.
 This is a class assignment to put us into the weeds.
 I am neck deep googling the heck out of this and finding snippets of
 un-related code which do not fit.

 Just seek help from a knowledgeable community to help me past the  
 learning
 curve.

 And getting hit hard from hecklers in the process.

 I am not having a good day with php!

 I took this class because of it's Linux and Unix origin...

 I am not having a good day!

 -Original Message-
 From: Andrés Robinet [mailto:[EMAIL PROTECTED]
 Sent: Monday, November 19, 2007 8:49 PM
 To: 'Brad'
 Cc: php-general@lists.php.net
 Subject: RE: [PHP] two small issues with php mail

 Did I miss something or the following line in your code is useless?

 $smtp = localhost;

 Brad, if you really need SMTP configuration, and you want to make  
 your life
 easier with attachments and extra headers, give a chance to PHPMailer
 http://phpmailer.codeworxtech.com/. It's free, easy to set up and  
 use, and
 can do much more than you need.

 Rob

 Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale,  
 FL 33308
 | TEL 954-607-4207 | FAX 954-337-2695 |
 Email: [EMAIL PROTECTED]  | MSN Chat: [EMAIL PROTECTED]  |  SKYPE:
 bestplace |  Web: bestplace.biz  | Web: seo-diy.com
 Confidentiality:
 All information in this email message, including images, attachments,
 contains confidential and proprietary information of BESTPLACE  
 CORPORATION
 and should only be used or serves for the intended purpose and  
 should not be
 copied, used or disclosed to anyone other than the sole recipient of  
 this
 e-mail message.

 -Original Message-
 From: Brad [mailto:[EMAIL PROTECTED]
 Sent: Monday, November 19, 2007 10:27 PM
 To: php-general@lists.php.net
 Subject: FW: [PHP] two small issues with php mail





   _

 From: Brad [mailto:[EMAIL PROTECTED]
 Sent: Monday, November 19, 2007 8:26 PM
 To: 'David Giragosian'
 Subject: RE: [PHP] two small issues with php mail



 My original issue is trying to implement a Bcc and



 Emails are only making it to 50% of the recipients.

 Research and past experience says that I need to implement smtp  
 into my
 code.



 Testing of the present “parse free” code show that email  
 addresses on
 the
 same server: To: works Bcc: does not



 Once Bcc: works on same server, I will need to test Bcc on another
 server
 which I am sure requires the proper smtp configuration.



 Working code:



 ?

 $email = $_REQUEST['email'];

 $fromaddress = '[EMAIL PROTECTED]';

 $fromname = ‘g'; $eol = \r\n;

 $smtp = localhost;

 $headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;

 $headers .= 'Bcc: [EMAIL PROTECTED]'; $eol = \r\n;

 $headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;

 $headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;

 $headers .= 'X-Mailer: PHP '.phpversion().$eol;

 $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;

 $headers .= 'Content-Transfer-Encoding: 8bit';

 $subject = 'Your free book!';

 $body = 'a
 href=http://www..com/freePDF/ 
 autopilotebook.pdfClic
 k
 ME/a  Here is your FREE autopilot book';

 mail($email, $subject, $body, $headers);

 ?



   _

 From: David Giragosian [mailto:[EMAIL PROTECTED

RE: [PHP] Cannot send a hyperlink

2007-11-15 Thread Brad
Hm,
Still no hyperlink?

$email = $_REQUEST['email'] ;
$fromaddress .= '[EMAIL PROTECTED]';
$fromname .= 'Zone of success Club';
$eol=\r\n;
$headers  = From: .$fromname..$fromaddress..$eol;
$headers .= Reply-To: .$fromname..$fromaddress..$eol;
$headers .= Return-Path: .$fromname..$fromaddress..$eol;
$headers .= Message-ID: .time().-.$fromaddress..$eol;
$headers .= X-Mailer: PHP .phpversion().$eol; $headers .=
--.$htmlalt_mime_boundary.$eol; $headers .= Content-Type: text/html;
charset=iso-8859-1.$eol; $headers .= Content-Transfer-Encoding:
8bit.$eol.$eol; $body = a href=\http://www.zoneofsuccessclub.com\;link
/a\n; mail($email, $subject, $body, $headers);

Produces and email that does this.

--
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit



a href=http://www.zoneofsuccessclub.com;link /a

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007
4:54 PM




-Original Message-
From: Daniel Brown [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 14, 2007 11:09 AM
To: Brad
Cc: [EMAIL PROTECTED]; php-general@lists.php.net
Subject: Re: [PHP] Cannot send a hyperlink

Brad,

That code is a mess and highly incorrect, even at a novice level.
Let me give you a hand

On Nov 14, 2007 10:31 AM, Brad [EMAIL PROTECTED] wrote:
 I implemented the proposed code, and emails are not being sent?

 Any suggestions?

 Here is the code

 ?

   $email = $_REQUEST['email'] ;
   $eol=\r\n;
   $headers .= From: .$fromname..$fromaddress..$eol;
   $headers .= Reply-To: .$fromname..$fromaddress..$eol;
   $headers .= Return-Path: .$fromname..$fromaddress..$eol;
   $headers .= Message-ID: .time().-.$fromaddress..$eol;
   $headers .= X-Mailer: PHP .phpversion().$eol;
   $msg .= --.$htmlalt_mime_boundary.$eol;
   $msg .= Content-Type: text/html; charset=iso-8859-1.$eol;
   $msg .= Content-Transfer-Encoding: 8bit.$eol.$eol;
   $body.='ahref='.www.zoneofsuccessclub.com.'link /a';
   $msg .= $body.$eol.$eol;
   mail($to, $subject, $msg, $headers);

 ?

[snip]

1.) You reference $to in the mail() function, but there is no $to
defined.  Instead, either change $email to $to or vice-versa.
2.) You don't need to start the first line of a variable off with
a .= --- this will append to an existing variable of the same name, if
it exists.
3.) You change your quoting style where it's not necessary.  All
$msg lines should be using double quotes in your code above.
4.) ahref=... is not a tag.  The correct usage is a href=...
5.) You have things in the message body that should be in the headers.
6.) You don't need to do a carriage return and newline in the
message body.  A simple \n will suffice.
7.) I'm not sure what you hoped to achieve with the
'.www.domain.com.' conglomerate, but don't.  That makes PHP
think that the domain is some sort of internally-defined variable of
horrible construct.
8.) You should use http:// prior to the FQDN.

Taking hints from what appears to be your code, this is how it should
be:
?
$email = $_REQUEST['email'] ;
$eol=\r\n;
$headers  = From: .$fromname..$fromaddress..$eol;
$headers .= Reply-To: .$fromname..$fromaddress..$eol;
$headers .= Return-Path: .$fromname..$fromaddress..$eol;
$headers .= Message-ID: .time().-.$fromaddress..$eol;
$headers .= X-Mailer: PHP .phpversion().$eol;
$headers .= --.$htmlalt_mime_boundary.$eol;
$headers .= Content-Type: text/html; charset=iso-8859-1.$eol;
$headers .= Content-Transfer-Encoding: 8bit.$eol.$eol;
$body = a href=\http://www.zoneofsuccessclub.com\;link /a\n;
mail($email, $subject, $body, $headers);
?

Prior to asking a bunch of questions on the list, which seriously
puts you at risk for being flamed or ignored, check out these
references:
http://www.bath.ac.uk/bucs/email/anatomy.shtml  [Anatomy of an
Email Message]
http://www.php.net/mail  [PHP Mail Functions]
http://www.htmlgoodies.com/primers/html/  [Beginner's Guide to HTML]

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.31/1128 - Release Date: 11/13/2007
11:09 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007
4:54 PM
 

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



RE: [PHP] Cannot send a hyperlink

2007-11-15 Thread Brad
We are sending email now,
But we are back to the original problem,
No hyperlink!

  $email = $_REQUEST['email'] ;
  $fromaddress .= '[EMAIL PROTECTED]';
  $fromname .= 'Zone of success Club';
  $eol=\r\n;
  $headers .= From: .$fromname..$fromaddress..$eol;
  $headers .= Reply-To: .$fromname..$fromaddress..$eol;
  $headers .= Return-Path: .$fromname..$fromaddress..$eol;
  $headers .= Message-ID: .time().-.$fromaddress..$eol;
  $headers .= X-Mailer: PHP v.phpversion().$eol;
  $msg .= --.$htmlalt_mime_boundary.$eol;
  $msg .= Content-Type: text/html; charset=iso-8859-1.$eol;
  $msg .= Content-Transfer-Encoding: 8bit.$eol.$eol;
  $body.= 'a href='http://www.zoneofsuccessclub.com'link /a';
  $msg .= $body.$eol.$eol;
  mail($email, $subject, $msg, $headers);


Yields

Parse error: parse error, unexpected T_STRING in
/home/zoneof5/public_html/index.php on line 76

-Original Message-
From: Daniel Brown [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 14, 2007 11:09 AM
To: Brad
Cc: [EMAIL PROTECTED]; php-general@lists.php.net
Subject: Re: [PHP] Cannot send a hyperlink

Brad,

That code is a mess and highly incorrect, even at a novice level.
Let me give you a hand

On Nov 14, 2007 10:31 AM, Brad [EMAIL PROTECTED] wrote:
 I implemented the proposed code, and emails are not being sent?

 Any suggestions?

 Here is the code

 ?

   $email = $_REQUEST['email'] ;
   $eol=\r\n;
   $headers .= From: .$fromname..$fromaddress..$eol;
   $headers .= Reply-To: .$fromname..$fromaddress..$eol;
   $headers .= Return-Path: .$fromname..$fromaddress..$eol;
   $headers .= Message-ID: .time().-.$fromaddress..$eol;
   $headers .= X-Mailer: PHP .phpversion().$eol;
   $msg .= --.$htmlalt_mime_boundary.$eol;
   $msg .= Content-Type: text/html; charset=iso-8859-1.$eol;
   $msg .= Content-Transfer-Encoding: 8bit.$eol.$eol;
   $body.='ahref='.www.zoneofsuccessclub.com.'link /a';
   $msg .= $body.$eol.$eol;
   mail($to, $subject, $msg, $headers);

 ?

[snip]

1.) You reference $to in the mail() function, but there is no $to
defined.  Instead, either change $email to $to or vice-versa.
2.) You don't need to start the first line of a variable off with
a .= --- this will append to an existing variable of the same name, if
it exists.
3.) You change your quoting style where it's not necessary.  All
$msg lines should be using double quotes in your code above.
4.) ahref=... is not a tag.  The correct usage is a href=...
5.) You have things in the message body that should be in the headers.
6.) You don't need to do a carriage return and newline in the
message body.  A simple \n will suffice.
7.) I'm not sure what you hoped to achieve with the
'.www.domain.com.' conglomerate, but don't.  That makes PHP
think that the domain is some sort of internally-defined variable of
horrible construct.
8.) You should use http:// prior to the FQDN.

Taking hints from what appears to be your code, this is how it should
be:
?
$email = $_REQUEST['email'] ;
$eol=\r\n;
$headers  = From: .$fromname..$fromaddress..$eol;
$headers .= Reply-To: .$fromname..$fromaddress..$eol;
$headers .= Return-Path: .$fromname..$fromaddress..$eol;
$headers .= Message-ID: .time().-.$fromaddress..$eol;
$headers .= X-Mailer: PHP .phpversion().$eol;
$headers .= --.$htmlalt_mime_boundary.$eol;
$headers .= Content-Type: text/html; charset=iso-8859-1.$eol;
$headers .= Content-Transfer-Encoding: 8bit.$eol.$eol;
$body = a href=\http://www.zoneofsuccessclub.com\;link /a\n;
mail($email, $subject, $body, $headers);
?

Prior to asking a bunch of questions on the list, which seriously
puts you at risk for being flamed or ignored, check out these
references:
http://www.bath.ac.uk/bucs/email/anatomy.shtml  [Anatomy of an
Email Message]
http://www.php.net/mail  [PHP Mail Functions]
http://www.htmlgoodies.com/primers/html/  [Beginner's Guide to HTML]

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.31/1128 - Release Date: 11/13/2007
11:09 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007
4:54 PM
 

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



RE: [PHP] Cannot send a hyperlink

2007-11-15 Thread Brad
Still parsing as text and not html!

a href=http://www.zoneofsuccessclub.com;link /a
//a href=http://www.zoneofsuccessclub.com;link /a

$email = $_REQUEST['email'] ;
$fromaddress .= '[EMAIL PROTECTED]';
$fromname .= 'Zone of success Club';
$eol=\r\n;
$headers  = From: .$fromname..$fromaddress..$eol;
$headers .= Reply-To: .$fromname..$fromaddress..$eol;
$headers .= Return-Path: .$fromname..$fromaddress..$eol;
$headers .= Message-ID: .time().-.$fromaddress..$eol;
$headers .= X-Mailer: PHP .phpversion().$eol;
$body .= --.$htmlalt_mime_boundary.$eol;
$body .= Content-Type: text/html; charset=iso-8859-1.$eol;
$body .= Content-Transfer-Encoding: 8bit.$eol.$eol;
$body = a href=\http://www.zoneofsuccessclub.com\;link /a\n;
mail($email, $subject, $body, $headers);

-Original Message-
From: Per Jessen [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 9:48 AM
To: php-general@lists.php.net
Subject: RE: [PHP] Cannot send a hyperlink

Brad wrote:

 Beginning with
 $headers .= --.$htmlalt_mime_boundary.$eol;
 It starts to read it as text and not html??
 
 Could this be a server side problem?

Nope.

 $email = $_REQUEST['email'] ;
 $fromaddress .= '[EMAIL PROTECTED]';
 $fromname .= 'Zone of success Club';
 $eol=\r\n;
 $headers  = From: .$fromname..$fromaddress..$eol;
 $headers .= Reply-To: .$fromname..$fromaddress..$eol;
 $headers .= Return-Path: .$fromname..$fromaddress..$eol;
 $headers .= Message-ID: .time().-.$fromaddress..$eol;
 $headers .= X-Mailer: PHP .phpversion().$eol;
 $headers .= --.$htmlalt_mime_boundary.$eol;
 $headers .= Content-Type: text/html; charset=iso-8859-1.$eol;
 $headers .= Content-Transfer-Encoding: 8bit.$eol.$eol;
 $body = a href=\http://www.zoneofsuccessclub.com\;link /a\n;

You have a MIME boundary where it doesn't belong.  MIME boundaries are
for the body, not the header. 


/Per Jessen, Zürich

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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007
4:54 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007
4:54 PM
 

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



RE: [PHP] Cannot send a hyperlink

2007-11-15 Thread Brad
No access to the server command line to install it!
And, I am into this guy too deep to switch technologies. For the next time
around, no problem, this time I am just trying to get php to do what it is
supposed to do.

The suggestion of mime was presented to me from another kind sole trying to
help that knows more than I and recommended on other help files.

Why is php refusing to parse as html?

-Original Message-
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 9:46 AM
To: Brad
Cc: 'Daniel Brown'; php-general@lists.php.net
Subject: Re: [PHP] Cannot send a hyperlink

Brad wrote:
 Beginning with 
 $headers .= --.$htmlalt_mime_boundary.$eol;
 It starts to read it as text and not html??
 
 Could this be a server side problem?
 
 $email = $_REQUEST['email'] ;
 $fromaddress .= '[EMAIL PROTECTED]';
 $fromname .= 'Zone of success Club';
 $eol=\r\n;
 $headers  = From: .$fromname..$fromaddress..$eol;
 $headers .= Reply-To: .$fromname..$fromaddress..$eol;
 $headers .= Return-Path: .$fromname..$fromaddress..$eol;
 $headers .= Message-ID: .time().-.$fromaddress..$eol;
 $headers .= X-Mailer: PHP .phpversion().$eol;
 $headers .= --.$htmlalt_mime_boundary.$eol;
 $headers .= Content-Type: text/html; charset=iso-8859-1.$eol;
 $headers .= Content-Transfer-Encoding: 8bit.$eol.$eol;
 $body = a href=\http://www.zoneofsuccessclub.com\;link /a\n;
 mail($email, $subject, $body, $headers);

You should not have a mime boundary in your headers. Why not use 
PHPMailer? All this (apparently) complicated stuff is already 
implemented for you. Either that or spend a few days learning about the 
structure of emails by following the links Daniel Brown sent you a few 
emails ago.

PHPMailer can be found here: http://phpmailer.sf.net/

-Stut

-- 
http://stut.net/

 -Original Message-
 From: Daniel Brown [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, November 14, 2007 11:09 AM
 To: Brad
 Cc: [EMAIL PROTECTED]; php-general@lists.php.net
 Subject: Re: [PHP] Cannot send a hyperlink
 
 Brad,
 
 That code is a mess and highly incorrect, even at a novice level.
 Let me give you a hand
 
 On Nov 14, 2007 10:31 AM, Brad [EMAIL PROTECTED] wrote:
 I implemented the proposed code, and emails are not being sent?

 Any suggestions?

 Here is the code

 ?

   $email = $_REQUEST['email'] ;
   $eol=\r\n;
   $headers .= From: .$fromname..$fromaddress..$eol;
   $headers .= Reply-To: .$fromname..$fromaddress..$eol;
   $headers .= Return-Path: .$fromname..$fromaddress..$eol;
   $headers .= Message-ID: .time().-.$fromaddress..$eol;
   $headers .= X-Mailer: PHP .phpversion().$eol;
   $msg .= --.$htmlalt_mime_boundary.$eol;
   $msg .= Content-Type: text/html; charset=iso-8859-1.$eol;
   $msg .= Content-Transfer-Encoding: 8bit.$eol.$eol;
   $body.='ahref='.www.zoneofsuccessclub.com.'link /a';
   $msg .= $body.$eol.$eol;
   mail($to, $subject, $msg, $headers);

 ?
 
 [snip]
 
 1.) You reference $to in the mail() function, but there is no $to
 defined.  Instead, either change $email to $to or vice-versa.
 2.) You don't need to start the first line of a variable off with
 a .= --- this will append to an existing variable of the same name, if
 it exists.
 3.) You change your quoting style where it's not necessary.  All
 $msg lines should be using double quotes in your code above.
 4.) ahref=... is not a tag.  The correct usage is a href=...
 5.) You have things in the message body that should be in the headers.
 6.) You don't need to do a carriage return and newline in the
 message body.  A simple \n will suffice.
 7.) I'm not sure what you hoped to achieve with the
 '.www.domain.com.' conglomerate, but don't.  That makes PHP
 think that the domain is some sort of internally-defined variable of
 horrible construct.
 8.) You should use http:// prior to the FQDN.
 
 Taking hints from what appears to be your code, this is how it should
 be:
 ?
 $email = $_REQUEST['email'] ;
 $eol=\r\n;
 $headers  = From: .$fromname..$fromaddress..$eol;
 $headers .= Reply-To: .$fromname..$fromaddress..$eol;
 $headers .= Return-Path: .$fromname..$fromaddress..$eol;
 $headers .= Message-ID: .time().-.$fromaddress..$eol;
 $headers .= X-Mailer: PHP .phpversion().$eol;
 $headers .= --.$htmlalt_mime_boundary.$eol;
 $headers .= Content-Type: text/html; charset=iso-8859-1.$eol;
 $headers .= Content-Transfer-Encoding: 8bit.$eol.$eol;
 $body = a href=\http://www.zoneofsuccessclub.com\;link /a\n;
 mail($email, $subject, $body, $headers);
 ?
 
 Prior to asking a bunch of questions on the list, which seriously
 puts you at risk for being flamed or ignored, check out these
 references:
 http://www.bath.ac.uk/bucs/email/anatomy.shtml  [Anatomy of an
 Email Message]
 http://www.php.net/mail  [PHP Mail Functions]
 http://www.htmlgoodies.com/primers/html/  [Beginner's Guide to HTML]
 

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32

RE: [PHP] Cannot send a hyperlink

2007-11-15 Thread Brad
Beginning with 
$headers .= --.$htmlalt_mime_boundary.$eol;
It starts to read it as text and not html??

Could this be a server side problem?

$email = $_REQUEST['email'] ;
$fromaddress .= '[EMAIL PROTECTED]';
$fromname .= 'Zone of success Club';
$eol=\r\n;
$headers  = From: .$fromname..$fromaddress..$eol;
$headers .= Reply-To: .$fromname..$fromaddress..$eol;
$headers .= Return-Path: .$fromname..$fromaddress..$eol;
$headers .= Message-ID: .time().-.$fromaddress..$eol;
$headers .= X-Mailer: PHP .phpversion().$eol;
$headers .= --.$htmlalt_mime_boundary.$eol;
$headers .= Content-Type: text/html; charset=iso-8859-1.$eol;
$headers .= Content-Transfer-Encoding: 8bit.$eol.$eol;
$body = a href=\http://www.zoneofsuccessclub.com\;link /a\n;
mail($email, $subject, $body, $headers);

-Original Message-
From: Daniel Brown [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 14, 2007 11:09 AM
To: Brad
Cc: [EMAIL PROTECTED]; php-general@lists.php.net
Subject: Re: [PHP] Cannot send a hyperlink

Brad,

That code is a mess and highly incorrect, even at a novice level.
Let me give you a hand

On Nov 14, 2007 10:31 AM, Brad [EMAIL PROTECTED] wrote:
 I implemented the proposed code, and emails are not being sent?

 Any suggestions?

 Here is the code

 ?

   $email = $_REQUEST['email'] ;
   $eol=\r\n;
   $headers .= From: .$fromname..$fromaddress..$eol;
   $headers .= Reply-To: .$fromname..$fromaddress..$eol;
   $headers .= Return-Path: .$fromname..$fromaddress..$eol;
   $headers .= Message-ID: .time().-.$fromaddress..$eol;
   $headers .= X-Mailer: PHP .phpversion().$eol;
   $msg .= --.$htmlalt_mime_boundary.$eol;
   $msg .= Content-Type: text/html; charset=iso-8859-1.$eol;
   $msg .= Content-Transfer-Encoding: 8bit.$eol.$eol;
   $body.='ahref='.www.zoneofsuccessclub.com.'link /a';
   $msg .= $body.$eol.$eol;
   mail($to, $subject, $msg, $headers);

 ?

[snip]

1.) You reference $to in the mail() function, but there is no $to
defined.  Instead, either change $email to $to or vice-versa.
2.) You don't need to start the first line of a variable off with
a .= --- this will append to an existing variable of the same name, if
it exists.
3.) You change your quoting style where it's not necessary.  All
$msg lines should be using double quotes in your code above.
4.) ahref=... is not a tag.  The correct usage is a href=...
5.) You have things in the message body that should be in the headers.
6.) You don't need to do a carriage return and newline in the
message body.  A simple \n will suffice.
7.) I'm not sure what you hoped to achieve with the
'.www.domain.com.' conglomerate, but don't.  That makes PHP
think that the domain is some sort of internally-defined variable of
horrible construct.
8.) You should use http:// prior to the FQDN.

Taking hints from what appears to be your code, this is how it should
be:
?
$email = $_REQUEST['email'] ;
$eol=\r\n;
$headers  = From: .$fromname..$fromaddress..$eol;
$headers .= Reply-To: .$fromname..$fromaddress..$eol;
$headers .= Return-Path: .$fromname..$fromaddress..$eol;
$headers .= Message-ID: .time().-.$fromaddress..$eol;
$headers .= X-Mailer: PHP .phpversion().$eol;
$headers .= --.$htmlalt_mime_boundary.$eol;
$headers .= Content-Type: text/html; charset=iso-8859-1.$eol;
$headers .= Content-Transfer-Encoding: 8bit.$eol.$eol;
$body = a href=\http://www.zoneofsuccessclub.com\;link /a\n;
mail($email, $subject, $body, $headers);
?

Prior to asking a bunch of questions on the list, which seriously
puts you at risk for being flamed or ignored, check out these
references:
http://www.bath.ac.uk/bucs/email/anatomy.shtml  [Anatomy of an
Email Message]
http://www.php.net/mail  [PHP Mail Functions]
http://www.htmlgoodies.com/primers/html/  [Beginner's Guide to HTML]

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.31/1128 - Release Date: 11/13/2007
11:09 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007
4:54 PM
 

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



RE: [PHP] Cannot send a hyperlink

2007-11-15 Thread Brad
Thank you so much!

It worked like a champ first try!
I would have never seen that and have been looking everywhere on the net for
a working example!

Funny thing is, right after is work perfectly twice, my database crashed!

But, this is the technology we play with!

Problem solved and I am going to post this code on the php website for
others to reference!

Thank you!

-Original Message-
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 10:16 AM
To: Brad
Cc: php-general@lists.php.net
Subject: Re: [PHP] Cannot send a hyperlink

Brad wrote:
 No access to the server command line to install it!
 And, I am into this guy too deep to switch technologies. For the next time
 around, no problem, this time I am just trying to get php to do what it is
 supposed to do.

You don't need command line access to install it. PHPMailer consists of 
PHP only - nothing to install but PHP files. See here: 
http://phpmailer.sourceforge.net/install.php

 The suggestion of mime was presented to me from another kind sole trying
to
 help that knows more than I and recommended on other help files.
 
 Why is php refusing to parse as html?

And here lies the basic problem. PHP is *not* the thing that's refusing 
to parse it as HTML. Since you don't know that you really should do a 
lot of reading before you try sending HTML emails without using 
something like PHPMailer.

For beeps and farts I've fixed your code, but even though it will now 
work it is nowhere near the right way to send this type of email, but 
my life is probably going to be too short to tell you what you could 
easily find out yourself.

$email = $_REQUEST['email'];
$fromaddress = '[EMAIL PROTECTED]';
$fromname = 'Zone of success Club';
$eol = \r\n;
$headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;
$headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;
$headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;
$headers .= 'X-Mailer: PHP '.phpversion().$eol;
$headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;
$headers .= 'Content-Transfer-Encoding: 8bit';
$subject = 'This is my spam, worship me';
$body = 'a href=http://www.zoneofsuccessclub.com/;link/a';
mail($email, $subject, $body, $headers);

Some *important* notes...

* I defined $subject because it tries to use it.
* You don't need to provide the MessageID - your mail server will do 
that for you... correctly.
* You don't need to add two carriage returns at the end of the headers - 
PHP will do that for you.
* This email will be in HTML only which makes it a lot more likely to 
get flagged as spam.
* If you're on a unix-based platform you really should be using the 5th 
parameter to mail, but that's probably going to confuse the hell out of 
you so I won't mention it. D'oh!
* This code is not secure. It's trivial to inject headers (and a body 
too) into the message. You should be validating that $_REQUEST['email'] 
is a valid email address and just a valid email address.

-Stut

-- 
http://stut.net/

 -Original Message-
 From: Stut [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, November 15, 2007 9:46 AM
 To: Brad
 Cc: 'Daniel Brown'; php-general@lists.php.net
 Subject: Re: [PHP] Cannot send a hyperlink
 
 Brad wrote:
 Beginning with 
 $headers .= --.$htmlalt_mime_boundary.$eol;
 It starts to read it as text and not html??

 Could this be a server side problem?

 $email = $_REQUEST['email'] ;
 $fromaddress .= '[EMAIL PROTECTED]';
 $fromname .= 'Zone of success Club';
 $eol=\r\n;
 $headers  = From: .$fromname..$fromaddress..$eol;
 $headers .= Reply-To: .$fromname..$fromaddress..$eol;
 $headers .= Return-Path: .$fromname..$fromaddress..$eol;
 $headers .= Message-ID: .time().-.$fromaddress..$eol;
 $headers .= X-Mailer: PHP .phpversion().$eol;
 $headers .= --.$htmlalt_mime_boundary.$eol;
 $headers .= Content-Type: text/html; charset=iso-8859-1.$eol;
 $headers .= Content-Transfer-Encoding: 8bit.$eol.$eol;
 $body = a href=\http://www.zoneofsuccessclub.com\;link /a\n;
 mail($email, $subject, $body, $headers);
 
 You should not have a mime boundary in your headers. Why not use 
 PHPMailer? All this (apparently) complicated stuff is already 
 implemented for you. Either that or spend a few days learning about the 
 structure of emails by following the links Daniel Brown sent you a few 
 emails ago.
 
 PHPMailer can be found here: http://phpmailer.sf.net/
 
 -Stut
 

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007
4:54 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007
4:54 PM
 

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



RE: [PHP] Cannot send a hyperlink

2007-11-15 Thread Brad
Not a single reference to sending a hyperlink on that page!

-Original Message-
From: Dimiter Ivanov [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 11:27 AM
To: Brad
Cc: Stut; php-general@lists.php.net
Subject: Re: [PHP] Cannot send a hyperlink

On Nov 15, 2007 5:34 PM, Brad [EMAIL PROTECTED] wrote:
 Thank you so much!

 It worked like a champ first try!
 I would have never seen that and have been looking everywhere on the net
for
 a working example!

 Funny thing is, right after is work perfectly twice, my database crashed!

 But, this is the technology we play with!

 Problem solved and I am going to post this code on the php website for
 others to reference!

 Thank you!


I think there is already a good example of sending mails with html :
http://php.net/manual/en/function.mail.php

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007
4:54 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007
4:54 PM
 

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



RE: [PHP] Cannot send a hyperlink

2007-11-15 Thread Brad
No problem!

-Original Message-
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 10:37 AM
To: Brad
Cc: php-general@lists.php.net
Subject: Re: [PHP] Cannot send a hyperlink

Brad wrote:
 Thank you so much!
 
 It worked like a champ first try!
 I would have never seen that and have been looking everywhere on the net
for
 a working example!
 
 Funny thing is, right after is work perfectly twice, my database crashed!
 
 But, this is the technology we play with!
 
 Problem solved and I am going to post this code on the php website for
 others to reference!

If you do please don't mention me. This might work but as I said in my 
email (which you clearly read very carefully!) it's not the right way to 
do it.

Please pay particular notice to my last important note below... THIS 
CODE IS NOT SECURE. It's easily used as a mail relay script, so please 
don't use it in production or $DEITY will kill a bunch of kittens.

-Stut

-- 
http://stut.net/

 -Original Message-
 From: Stut [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, November 15, 2007 10:16 AM
 To: Brad
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Cannot send a hyperlink
 
 Brad wrote:
 No access to the server command line to install it!
 And, I am into this guy too deep to switch technologies. For the next
time
 around, no problem, this time I am just trying to get php to do what it
is
 supposed to do.
 
 You don't need command line access to install it. PHPMailer consists of 
 PHP only - nothing to install but PHP files. See here: 
 http://phpmailer.sourceforge.net/install.php
 
 The suggestion of mime was presented to me from another kind sole trying
 to
 help that knows more than I and recommended on other help files.

 Why is php refusing to parse as html?
 
 And here lies the basic problem. PHP is *not* the thing that's refusing 
 to parse it as HTML. Since you don't know that you really should do a 
 lot of reading before you try sending HTML emails without using 
 something like PHPMailer.
 
 For beeps and farts I've fixed your code, but even though it will now 
 work it is nowhere near the right way to send this type of email, but 
 my life is probably going to be too short to tell you what you could 
 easily find out yourself.
 
 $email = $_REQUEST['email'];
 $fromaddress = '[EMAIL PROTECTED]';
 $fromname = 'Zone of success Club';
 $eol = \r\n;
 $headers  = 'From: '.$fromname.' '.$fromaddress.''.$eol;
 $headers .= 'Reply-To: '.$fromname.' '.$fromaddress.''.$eol;
 $headers .= 'Return-Path: '.$fromname.' '.$fromaddress.''.$eol;
 $headers .= 'X-Mailer: PHP '.phpversion().$eol;
 $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;
 $headers .= 'Content-Transfer-Encoding: 8bit';
 $subject = 'This is my spam, worship me';
 $body = 'a href=http://www.zoneofsuccessclub.com/;link/a';
 mail($email, $subject, $body, $headers);
 
 Some *important* notes...
 
 * I defined $subject because it tries to use it.
 * You don't need to provide the MessageID - your mail server will do 
 that for you... correctly.
 * You don't need to add two carriage returns at the end of the headers - 
 PHP will do that for you.
 * This email will be in HTML only which makes it a lot more likely to 
 get flagged as spam.
 * If you're on a unix-based platform you really should be using the 5th 
 parameter to mail, but that's probably going to confuse the hell out of 
 you so I won't mention it. D'oh!
 * This code is not secure. It's trivial to inject headers (and a body 
 too) into the message. You should be validating that $_REQUEST['email'] 
 is a valid email address and just a valid email address.
 
 -Stut
 

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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007
4:54 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007
4:54 PM
 

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



RE: [PHP] Cannot send a hyperlink

2007-11-15 Thread Brad
My bad,
You do not need command line access!
I should have read more.

I just need to get this puppy working is all.
Php should be able to do this by it's self!

-Original Message-
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 9:46 AM
To: Brad
Cc: 'Daniel Brown'; php-general@lists.php.net
Subject: Re: [PHP] Cannot send a hyperlink

Brad wrote:
 Beginning with 
 $headers .= --.$htmlalt_mime_boundary.$eol;
 It starts to read it as text and not html??
 
 Could this be a server side problem?
 
 $email = $_REQUEST['email'] ;
 $fromaddress .= '[EMAIL PROTECTED]';
 $fromname .= 'Zone of success Club';
 $eol=\r\n;
 $headers  = From: .$fromname..$fromaddress..$eol;
 $headers .= Reply-To: .$fromname..$fromaddress..$eol;
 $headers .= Return-Path: .$fromname..$fromaddress..$eol;
 $headers .= Message-ID: .time().-.$fromaddress..$eol;
 $headers .= X-Mailer: PHP .phpversion().$eol;
 $headers .= --.$htmlalt_mime_boundary.$eol;
 $headers .= Content-Type: text/html; charset=iso-8859-1.$eol;
 $headers .= Content-Transfer-Encoding: 8bit.$eol.$eol;
 $body = a href=\http://www.zoneofsuccessclub.com\;link /a\n;
 mail($email, $subject, $body, $headers);

You should not have a mime boundary in your headers. Why not use 
PHPMailer? All this (apparently) complicated stuff is already 
implemented for you. Either that or spend a few days learning about the 
structure of emails by following the links Daniel Brown sent you a few 
emails ago.

PHPMailer can be found here: http://phpmailer.sf.net/

-Stut

-- 
http://stut.net/

 -Original Message-
 From: Daniel Brown [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, November 14, 2007 11:09 AM
 To: Brad
 Cc: [EMAIL PROTECTED]; php-general@lists.php.net
 Subject: Re: [PHP] Cannot send a hyperlink
 
 Brad,
 
 That code is a mess and highly incorrect, even at a novice level.
 Let me give you a hand
 
 On Nov 14, 2007 10:31 AM, Brad [EMAIL PROTECTED] wrote:
 I implemented the proposed code, and emails are not being sent?

 Any suggestions?

 Here is the code

 ?

   $email = $_REQUEST['email'] ;
   $eol=\r\n;
   $headers .= From: .$fromname..$fromaddress..$eol;
   $headers .= Reply-To: .$fromname..$fromaddress..$eol;
   $headers .= Return-Path: .$fromname..$fromaddress..$eol;
   $headers .= Message-ID: .time().-.$fromaddress..$eol;
   $headers .= X-Mailer: PHP .phpversion().$eol;
   $msg .= --.$htmlalt_mime_boundary.$eol;
   $msg .= Content-Type: text/html; charset=iso-8859-1.$eol;
   $msg .= Content-Transfer-Encoding: 8bit.$eol.$eol;
   $body.='ahref='.www.zoneofsuccessclub.com.'link /a';
   $msg .= $body.$eol.$eol;
   mail($to, $subject, $msg, $headers);

 ?
 
 [snip]
 
 1.) You reference $to in the mail() function, but there is no $to
 defined.  Instead, either change $email to $to or vice-versa.
 2.) You don't need to start the first line of a variable off with
 a .= --- this will append to an existing variable of the same name, if
 it exists.
 3.) You change your quoting style where it's not necessary.  All
 $msg lines should be using double quotes in your code above.
 4.) ahref=... is not a tag.  The correct usage is a href=...
 5.) You have things in the message body that should be in the headers.
 6.) You don't need to do a carriage return and newline in the
 message body.  A simple \n will suffice.
 7.) I'm not sure what you hoped to achieve with the
 '.www.domain.com.' conglomerate, but don't.  That makes PHP
 think that the domain is some sort of internally-defined variable of
 horrible construct.
 8.) You should use http:// prior to the FQDN.
 
 Taking hints from what appears to be your code, this is how it should
 be:
 ?
 $email = $_REQUEST['email'] ;
 $eol=\r\n;
 $headers  = From: .$fromname..$fromaddress..$eol;
 $headers .= Reply-To: .$fromname..$fromaddress..$eol;
 $headers .= Return-Path: .$fromname..$fromaddress..$eol;
 $headers .= Message-ID: .time().-.$fromaddress..$eol;
 $headers .= X-Mailer: PHP .phpversion().$eol;
 $headers .= --.$htmlalt_mime_boundary.$eol;
 $headers .= Content-Type: text/html; charset=iso-8859-1.$eol;
 $headers .= Content-Transfer-Encoding: 8bit.$eol.$eol;
 $body = a href=\http://www.zoneofsuccessclub.com\;link /a\n;
 mail($email, $subject, $body, $headers);
 ?
 
 Prior to asking a bunch of questions on the list, which seriously
 puts you at risk for being flamed or ignored, check out these
 references:
 http://www.bath.ac.uk/bucs/email/anatomy.shtml  [Anatomy of an
 Email Message]
 http://www.php.net/mail  [PHP Mail Functions]
 http://www.htmlgoodies.com/primers/html/  [Beginner's Guide to HTML]
 

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007
4:54 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 11/14/2007
4:54 PM
 

-- 
PHP General Mailing List (http

RE: [PHP] Cannot send a hyperlink

2007-11-14 Thread Brad
I implemented the proposed code, and emails are not being sent?

Any suggestions?

Here is the code

?

  $email = $_REQUEST['email'] ;
  $eol=\r\n;
  $headers .= From: .$fromname..$fromaddress..$eol;
  $headers .= Reply-To: .$fromname..$fromaddress..$eol;
  $headers .= Return-Path: .$fromname..$fromaddress..$eol;
  $headers .= Message-ID: .time().-.$fromaddress..$eol;
  $headers .= X-Mailer: PHP .phpversion().$eol;
  $msg .= --.$htmlalt_mime_boundary.$eol;
  $msg .= Content-Type: text/html; charset=iso-8859-1.$eol;
  $msg .= Content-Transfer-Encoding: 8bit.$eol.$eol;
  $body.='ahref='.www.zoneofsuccessclub.com.'link /a';
  $msg .= $body.$eol.$eol;
  mail($to, $subject, $msg, $headers);

?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 11, 2007 7:43 AM
To: 'M. Sokolewicz'
Cc: 'Brad'; php-general@lists.php.net
Subject: RE: [PHP] Cannot send a hyperlink

Brad I'm sorry.

Instead of insulting you and telling you to go read a book I simply
explained an option. 

Yes you do not need quotes in the mail() function.

As for the declared variables I was trying to show you an example. 

You will find many explanations for how or what is best practice.
Remember that some people like to toot a horn that can be reputed in many
ways. These are the same people who again and again are not the ones who
answer the questions, yet try to take credit by belittling the answer with
gibberish. 
The answer was intended to take you in a better direction when constructing
a email application in php.
 
  $eol=\r\n;
  $headers .= From: .$fromname..$fromaddress..$eol;
  $headers .= Reply-To: .$fromname..$fromaddress..$eol;
  $headers .= Return-Path: .$fromname..$fromaddress..$eol;
  $headers .= Message-ID: .time().-.$fromaddress..$eol;
  $headers .= X-Mailer: PHP v.phpversion().$eol;
  $msg .= --.$htmlalt_mime_boundary.$eol;
  $msg .= Content-Type: text/html; charset=iso-8859-1.$eol;
  $msg .= Content-Transfer-Encoding: 8bit.$eol.$eol;
  $msg .= $body.$eol.$eol;
  mail($to, $subject, $msg, $headers);





-Original Message-
From: M. Sokolewicz [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 11, 2007 4:07 AM
To: [EMAIL PROTECTED]
Cc: 'Brad'; php-general@lists.php.net
Subject: Re: [PHP] Cannot send a hyperlink

[EMAIL PROTECTED] wrote:
 The Answer is quiet simple.
 
 
 $E_MAIL = [EMAIL PROTECTED];
 $to  = [EMAIL PROTECTED];
 $headers  = MIME-Version: 1.0\r\n;
 $headers .= Content-type: text/html; charset=iso-8859-1\r\n;
 $headers .= To: Their Name[EMAIL PROTECTED] \r\n;
 $headers .= From: your email [EMAIL PROTECTED]\r\n;
 $link = http://www.zoneofsuccessclub.com;;
 $mailmsg = BLAH BLAH BLAH link:a href=$linkzoneofsuccessclub/a;
 $mailsubject = what ever you want to say;

Well, anyone doing this:
 mail($E_MAIL, $mailsubject, $mailmsg, $headers);
makes ME very unhappy. I don't get it, what's so hard to understand 
about NOT HAVING TO USE ANY QUOTES HERE ? Are you defining any type of 
string-like values here? no. Then you don't need quotes, right? no, you 
don't. SO DON'T USE THEM HERE THEN.
You're defining a $to and an $E_MAIL, you're not using $to anywhere, and 
only using $E_MAIL in one place (out of two), thus creating a mismatch 
between your headers and the To parameter for mail (which is used in 
SMTP traffic). [iz bad (tm)]

- Tul

 
 
 
 You can use the database to generate the $E_MAIL address and the $to
 Never Ever had this to not work.
 Your problem is the Headers are missing which allows the html content to
 embed into the email.
 
 Try that I think you will be happy.
 
 
 
 
 -Original Message-
 From: Brad [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, November 10, 2007 2:36 PM
 To: php-general@lists.php.net
 Subject: [PHP] Cannot send a hyperlink
 
 I am having trouble send an email with a hyperlink
 
 Php is parsing html as text
 
 If I add the proper header information to ?make it work? The email no
longer
 goes through?
 
  
 
 Here is the code
 
  
 
 ?
 
   $email = $_REQUEST['email'] ;
 
 $body = 'a href='.www.zoneofsuccessclub.com.'link /a';
 
 $headers  = 'MIME-Version: 1.0' . \r\n;
 
  $headers .= 'Content-type: text/html; charset=iso-8859-1' . \r\n;
 
   mail( $email, Your FREE book from Zone of Success Club .com,
 
 $headers, $message, From: $email );
 
 ?
 
  
 
 Thanks
 
 Brad
 
 
 No virus found in this outgoing message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date:
11/10/2007
 10:41 AM
  

-- 
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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007
10:41 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus

RE: [PHP] Cannot send a hyperlink

2007-11-10 Thread Brad
I am not sure that would help.
Just another can of worms.
The $_REQUEST is tied into a whole bunch of database functions.

My present code


?
  $email = $_REQUEST['email'] ;
  $message = 'a href='.www.zoneofsuccessclub.com.'link /a';
 $headers  = 'MIME-Version: 1.0' . \r\n;
 $headers .= 'Content-type: text/html; charset=iso-8859-1' . \r\n;
  mail( $email, Your FREE book from Zone of Success Club .com,
$headers, $message, From: $email );
?

-Original Message-
From: Jochem Maas [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 10, 2007 3:44 PM
To: Brad
Subject: Re: [PHP] Cannot send a hyperlink

this will help: http://phpmailer.sourceforge.net/

Brad wrote:
 I am having trouble send an email with a hyperlink
 
 Php is parsing html as text
 
 If I add the proper header information to ?make it work? The email no
longer
 goes through?
 
  
 
 Here is the code
 
  
 
 ?
 
   $email = $_REQUEST['email'] ;
 
 $body = 'a href='.www.zoneofsuccessclub.com.'link /a';
 
 $headers  = 'MIME-Version: 1.0' . \r\n;
 
  $headers .= 'Content-type: text/html; charset=iso-8859-1' . \r\n;
 
   mail( $email, Your FREE book from Zone of Success Club .com,
 
 $headers, $message, From: $email );
 
 ?
 
  
 
 Thanks
 
 Brad
 
 
 No virus found in this outgoing message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date:
11/10/2007
 10:41 AM
  
 


No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007
10:41 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007
10:41 AM
 

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



RE: [PHP] Cannot send a hyperlink

2007-11-10 Thread Brad
I am reading up on it now.
I am going to take your advice.

Be prepared for a few questions as I make it past the learning curve!

:o)

-Original Message-
From: Jochem Maas [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 10, 2007 4:47 PM
To: Brad
Cc: php-general@lists.php.net
Subject: Re: [PHP] Cannot send a hyperlink

Brad wrote:
 I am not sure that would help.

I am.

 Just another can of worms.

no, not really, not at all.

 The $_REQUEST is tied into a whole bunch of database functions.

wtf. $_REQUEST is a super global - nothing what so ever to do
with databases.

 
 My present code
 

 is about as robust as a soap bubble. in a world where 60-70
of all mail is SPAM how far do you think the crufty output your generating
is going to get? my guess is generally just as far as /dev/null
on the recipient machine.

which is why I suggested a mailer class that is known to work and wraps
up all the tricky crap (and protects you from making stupid mistakes like
opening up the mail() function to mail header injection attacks.

most people will probably be using a DB as the source of dynamic content
for generated emails, your situation is nothing special in that regard.

 
 ?
   $email = $_REQUEST['email'] ;

oh yeah and taking the 'to' email address from the request is just asking
for your script to be turned into spambot.

   $message = 'a href='.www.zoneofsuccessclub.com.'link /a';
  $headers  = 'MIME-Version: 1.0' . \r\n;
  $headers .= 'Content-type: text/html; charset=iso-8859-1' . \r\n;
   mail( $email, Your FREE book from Zone of Success Club .com,
 $headers, $message, From: $email );
 ?
 
 -Original Message-
 From: Jochem Maas [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, November 10, 2007 3:44 PM
 To: Brad
 Subject: Re: [PHP] Cannot send a hyperlink
 
 this will help: http://phpmailer.sourceforge.net/
 

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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007
10:41 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007
10:41 AM
 

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



RE: [PHP] Cannot send a hyperlink

2007-11-10 Thread Brad
Explanation of code

$email = $_REQUEST['email'] ;
(generated by dreamweaver that pulls in the database functions)

$message = 'a href='.www.zoneofsuccessclub.com.'link /a';
(my nemesis, I can not figure out this puppy. If it works at all, php will
generate it at text and not html. Taken from example I find on the web.)

$headers  = 'MIME-Version: 1.0' . \r\n;  $headers .= 'Content-type:
text/html; charset=iso-8859-1' . \r\n;
(found on the web to solve my html problem???)

mail( $email, Your FREE book from Zone of Success Club .com, $headers,
$message, From: $email ); ?
(Send the mail, when I put $headers in, the function quits working all
together.)

I hope this helps explain where my head is!

Brad


-Original Message-
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 10, 2007 4:55 PM
To: Brad
Cc: 'Jochem Maas'; php-general@lists.php.net
Subject: Re: [PHP] Cannot send a hyperlink

Brad wrote:
 I am not sure that would help.
 Just another can of worms.
 The $_REQUEST is tied into a whole bunch of database functions.

I have no idea what you mean by this. It makes no sense to me.

 My present code
 
 
 ?
   $email = $_REQUEST['email'] ;
   $message = 'a href='.www.zoneofsuccessclub.com.'link /a';
  $headers  = 'MIME-Version: 1.0' . \r\n;
  $headers .= 'Content-type: text/html; charset=iso-8859-1' . \r\n;
   mail( $email, Your FREE book from Zone of Success Club .com,
 $headers, $message, From: $email );
 ?

You *really* need to read the manual page for function before you use 
them. For example a quick glance at http://php.net/function.mail reveals 
that you have the parameters in an almost completely wrong order.

And please tell me you're not really setting the to address directly 
from an external variable with verifying that it's just an email address 
and nothing else. Really bad idea.

-Stut

-- 
http://stut.net/

 -Original Message-
 From: Jochem Maas [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, November 10, 2007 3:44 PM
 To: Brad
 Subject: Re: [PHP] Cannot send a hyperlink
 
 this will help: http://phpmailer.sourceforge.net/
 
 Brad wrote:
 I am having trouble send an email with a hyperlink

 Php is parsing html as text

 If I add the proper header information to ?make it work? The email no
 longer
 goes through?

  

 Here is the code

  

 ?

   $email = $_REQUEST['email'] ;

 $body = 'a href='.www.zoneofsuccessclub.com.'link /a';

 $headers  = 'MIME-Version: 1.0' . \r\n;

  $headers .= 'Content-type: text/html; charset=iso-8859-1' . \r\n;

   mail( $email, Your FREE book from Zone of Success Club .com,

 $headers, $message, From: $email );

 ?

  

 Thanks

 Brad


 No virus found in this outgoing message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date:
 11/10/2007
 10:41 AM
  

 
 
 No virus found in this incoming message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date:
11/10/2007
 10:41 AM
  
 
 No virus found in this outgoing message.
 Checked by AVG Free Edition. 
 Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date:
11/10/2007
 10:41 AM

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007
10:41 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007
10:41 AM
 

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



RE: [PHP] re-post (unanswered) Tables, flash and text

2007-11-07 Thread Brad
Sure thing,

The site is http://www.gaymillionaire.net

You can see that I have a bunch of text underneath the flash animation in
the middle.
I am trying to fill the dead space to the right of it.

In the code, I can see where to widen the table.
One would think that php would fill the dead space if the is nothing
blocking it.
But it is not.

Here is the snippet I think is controlling it.
Just seeking an answer or got reading material to understand it.

div class=padded

div class=columnWide
?php $this-loadTemplate(boxes/simple.tpl, false, array('secheader' =
$this-language['welcome'], 'class' = 'brown'), true); ?  

object classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354 
codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#version=7,0,19,0 
declare=declare name=gay personals, lesbian dating 
width=325 height=310 title=flash
param name=movie 
value=slideshow_as1.swf /
param name=quality value=high /
embed src=gfx/slideshow_as1.swf 
quality=high pluginspage=http://www.macromedia.com/go/getflashplayer; 
type=application/x-shockwave-flash width=325 height=310/embed
  /object
br
Not a member yet? Please a href=index.php?page=joinclick here/a to
join 
for FREE or push the button Join now below to apply and start networking
with more then
35,000 members of GayMillionaire.net!br
br

-Original Message-
From: Per Jessen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 07, 2007 8:20 AM
To: php-general@lists.php.net
Subject: Re: [PHP] re-post (unanswered) Tables, flash and text

Brad wrote:

 I just picked up an account to fix a website and the code is making no
 sense.

Brad, it's been barely six hours since you first posted that question.  

1) be patient. 
2) it's a lot of code to ask someone else to look at for you.  I would
start by narrowing down the problem/code a bit, then perhaps ask the
question again.


/Per Jessen, Zürich

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


No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.23/1113 - Release Date: 11/6/2007
10:04 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.24/1115 - Release Date: 11/7/2007
9:21 AM
 

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



[PHP] header error without whitespace issue

2007-10-12 Thread Brad
Error =

WARNING: Cannot modify header information - headers already sent by (output
started at /home/zoneof5/public_html/index-dev.html:10) in line 1528 of file
common.inc.php

 

Which comes from me trying to take a login script and put it into an
existing .html file with .htaccess configured to parse php scripts.

 

Research yields that the header needs to be loaded before anything.

The header is being called by another file “common.inc.php”

 

How do I safely extract this call from the existing script and place the
call at the beginning of the .html or just simply fix the error?

 

Php code;

 

 

?php

include('./amember/config.inc.php');

$t =  new_smarty();

$_product_id = array('ONLY_LOGIN');

if (isset($_REQUEST['amember_redirect_url']))

$_SESSION['amember_redirect_url'] = $_REQUEST['amember_redirect_url'];

function rcmp_begin_date($a, $b){

return strcmp($b['begin_date'], $a['begin_date']);

}

include($config['plugins_dir']['protect'] . '/php_include/check.inc.php');

$payments =  $db-get_user_payments(intval($_SESSION['_amember_id']), 1);

usort($payments, 'rcmp_begin_date');

$now = date('Y-m-d');

$urls = array();

foreach ($payments as $k=$v){

if (($v['expire_date'] = $now)  ($v['begin_date'] = $now)) {

$p = get_product($v['product_id']);

$url = $p-config['url'];

if (strlen($url)){

$urls[] = $url;

}

}

}

if ($_SESSION['amember_redirect_url']) {

$redirect = $_SESSION['amember_redirect_url'];

unset($_SESSION['amember_redirect_url']);

} elseif (count(array_unique($urls)) == 1){

if (in_array('htpasswd_secure', $plugins['protect'])){

$member_login_pw = 

htpasswd_secure_get_login($_SESSION['_amember_user']['login']).

':'.

htpasswd_secure_get_passwd($_SESSION['_amember_user']['pass']);

$redirect = add_password_to_url($urls[0], $member_login_pw);

} else {

if ($config['display_member_pw_urls']) {

 $member_login_pw = 

 $_SESSION['_amember_user']['login'].

 ':'.

 $_SESSION['_amember_user']['pass'];

 $redirect = add_password_to_url($urls[0], $member_login_pw);

} else {

$redirect = add_password_to_url($urls[0]);

}

}

} else {

$redirect = $config['root_url'] . /amember/member.php;

}

#print_r($urls);

html_redirect($redirect, 0, 'Redirect', _LOGIN_REDIRECT);

?


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.488 / Virus Database: 269.14.8/1064 - Release Date: 10/11/2007
3:09 PM
 


Re: [PHP] adding Back to Search results link

2007-08-15 Thread Brad Bonkoski

Something like this might work:
a href=javascript:history.go(-1)
(To go back 1 page)
Of course if this is a form post, it would repost the data resulting in 
that annoying pop-up on most browsers indicating the page is being 
re-posted.


Maybe you could write out the post variables to the session variables, 
and have your page 2 look for the $_POST and $_SESSION for the variables 
in question...


-B

Derek Moon wrote:

I am trying to imporve a web application that my group uses.

Basically there are 3 forms that work together Form 1  form 2

Form 1 - searchs for enterend values
Form 2 - returns search results, letting you individually select any item
Form 3 - lets you edit a specific individual item

I want to make a link on the Form 3 that returns you to form Form 2
basically a Back to Search results link.

I'm thinking that there is a way to pass the query string, but I am a newbie 
and I'm not sure that I am going about this the right way.


Anyone have any advice or knowledge to share? 

  


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



Re: [PHP] Numbers, Numbers everywhere! Need some Dollar help.

2007-08-02 Thread Brad Bonkoski

Dan Shirah wrote:

Greetins all,

In my form I have an area where the user enters in the payment amount:

input type=Text value= size=20 maxlength=16 name=payment_amount

This is all fine and dandy and works as generically as it can. BUT, the
problem is that I need to make sure the user didn't fat finger any of the
numbers.  For instance, in my generic text field the user types 600 in the
payment amount and clicks submit.

This works and the user is charged $600.  But, come to find out the user
meant to enter 6.00 not 600. Can I add a check using PHP to force the user
to put in the dollar AND cents? This way if a number such as 600 is entered
and the user hits save, the check will notice there isn't a .00 on the end
and prompt the user for more information.

Could I incorporate something like:

if ($payment_amount != number_format($payment_amount, 2)) {
  error here
}

Or, do you think I would be better off using two text areas?  One for the
dollar value and one for the cents?

Or, do you think I would be better off trying to find some kind of
javascript function that would check the value upon submit?

Any help is appreciated.

Dan

  
If you want it squarely on the client side, then use javascript.  There 
are easy functions to split a text string (like php's explode).
Then you can split on the '.' and then do some logical stuff like the 
cents is between 00 and 99, and anything else you think necessary.
If there are no cents, then you can issue a confirmation box.  So, my 
vote is to handle it within javascript, as it should not be too difficult.

-B

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



Re: [PHP] I'm prepared to feel like an idiot... But I just simply need the answer :)

2007-08-01 Thread Brad Bonkoski
I would start with suppling the entire path of for php in the cron.  The 
path in the cron environment may be vastly different then the path in 
your shell environment...

so: /path/to/php file.php
See how that works for you, of course I am assuming it runs fine from 
your command line...

-B

Jason Pruim wrote:

Hi All :)

I have a php script that I am attempting to run from the CLI to 
connect to a MySQL database and update a field. but when I run it with 
this command: php cronjob.php it prints out the script on screen but 
doesn't process it...


Running: php-rphpinfo(); prints out the standard phpinfo screen.. 
and I don't think I should have to write it differently to make it run 
from the command line right?


HELP! I'm desperate... I would offer to name my first born after 
you... But he's already been born :)



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]





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



Re: [PHP] I'm prepared to feel like an idiot... But I just simply need the answer :)

2007-08-01 Thread Brad Bonkoski

Brad Bonkoski wrote:

Jason Pruim wrote:


On Aug 1, 2007, at 9:55 AM, Michael Preslar wrote:


@mysql_connect('localhost', 'user', 'password') or die(Cannot
connect to DB! . mysql_error());

..

cannot connect to DB!Can't connect to local MySQL server through
socket '/var/mysql/mysql.sock' (2)qs:/volumes/raider/webserver/
documents/tests/ticklers japruim$


MySQL is running right? (I know, silly question, but have to make sure)

If it is.. grep sock /etc/my.ini .. Bet the socket file its creating
is in /tmp or /var/lib/mysql


Okay, so the command didn't work.. couldn't find my.ini... But I just 
cd'ed into /tmp and there is a file mysql.sock in there... Do I need 
to move that somewhere else? I realize that this is starting to get 
off topic for this list... So Maybe I should take this to a mysql 
list since it looks like php isn't at fault?



I *think* the mysql config file is named: my.cnf
so run a slocate or find on your system to see where it is and look at 
the line:
socket  = 
/var/run/mysqld/mysqld.sock


You can also go into your php.ini file and check out the line:
mysql.default_socket =
and perhaps setting that to where it is located in your /tmp directory 
will do the trick...


-B


As a quick follow up...
the command:
$ php -i | grep mysql

will spit out info on how php thinks mysql is set up currently...
one of the items is:
MYSQL_SOCKET = ...
So just make sure that is in tune with where the socket really is running
-B



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--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] I'm prepared to feel like an idiot... But I just simply need the answer :)

2007-08-01 Thread Brad Bonkoski

Jason Pruim wrote:


On Aug 1, 2007, at 9:55 AM, Michael Preslar wrote:


@mysql_connect('localhost', 'user', 'password') or die(Cannot
connect to DB! . mysql_error());

..

cannot connect to DB!Can't connect to local MySQL server through
socket '/var/mysql/mysql.sock' (2)qs:/volumes/raider/webserver/
documents/tests/ticklers japruim$


MySQL is running right? (I know, silly question, but have to make sure)

If it is.. grep sock /etc/my.ini .. Bet the socket file its creating
is in /tmp or /var/lib/mysql


Okay, so the command didn't work.. couldn't find my.ini... But I just 
cd'ed into /tmp and there is a file mysql.sock in there... Do I need 
to move that somewhere else? I realize that this is starting to get 
off topic for this list... So Maybe I should take this to a mysql list 
since it looks like php isn't at fault?



I *think* the mysql config file is named: my.cnf
so run a slocate or find on your system to see where it is and look at 
the line:
socket  = 
/var/run/mysqld/mysqld.sock


You can also go into your php.ini file and check out the line:
mysql.default_socket =
and perhaps setting that to where it is located in your /tmp directory 
will do the trick...


-B




--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--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] Question about passing date in sql...

2007-08-01 Thread Brad Bonkoski

Payne wrote:

Guys,

Got a quick question.  I got a sql statement works when I pass it from 
the cli. but if I try in php I get nothing.


This is the statement.

Select ip, date, time, CONCAT(city, ', ',country) as location from ips 
where country !=' ' and date='`date +%Y%m%d`' order by country asc;


I know it has to do with date='`date +%Y%m%d`', because if I remove it 
works.


Any clue as to why?

Payne


why not use the PHP function to format the date?

http://www.php.net/date
-B

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



Re: [PHP] best technique to get the ID of the last inserted value

2007-07-20 Thread Brad Bonkoski

One easy solution would be to get the ID before you do the insert
i.e. in Oracle you would run the query:
select some_id_generating_seq.nextval from dual

and then you would use that id to insert and you would know the id after 
that...and the DB would take care of locking and such.
So, check the help pages for your DB of choice to see what support they 
have for something like that.


-B

Marcelo Wolfgang wrote:

Hi all,

I'm a newbie in PHP, and I want to know what's the best technique you 
guys use when you need to get the id of the last inserted value in the 
database.


My first thought is to do a SELECT on the db and get the last id, but 
I know that if I have two almost simultaneous connections I may get 
the wrong one, so that's the why of my question.


TIA
Marcelo Wolfgang



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



Re: [PHP] Edinburgh, Scotland: PHP Developer Position

2007-06-18 Thread Brad Bonkoski

Jochem Maas wrote:

Edward Kay wrote:

...

  

But the advert is for a GRADUATE developer ;) Whilst your messages to this
list show you know a lot about PHP, I doubt you've managed to fit a degree
in yet :)



What does a graduate php developer earn in Scotland? and is it
the the piece of paper that's important or is it a reference to the
general skill level (personally I don't see much direct corellation
between academic capabilities and practical coding/sysadmin skill).

just thinking out loud guys :-)

  
This is always beat around...and my 2 cents are that all the piece of 
paper is worth is showing you have a certain level of commitment needed 
to complete the degree program (important for any job), and that you 
have the ability to learn.  Granted...there are always exceptions to the 
rule...


Plus, at least in the US, it [a degree] always opens the door for more 
money! ;-)



Edward




  


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



Re: [PHP] subtracting time from date and time

2007-06-18 Thread Brad Bonkoski
Something like this will get it into a time stamp...and then you can do 
your calculations with ease, and reformat...

?php
   $str = 20070617T193500;
   list($date, $time) = explode(T,$str);

   $year = substr($date, 0, 4);
   $mon = substr($date, 4, 2);
   $day = substr($date, 6,2);
   echo $year - $mon - $day\n;

   $h = substr($time, 0, 2);
   $m = substr($time, 2, 2);
   $s = substr($time, 4,2);
   echo $h : $m: $s\n;

   $ts = mktime($h,$m,$s,$mon,$day,$year);
?

-Brad

Richard Kurth wrote:

I am trying to figure out what is the most accurate way to find the time
after I subtract 5 min,15 min, 30 min 1 hour 2 hours and 5 hours from a date
and time that is formatted like this 
20070617T193500 this is the way it has to be formatted to work in a

vcalendar
 
 
 

  


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



RE: [PHP] Parse domain from URL

2007-06-08 Thread Brad Fuller
Tijnema wrote:
 On 6/7/07, Brad Fuller [EMAIL PROTECTED] wrote:
 Robin Vickery wrote:
 In that case you can't do it just by parsing alone, you need to use
 DNS. 
 
 ?php
 function get_domain ($hostname) {
   dns_get_record($hostname, DNS_A, $authns, $addt);   return
 $authns[0]['host']; } 
 
 print get_domain(www.google.com) . \n; print
 get_domain(google.com) . \n; print
 get_domain(www.google.co.uk) . \n; print
 get_domain(google.co.uk) . \n; print
 get_domain(google.co.uk) . \n; print
 get_domain(google.com.au) . \n; print
 get_domain(www.google.com.au) . \n;
 
 /* result
 google.com
 google.com
 google.co.uk
 google.co.uk
 google.co.uk
 google.com.au
 google.com.au
 */
 
 
 
 Robin,
 
 This is a very good solution, and I thank you for your response.
 However I had been experimenting with dns_get_record() before my
 original post and it produces strange results on my machine.  And
 your example, on my machine, produces no output.
 
 ?
 $dns_result = dns_get_record(www.google.com, DNS_A, $authns,
 $addt); 
 
 print_r($dns_result);
 print_r($authns);
 print_r($addt);
 
 /* result
 Array
 (
[0] = Array
(
[host] = www.l.google.com
[type] = A
[ip] = 64.233.161.99
[class] = IN
[ttl] = 136
)
 
[snip]
 )
 Array
 (
 )
 Array
 (
 )
 */
 
 
 
 Any suggestions??
 
 
 Thanks,
 Brad
 
 I have same results as you brad,
 I have Apache 2.2.3 + PHP 5.2.3RC1, so if you finally get it
 working, it's definitely not portable code :P Maybe it's an
 option to talk to a whois server?
 
 Tijnema

Actually I need to get the root domain from the URL as a previous step to a
WHOIS query.  You can't do a WHOIS on www.example.com.  It has to be
example.com only.

dig www.example.com  doesn't always give the information I need either.

I think DNS is the way to go, but need to figure out why dns_get_record()
returns an empty authns array for some of us but works properly for Robin
and for the example in the manual.  I haven't found anything yet, but I'll
keep searching.

Thanks,

Brad

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



RE: [PHP] Re: File Upload - post_max_size and upload_max_filesize in GBs

2007-06-08 Thread Brad Fuller
Sukhwinder Singh wrote:
 Stut, thank you very much for explaining things and trying to help.
 
 The applet *does* POST to PHP. However, it has the option to upload
 to an FTP server the choice of using HTTP, HTTPS or FTP
 connections for your transfer (from the website).
 
 So it seems applet posts complete data to that php file
 handling script (rather php engine),*as soon as upload button
 is clicked*, rather than uploading first and then posting to
 php. That is the reason for name phpxx.tmp of temporary file.
 
 As that seems to be the case; there is no real benefit in
 using applet (in case of http) other than that progress bar
 which is already supported by php
 5.2
 
 It also seems that php engine only hands over control to php
 file after the file is completely uploaded that is why my
 custom logging doesn't start as soon as upload starts. It
 only starts when file is already uploaded.
 
 The timeout is likely coming from Apache. It has a limits similar to
 PHP. 
 
 Tested on two servers. Both cases it seems to fail if it
 takes more than 30 seconds.
 I get an error:
 [08-Jun-2007 20:15:06] PHP Fatal error:  Maximum execution
 time of 30 seconds exceeded in \handle_upload.php on line 2
 
 
 If you don't mind me asking, what are people uploading? 4gig is a lot
 for a single file of any type except maybe DVD images. Is there no
 way the user can upload several (read lots) smaller files instead of
 one big one? 
 
 It is not people that are uploading things. It is admin, and
 admin is local to server. I won't want to try uploading 4 GB
 over internet. And yes these are dvd files. They are going to
 be uploaded for streaming. But along with uploading of files
 som other fields also have to be uploaded. Client is showing
 examples like http://www.attachmore.com/Whysubscribe.aspx
 which claim unlimited upload size. I assume they are using
 custom activex controls.
 
 Looks like I have to post that php's upload limit of 1.99 gb
 to php internal mailing list.
 
 Thanks again,
 Sukhwinder Singh
 
 
 
 
  . - Original Message -
 From: Stut [EMAIL PROTECTED]
 To: Sukhwinder Singh [EMAIL PROTECTED]
 Cc: Jim Moseby [EMAIL PROTECTED];
 php-general@lists.php.net
 Sent: Friday, June 08, 2007 6:42 PM
 Subject: Re: [PHP] Re: File Upload - post_max_size and
 upload_max_filesize in GBs 
 
 
 Sukhwinder Singh wrote:
 PHP's handling of uploaded files is confusing. I have added logging
 to the script to which jupload posts. Logging suggests that php file
 is only accessed after file is completely uploaded by jupload. I
 also checked apache access logs. Entry in apache log appears only
 after file is completely uploaded.
 
 Absolutely correct - the data sent with an HTTP POST will be
 completely uploaded before the PHP script is started. Likewise, the
 entry in the apache log will only be done once the request is
 completed otherwise it doesn't know all the information it needs.
 
 Another thing that came up with this jupload is that as soon as I
 hit upload button, a file named phpxx.tmp (xx is any number) is
 created in temporary directory and its size starts growing as
 upload happens. 
 
 If applet doesn't post to php even at start then how come the
 temporary file is named phpxx.tmp.
 
 The applet *does* POST to PHP. However, it has the option to upload
 to an FTP server the choice of using HTTP, HTTPS or FTP
 connections for your transfer (from the website).
 
 I tried to upload file on internet using jupload and it seems to me
 script is timing out even when I have specified 1 hour as timeout.
 set_time_limit(216000); 
 
 137 MB upload seemed to time out. and the set_time_limit doesn't
 seem to have any affect. 
 
 Now the even if I accept php's 1.99 GB limit. What to do about this
 timeout? Do I have to set it in php.ini? Why woudn't it work through
 the above function?
 
 The timeout is likely coming from Apache. It has a limits similar to
 PHP. 
 
 Stut is suggesting it has to be custom made as this kind of solution
 doesn't seem to already exit. A solution where some applet etc. only
 passes that information to php which is needed to move the file and
 update the database.
 
 Indeed, that is what I'm suggesting. However, I *do* think the
 solution exists, but I've only ever seen it on specific websites.
 I've never seen a product that can do this sort of thing.
 
 If you don't mind me asking, what are people uploading? 4gig is a lot
 for a single file of any type except maybe DVD images. Is there no
 way the user can upload several (read lots) smaller files instead of
 one big one? 
 
 -Stut


Have a look at Filechucker http://encodable.com/filechucker/

My company purchased this program for a small project; It's quite
inexpensive ($39 USD) and works well.  It's written in perl and does not
post to PHP, and we've used it to upload large files and it seems to handle
them just fine.

HTH,

Brad

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

RE: [PHP] Parse domain from URL

2007-06-07 Thread Brad Fuller
Robin Vickery wrote:
 In that case you can't do it just by parsing alone, you need to use
 DNS. 
 
 ?php
 function get_domain ($hostname) {
   dns_get_record($hostname, DNS_A, $authns, $addt);   return
 $authns[0]['host']; }
 
 print get_domain(www.google.com) . \n; print
 get_domain(google.com) . \n; print
 get_domain(www.google.co.uk) . \n; print
 get_domain(google.co.uk) . \n; print
 get_domain(google.co.uk) . \n; print
 get_domain(google.com.au) . \n; print
 get_domain(www.google.com.au) . \n;
 
 /* result
 google.com
 google.com
 google.co.uk
 google.co.uk
 google.co.uk
 google.com.au
 google.com.au
 */
 


Robin,

This is a very good solution, and I thank you for your response.  However I
had been experimenting with dns_get_record() before my original post and it
produces strange results on my machine.  And your example, on my machine,
produces no output.

?
$dns_result = dns_get_record(www.google.com, DNS_A, $authns, $addt);

print_r($dns_result);
print_r($authns);
print_r($addt);

/* result
Array
(
[0] = Array
(
[host] = www.l.google.com
[type] = A
[ip] = 64.233.161.99
[class] = IN
[ttl] = 136
)

[1] = Array
(
[host] = www.l.google.com
[type] = A
[ip] = 64.233.161.147
[class] = IN
[ttl] = 136
)

[2] = Array
(
[host] = www.l.google.com
[type] = A
[ip] = 64.233.161.103
[class] = IN
[ttl] = 136
)

[3] = Array
(
[host] = www.l.google.com
[type] = A
[ip] = 64.233.161.104
[class] = IN
[ttl] = 136
)

)
Array
(
)
Array
(
)
*/

?

Any suggestions??


Thanks,
Brad

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



[PHP] Parse domain from URL

2007-06-06 Thread Brad Fuller
Hey guys,

I'm faced with an interesting problem, and wondering if there's an easy
solution.

I need to strip out a domain name from a URL, and ignore subdomains (like
www)

I can use parse_url to get the hostname. And my first thought was to take
the last 2 segments of the hostname to get the domain.  So if the URL is
http://www.example.com/
Then the domain is example.com.   If the URL is http://example.org/ then
the domain is example.org.

This seemed to work perfectly until I come across a URL like
http://www.example.co.uk/
My script thinks the domain is co.uk.

So I added a bit of code to account for this, basically if the 2nd to last
segment of the hostname is co then take the last 3 segments.

Then I stumbled across a URL like http://www.example.com.au/

So it occurred to me that this is not the best solution, unless I have a
definitive list of all exceptions to go off of.

Does anyone have any suggestions?

Any advice is much appreciated.

Thanks,
Brad

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



RE: [PHP] Parse domain from URL

2007-06-06 Thread Brad Fuller
Daniel Brown wrote:
 On 6/6/07, Brad Fuller [EMAIL PROTECTED] wrote:
 Hey guys,
 
 I'm faced with an interesting problem, and wondering if there's an
 easy solution. 
 
 I need to strip out a domain name from a URL, and ignore subdomains
 (like www)
 
 I can use parse_url to get the hostname. And my first thought was to
 take the last 2 segments of the hostname to get the domain.
  So if the
 URL is http://www.example.com/
 Then the domain is example.com.   If the URL is
 http://example.org/ then the domain is example.org. 
 
 This seemed to work perfectly until I come across a URL like
 http://www.example.co.uk/ My script thinks the domain is co.uk.
 
 So I added a bit of code to account for this, basically if the 2nd to
 last segment of the hostname is co then take the last 3 segments.
 
 Then I stumbled across a URL like http://www.example.com.au/
 
 So it occurred to me that this is not the best solution, unless I
 have a definitive list of all exceptions to go off of.
 
 Does anyone have any suggestions?
 
 Any advice is much appreciated.
 
 Thanks,
 Brad
 
 --
 PHP General Mailing List (http://www.php.net/) To unsubscribe,
 visit: http://www.php.net/unsub.php 
 
 
 
 Well, it's not very clean, but if you just need to remove
 the subdomain/CNAME from the domain
 
 ?
 $hostname = parse_url($_SERVER['SERVER_NAME']);
 $domsplit = explode('.',$hostname['path']);
 for($i=1;$icount($domsplit);$i++) {
 $i == (count($domsplit) - 1) ? $domain .= $domsplit[$i] :
 $domain .= $domsplit[$i]..; }
 echo $domain;
 
 
 There's probably a much better way to do it, but in the
 interest of a quick response, that's one way.
 
 --
 Daniel P. Brown
 [office] (570-) 587-7080 Ext. 272
 [mobile] (570-) 766-8107


Dan,

Yes, that's basically what my code already does.

The problem is that what if the url is http://yahoo.co.uk/; (note the lack
of a subdomain)

Your script thinks that the domain is co.uk.  Just like my existing code
does.

So we can't count on taking the last 2 segments.  And we can't count on
ignoring the first segment.  (The subdomain could be anything, not just www)

Thx,

Brad

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



RE: [PHP] RE: Bounty

2007-05-15 Thread Brad Sumrall
I was honestly surprised by the number of knuckle heads who would try there
luck!



-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 15, 2007 2:08 AM
To: Brad Sumrall
Cc: php-general@lists.php.net
Subject: Re: [PHP] RE: Bounty

Brad Sumrall wrote:
 The bounty still applies
 
  
 
 Need a sharp php programmer on the fly.
 
  
 
 No joke!

I think you've pretty much pissed off the whole list so good luck.

-- 
Postgresql  php tutorials
http://www.designmagick.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] Bounty, NOW!

2007-05-15 Thread Brad Sumrall
Yes, I do still need legit help. But obviously I needed to make a point to
all the script kiddies out there that you are playing with fire if you even
attempt to miss use an admin password or access a server that does not
belong to you.
As a prior USMC Network Admin and DoD network security specialist.
Back off Big brother is watching!

I come to the list as a legit person seeking intelligent minds.
Not games.

So yes, respond to me as a professional or an up and coming and let's talk
business!

Brad

-Original Message-
From: Tom Ray [Lists] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 15, 2007 3:32 AM
To: Brad Sumrall
Subject: Re: [PHP] Bounty, NOW!

If you still need serious help with this, get in touch with me. I can 
help you with this I believe.

Brad Sumrall wrote:
 My good friend dropped the ball!

 Here is the gig, and less than 48 to get it done.
 For those whom know phpbb and php, this should be a cake walk!
 Easy cash.

  http://www.123yachtdayworkers.com http://www.123yachtdayworkers.com

 ftp user = onetwou9

 ftp pass = garvitos

 accessing the mysql is through cpanel at  http://www.bluehosting.com
 http://www.bluehosting.com ? maybe?

 Using ftp password and domain name?

 Use my servers mysql if needed

  http://www.boatcrafts.net http://www.boatcrafts.net

 brads

 andreasd



 This guy is going to have a lot of stuff for us. We are slightly over
 budget, but he is very happy thus far.

 When I walk into this one, he had a basic page and going crazy trying to
 write a basic DB query.

 I hooked him up with phpbb and some how to get it don instruction and now
he
 needs this piece of customer code.



 Concept:

 Joe worker logs in and says I am available on yaddy yah days (calendar mod
 is kind of works?) along with his description etc.



 Joe Captain pays 10 buck to select 5 workers over the course of a month or
 has to pay more.

 He views (without last name, email, or phone number) Joe worker, selects
 days he is need based on available days on calendar.

 Email is sent to Joe Captain with all of worker contact info and Joe
 receives email notice as well.



 Record of transaction is keep in a DB table, a count =5 should be stored
in
 a table in case Joe Captain does not use his 5 picks up to 30 days.

 Hence Flowchart:

 Collect Calendar dates and user id variable for FORM data

 On SUBMIT, POST

 Db 1 for count Captain Email Worker email DB record



 Goal:

 If I provide a basic submit button which emails Joe Worker and Joe Captain
 with user profile info and a record in the database. i.e grab the variable
 from a selected profile and submit = 2 emails and count = 5 or error. We
 are golden!

 If you have any tricks with the calendar. People will be very happy.


   

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



RE: [PHP] RE: Bounty

2007-05-15 Thread Brad Sumrall
Yeah, knuckle heads spoiled the fun!


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 15, 2007 2:38 AM
To: Brad Sumrall
Cc: php-general@lists.php.net
Subject: Re: [PHP] RE: Bounty

One problem: the PASSWORD DOES NOT WORK!

On 5/14/07, Brad Sumrall [EMAIL PROTECTED] wrote:
 As a person who has come here in the recent past asking free lancer help
and
 received nothing but near-useless references even though I was asking
 specific php coding related questions. Now I com to the list offering
legit
 funding to my supposed php friends for their expertise and received
nothing
 but low end hacker repossesses.



 What would you think?



 I am simply trying to support the list, and all I get is hate.



 I cannot help it if I am properly guarded.



 Attack me, and I have proper defensives.



 Respond professionally and I bare rewards..



 Sincerely,





-- 
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] RE: Bounty FYI

2007-05-15 Thread Brad Sumrall
Food for thought!

Respect the freedom.

Respect the Internet!

We all benefit!

Never abuse!



RE: [PHP] RE: Bounty FYI

2007-05-15 Thread Brad Sumrall
No, I just think you are an ass!

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 15, 2007 3:02 AM
To: Brad Sumrall
Cc: php-general@lists.php.net
Subject: Re: [PHP] RE: Bounty FYI

Brad Sumrall wrote:
 Food for thought!
 
 Respect the freedom.
 
 Respect the Internet!
 
 We all benefit!
 
 Never abuse!

Err - can you stop flooding the list with this crap? While you might 
think it's funny, you're just going to piss everyone off even more.

-- 
Postgresql  php tutorials
http://www.designmagick.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] RE: Bounty FYI

2007-05-15 Thread Brad Sumrall
What ever script kiddy!

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 15, 2007 3:09 AM
To: Brad Sumrall; 'php-general@lists.php.net'
Subject: Re: [PHP] RE: Bounty FYI

Brad Sumrall wrote:
 You're an idiot!

Yeh - thanks for making my point.

Now everyone knows the sort of person they are dealing with.

 -Original Message-
 From: Chris [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, May 15, 2007 3:02 AM
 To: Brad Sumrall
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] RE: Bounty FYI
 
 Brad Sumrall wrote:
 Food for thought!

 Respect the freedom.

 Respect the Internet!

 We all benefit!

 Never abuse!
 
 Err - can you stop flooding the list with this crap? While you might 
 think it's funny, you're just going to piss everyone off even more.
 


-- 
Postgresql  php tutorials
http://www.designmagick.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] RE: Bounty FYI

2007-05-15 Thread Brad Sumrall
Silly rabbit,
Tricks are for kids!

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 15, 2007 3:19 AM
To: Brad Sumrall
Cc: php-general@lists.php.net
Subject: Re: [PHP] RE: Bounty FYI

Kinda says it all really.

Oh - one other point.

I don't think a supposed DoD network security specialist would ever 
*really* post server login details to a mailing list - do you?

Hmm.

Anyway.

Brad Sumrall wrote:
 What ever script kiddy!
 
 -Original Message-
 From: Chris [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, May 15, 2007 3:09 AM
 To: Brad Sumrall; 'php-general@lists.php.net'
 Subject: Re: [PHP] RE: Bounty FYI
 
 Brad Sumrall wrote:
 You're an idiot!
 
 Yeh - thanks for making my point.
 
 Now everyone knows the sort of person they are dealing with.
 
 -Original Message-
 From: Chris [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, May 15, 2007 3:02 AM
 To: Brad Sumrall
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] RE: Bounty FYI

 Brad Sumrall wrote:
 Food for thought!

 Respect the freedom.

 Respect the Internet!

 We all benefit!

 Never abuse!
 Err - can you stop flooding the list with this crap? While you might 
 think it's funny, you're just going to piss everyone off even more.

 
 


-- 
Postgresql  php tutorials
http://www.designmagick.com/

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



RE: [PHP] RE: Bounty FYI

2007-05-15 Thread Brad Sumrall
Just having fun with the kids!

-Original Message-
From: Christian Haensel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 15, 2007 3:18 AM
To: php-general@lists.php.net
Subject: Re: [PHP] RE: Bounty FYI

ROFL... you really made my day... it's about 9am, been working for 2 hours 
now, and the day is great already!

Worked for the DoD and stuff like that, and still doesn't know how to 
behave. You remind me of a 14 years old guy I knew from Bahrain... always 
trying to mess with the big boys.

Go play outside :o) Mr DoD *ROFL*

- Original Message - 
From: Brad Sumrall [EMAIL PROTECTED]
To: 'Christian Haensel' [EMAIL PROTECTED]
Sent: Tuesday, May 15, 2007 9:06 AM
Subject: RE: [PHP] RE: Bounty FYI


 When did I request money?

 Go hit your Webster's schmuck!

 -Original Message-
 From: Christian Haensel [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, May 15, 2007 3:01 AM
 To: Brad Sumrall; php-general@lists.php.net
 Subject: Re: [PHP] RE: Bounty FYI

 You forgot one:

 Don't spam!

 Regards,

 Chris

 - Original Message - 
 From: Brad Sumrall [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Sent: Tuesday, May 15, 2007 8:55 AM
 Subject: [PHP] RE: Bounty FYI


 Food for thought!

 Respect the freedom.

 Respect the Internet!

 We all benefit!

 Never abuse!



 

-- 
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] RE: Bounty FYI

2007-05-15 Thread Brad Sumrall
Oh, come on, come to daddy!

What cha got!

Late night in Fort Lauderdale!  Hehehehehehehe

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 15, 2007 3:19 AM
To: Brad Sumrall
Cc: php-general@lists.php.net
Subject: Re: [PHP] RE: Bounty FYI

Kinda says it all really.

Oh - one other point.

I don't think a supposed DoD network security specialist would ever 
*really* post server login details to a mailing list - do you?

Hmm.

Anyway.

Brad Sumrall wrote:
 What ever script kiddy!
 
 -Original Message-
 From: Chris [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, May 15, 2007 3:09 AM
 To: Brad Sumrall; 'php-general@lists.php.net'
 Subject: Re: [PHP] RE: Bounty FYI
 
 Brad Sumrall wrote:
 You're an idiot!
 
 Yeh - thanks for making my point.
 
 Now everyone knows the sort of person they are dealing with.
 
 -Original Message-
 From: Chris [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, May 15, 2007 3:02 AM
 To: Brad Sumrall
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] RE: Bounty FYI

 Brad Sumrall wrote:
 Food for thought!

 Respect the freedom.

 Respect the Internet!

 We all benefit!

 Never abuse!
 Err - can you stop flooding the list with this crap? While you might 
 think it's funny, you're just going to piss everyone off even more.

 
 


-- 
Postgresql  php tutorials
http://www.designmagick.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] RE: Bounty FYI

2007-05-15 Thread Brad Sumrall
Your are layer 7
I am layer 2-3

You are WAY outside of your expertise with me my friend.

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 15, 2007 3:19 AM
To: Brad Sumrall
Cc: php-general@lists.php.net
Subject: Re: [PHP] RE: Bounty FYI

Kinda says it all really.

Oh - one other point.

I don't think a supposed DoD network security specialist would ever 
*really* post server login details to a mailing list - do you?

Hmm.

Anyway.

Brad Sumrall wrote:
 What ever script kiddy!
 
 -Original Message-
 From: Chris [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, May 15, 2007 3:09 AM
 To: Brad Sumrall; 'php-general@lists.php.net'
 Subject: Re: [PHP] RE: Bounty FYI
 
 Brad Sumrall wrote:
 You're an idiot!
 
 Yeh - thanks for making my point.
 
 Now everyone knows the sort of person they are dealing with.
 
 -Original Message-
 From: Chris [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, May 15, 2007 3:02 AM
 To: Brad Sumrall
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] RE: Bounty FYI

 Brad Sumrall wrote:
 Food for thought!

 Respect the freedom.

 Respect the Internet!

 We all benefit!

 Never abuse!
 Err - can you stop flooding the list with this crap? While you might 
 think it's funny, you're just going to piss everyone off even more.

 
 


-- 
Postgresql  php tutorials
http://www.designmagick.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] RE: Bounty FYI

2007-05-15 Thread Brad Sumrall
Cheers!

-Original Message-
From: David Robley [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 15, 2007 4:02 AM
To: php-general@lists.php.net
Subject: Re: [PHP] RE: Bounty FYI

Christian Haensel wrote:

Stuff

 +---+ .:\:\:/:/:.
 |   PLEASE DO NOT   |:.:\:\:/:/:.:   
 |  FEED THE TROLLS  |   :=.' -   - '.=:  
 |   |   '=(\ 9   9 /)='  
 |   Thank you,  |  (  (_)  ) 
 |   Management  |  /`-vvv-'\ 
 +---+ / \
 |  |@@@  / /|,|\ \   
 |  |@@@ /_//  /^\  \\_\  
   @x@@x@|  | |/ WW(  (   )  )WW  
   \/|  |\|   __\,,\ /,,/__   
\||/ |  | |  (__Y__)  
/\/\/\/\/\/\/\/\//\/\\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
==



Cheers
-- 
David Robley

An elephant: A mouse built to government specifications.
Today is Setting Orange, the 62nd day of Discord in the YOLD 3173. 

-- 
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] escapeshellarg

2007-05-14 Thread Brad Fuller
Mohamed CHAARI wrote:
 Hi all,
 
 I have to execute an external command, with an argument
 (filename or directory name) given by user input (via a
 form), ie something like this:
 
 exec('ls $_POST[...]')
 
 what do you think about using escapeshellarg() function in
 this case ?
 can I rely on it to have a secure solution ? or is there a risk ? ...
 
 
 thank you.

In addition to using escapeshellarg(), I would first determine if the input
file or directory exists before executing the command.  This adds another
layer of protection.

?php

// Example code

if(file_exists($_POST['file_or_dir_name'])) {
$command = ls .escapeshellarg($_POST['file_or_dir_name']);
exec($command);
} else {
echo File/Directory does not exist!!;
}
?

-B

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



RE: [PHP] printing out this nested array

2007-05-14 Thread Brad Fuller
Don Don wrote:
 I am having a bit of a confusion printing the values of an
 array i have. When i print_r this array it contains the following:
 
 Array ( [ValueA] = ValueA [ValueB] = valueB [TestValue] =
 TestValue [Errors] = Array ( [0] = Array ( [ErrorId] =
 AD27JH [ErrorMsg] = OK ) ) )
   I can get the values of ValueA, ValueB and TestValue but I
 am a bit confused at getting the values of ErrorId and ErrorMsg.
 
   e.g. echo $arrayName['ValueA'];  // will display the value
 contained there 
 
 am thinking echo $arrayName['Errors']['ErrorId']; // should
 display the value but it does not
   Anyone wants to shed more light ?
 
 Cheers

echo $arrayName['Errors'][0]['ErrorId'];

-B

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



[PHP] Bounty, NOW!

2007-05-14 Thread Brad Sumrall
My good friend dropped the ball!

Here is the gig, and less than 48 to get it done.
For those whom know phpbb and php, this should be a cake walk!
Easy cash.

 http://www.123yachtdayworkers.com http://www.123yachtdayworkers.com

ftp user = onetwou9

ftp pass = garvitos

accessing the mysql is through cpanel at  http://www.bluehosting.com
http://www.bluehosting.com ? maybe?

Using ftp password and domain name?

Use my servers mysql if needed

 http://www.boatcrafts.net http://www.boatcrafts.net

brads

andreasd



This guy is going to have a lot of stuff for us. We are slightly over
budget, but he is very happy thus far.

When I walk into this one, he had a basic page and going crazy trying to
write a basic DB query.

I hooked him up with phpbb and some how to get it don instruction and now he
needs this piece of customer code.



Concept:

Joe worker logs in and says I am available on yaddy yah days (calendar mod
is kind of works?) along with his description etc.



Joe Captain pays 10 buck to select 5 workers over the course of a month or
has to pay more.

He views (without last name, email, or phone number) Joe worker, selects
days he is need based on available days on calendar.

Email is sent to Joe Captain with all of worker contact info and Joe
receives email notice as well.



Record of transaction is keep in a DB table, a count =5 should be stored in
a table in case Joe Captain does not use his 5 picks up to 30 days.

Hence Flowchart:

Collect Calendar dates and user id variable for FORM data

On SUBMIT, POST

Db 1 for count Captain Email Worker email DB record



Goal:

If I provide a basic submit button which emails Joe Worker and Joe Captain
with user profile info and a record in the database. i.e grab the variable
from a selected profile and submit = 2 emails and count = 5 or error. We
are golden!

If you have any tricks with the calendar. People will be very happy.



[PHP] RE: Bounty

2007-05-14 Thread Brad Sumrall
Knuckle heads don't even know they are going though a proxy!!!

 

Hehehehe



[PHP] RE: Bounty

2007-05-14 Thread Brad Sumrall
Does anyone want to answer the ad, or am I just going to be chasing knuckle
heads?

 

Brad



RE: [PHP] Bounty, NOW!

2007-05-14 Thread Brad Sumrall
I got 5 IP breaking Federal Regulations.
Hehehehe
Do you think you are not being logged?

Hehehehehe

This is funny!

-Original Message-
From: Andrew Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 15, 2007 1:38 AM
To: 'Robert Cummings'; 'Brad Sumrall'
Cc: php-general@lists.php.net
Subject: RE: [PHP] Bounty, NOW!

Lol, Either he has

1) Changed the pass
2) Got hacked
3) Supplied with wrong pass.

Very funny thread either way.

Regards,
Andrew

-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 15, 2007 3:27 PM
To: Brad Sumrall
Cc: php-general@lists.php.net
Subject: Re: [PHP] Bounty, NOW!

Maybe you know what you're doing, more than likely you don't. Posting logins
and passwords to your server on a public mailing list is usually tantamount
to idiocy.

Cheers,
Rob.


On Tue, 2007-05-15 at 01:20 -0400, Brad Sumrall wrote:
 My good friend dropped the ball!
 
 Here is the gig, and less than 48 to get it done.
 For those whom know phpbb and php, this should be a cake walk!
 Easy cash.

--
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  | a 
| powerful, scalable system for accessing system services  | such as 
| forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

--
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] RE: Bounty

2007-05-14 Thread Brad Sumrall
Oh, come on.

You guys quit trying

 

Wuzzies!



[PHP] RE: Bounty

2007-05-14 Thread Brad Sumrall
The bounty still applies

 

Need a sharp php programmer on the fly.

 

No joke!



RE: [PHP] PhP and Java login trouble (can someone help a brother out whom is truely trying to understand?)

2007-05-11 Thread Brad Sumrall
I have these to independently working scripts. 1 is php, the other is
javascript. For obvious reason, to separate logins are not appropriate.
It has been recommended to make a separate function, not sure how to do
this
Common sense says, carry the variable from php to javascripting. I am
clueless on where to look on this common sense solution.

I am 2.5 weeks into this madness. I know when I find the solution, it will
be the one that was biting me on the nose.

I want to learn and understand this, but desperately need help from friends!

I will post the 2 complete code pages below..

Input, suggestion or solutions would truly be appreciated.

The first will be the original code that is javascripting friendly.
The second will be my own php working code.

Number one works fine for loging into a FCKEditor application, but is
failing with phpbb.

Number two works perfectly with phpbb applications and outside php pages
requiring phpbb related session controls, but fails sessions with the
javascripting based FCKEditor.

Sincerely,

Brad

#1  Working php/phpbb code:

?php
if(!isset($_SESSION[userid]))
{
?
form action=/phpbb/login.php method=post target=_top
table width=200 cellpadding=4 cellspacing=1 border=0
class=forumline align=center
tr
th background=images/login_top2.jpg height=30
class=thHead nowrap=nowrap/th
/tr
tr
td class=row1table border=0 cellpadding=3
cellspacing=1 width=100%
tr
td width=11% align=rightdiv
align=leftspan class=genUsername:/span/div/td
/tr
tr
td align=rightinput type=text class=post
name=username size=25 maxlength=40 value= //td
/tr
tr
td align=rightdiv align=leftspan
class=genPassword/span/div/td
/tr
tr
td align=rightspan class=gen
input type=password class=post name=password size=25 maxlength=32
/
:/span/td
/tr
tr align=center
td colspan=2span class=genLog me on
automatically: 
input type=checkbox name=autologin //span/td
/tr
tr align=center
td colspan=2input type=hidden name=redirect
value= /input type=submit name=login class=mainoption value=Log
in //td
/tr
tr align=center
td colspan=2span class=gensmalla
href=forgot_password.php class=gensmallI forgot my
password/a/span/td
/tr
/table
/td
/tr
?php
}else{
?
tr
  td width=207 height=32 background=images/login_top2.jpg
class=headerlogout align=center
table width=100%
tr
td width=30 height=27/td
td align=lefta href=javascript:logout()
class=link1Log out/a/td
/tr
/table
/td
/tr
tr
td align=center class=logincenterbg
table width=88% border=0 cellspacing=0 cellpadding=0
tr
td height=10 align=left class=bluetext/td
/tr
tr
td align=left class=link2Welcome : ?php echo
$_SESSION[userid] ?/td
/tr
tr
td height=22 align=left class=bluetext/td
/tr
 tr
td height=20 align=lefta class=link1
href=editaccount.phpManage Account/a/td
/tr
tr
td height=20 align=lefta class=link1
href=editprofile.phpManage Profile/a/td
/tr
/table
/td
/tr
tr
td align=left valign=topimg
src=images/login_bottom.jpg width=200 height=8 alt= //td
/tr   
/table
/form
?php
}
? 
/table/td
/tr
tr
td height=5/td
/tr
tr
td align=center valign=toptable width=211
border=0 cellspacing=0 cellpadding=0
tr
tdimg src=images/contest_top.jpg width=211 height=36
alt= //td
/tr
tr
tda href=contest.phpimg src=images/contest_middle.jpg
width=211 height=169 border=0 alt= //a/td
/tr
/table/td
/tr
tr
td height=5/td
/tr
  tr
td align=center valign=toptable width=211
border=0 cellspacing=0 cellpadding=0
  tr
tdimg src=images/review_head.jpg width=211 height=36
alt= //td
  /tr
  tr
td height=89 align=center class=reviewbgtable
width=85% border=0

RE: [PHP] sorting via PHP or MySQL?

2007-05-10 Thread Brad Fuller
James Tu wrote:
 (I've cross posted at the MySQL list as well)
 
 Here's an example with a simple table:
 
 describe collection;
 
 +--+-+--+-
 +-++
 Field| Type| Null | Key |
 Default | Extra  |
 +--+-+--+-
 +-++
 id   | bigint(20) unsigned |  | PRI |
 NULL| auto_increment |
 receiver_id  | bigint(20) unsigned |  | MUL |
 0   ||
 set_type_id  | int(2) unsigned |  | |
 0   ||
 card_id  | int(3) unsigned |  | |
 0   ||
 completed_set_id | bigint(20) unsigned |  | |
 0   ||
 created_on_gmt   | datetime|  | | -00-00
 00:00:00 ||
 +--+-+--+-
 +-++
 
 
 I want to end up with two PHP arrays.  One for set_type_id = 22 and
 one for set_type_id=21. 
 
 (1) one query method:
 SELECT * from collection WHERE set_type_id=22 OR set_type_id=21;
 ...do query... while( $row = $this-db-fetch_array_row() ){
   if ($row['set_type_id'] == 21){
   $array_a[] = $row;
   } else {
   $array_b[] = $row;
   }
 }
 
 
 (2) two query method:
 SELECT * from collection WHERE set_type_id=22;
 ...do query...
 while( $row = $this-db-fetch_array_row() ){
   $array_a[] = $row;
 }
 
 SELECT * from collection WHERE set_type_id=21;
 ...do query...
 while( $row = $this-db-fetch_array_row() ){
   $array_b[] = $row;
 }
 
 
 Which method is better?  Take a hit using MySQL or take a hit using
 PHP? 
 
 -James


I really don't think you'd notice any difference, unless your table contains
a large amount of data and is not properly indexed.  And if that were the
case, you'd notice a hit on just one query anyway.

I'd stick with the 2 query model, but instead of creating arrays, just loop
through the query results to output your data, no sense looping to make an
array when you're just going to end up looping through the array to output;
that seems redundant to me :P

Just my $.02

-B

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



RE: [PHP] PhP and Java login trouble

2007-05-09 Thread Brad Sumrall
I have been hunting all around that website you referred me too looking for
javascripting information and can find nothing. I know a little bit of php
but little to nothing about javascripting.

I have been beating my head against the wall on this one for weeks now, I am
so close!

Brad

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 10:58 PM
To: Brad Sumrall
Cc: 'php-general@lists.php.net'
Subject: Re: [PHP] PhP and Java login trouble

Firstly always CC the list - others can provide help and suggestions too.

Brad Sumrall wrote:
 Any chance you can tell me what I am doing wrong?
 
 Brad
 
 
 ?php
   if(!isset($_SESSION[userid]))
   {
 ?
 form action=/phpbb/login.php method=post target=_top 
 onsubmit=return BBValidateLogin();

You don't have a javascript function called 'BBValidateLogin'.


You have one called validateLogin which references completely different 
form fields.

-- 
Postgresql  php tutorials
http://www.designmagick.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] sqlite AND OR query ?

2007-05-09 Thread Brad Fuller
[EMAIL PROTECTED] wrote:
 Hello,
 
 I want to select two dates one being todays date and the
 other being -00-00 which just a date in the database when
 no proper date has been entered.
 
 Ive tried this but it does not work...
 
 $today = date('Y-m-d');
 $result = sqlite_query($db, SELECT * FROM domains WHERE date =
 '-00-00' AND '$today');
 
 I just get items with '-00-00' returned or if I reverse it ie...
 
 WHERE date = '$today'AND '-00-00');
 
 I just get  $today items returned.
 
 I also tried using OR instead of AND ie...
 
 WHERE date = '-00-00' OR '$today');
 
 But that seems to be returning all items in the db.
 
 
 Thanks.


SELECT * FROM domains WHERE (date = '-00-00' OR date = '$today')

-B

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



RE: [PHP] Disable Soap Client and Soap Server in php5

2007-05-09 Thread Brad Fuller
Don Don wrote:
 How can i disable soap client and server for php5, reason is
 that i've got NuSOAP (which i must use) and its classes clash
 with that of PHP5.  My php configuration (when using
 phpinfo() displays soap client and server enabled for php5.
  I need to disable if ..amd looking into the configs..to see how
 
 cheers

I also use NuSOAP with PHP5, all I did is edit nusoap.php and rename the
class soapclient to soap_client.

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



  1   2   3   4   5   6   7   8   >