OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 11 Jun 2006 14:02:40 -0000 Issue 4179

php-general-digest-helplists.php.net
Date: Sun Jun 11 2006 - 09:02:40 CDT


php-general Digest 11 Jun 2006 14:02:40 -0000 Issue 4179

Topics (messages 237746 through 237758):

Re: sending mail via php and unix box-clients thinks it's spam
        237746 by: blackwater dev
        237753 by: David Robley
        237755 by: Dimiter Ivanov

Re: How to re-order an array
        237747 by: jekillen
        237749 by: Larry Garfield
        237751 by: Paul Novitski

Re: Tables vs. databases
        237748 by: Anthony Ettinger

Re: Running Scripts from the Command Line in Linux
        237750 by: OOzy Pal

$B#1#0?M$r?)$($?!"$*$$$7$#%5%$%H!*!*!*(B
        237752 by:

$B%a%C%;!<%8$G$9(B
        237754 by: Iq

remove keys from array
        237756 by: Ahmed Abdel-Aliem

transform RDF to HTML via XSL and PHP
        237757 by: Mario Pavlov

Simultaneous post/get?
        237758 by: tedd

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


Here is what I use as the header:

    $header="From:infomysite.com\r\nContent-Type: text/html";

Thanks!

On 5/31/06, Richard Lynch <ceol-i-e.com> wrote:
>
> On Tue, May 30, 2006 12:45 pm, blackwater dev wrote:
> > I have a site running on a linux box. If I use my mail server via an
> > email
> > client, the email works fine but if I send email through the mail
> > function,
> > clients mark it as spam. I see the line in php.ini for SMTP but that
> > says
> > windows only. How do I tell php to use my mail server?
>
> While it is possible that the IP has been logged as a spammer, it's
> more likely that the email headers are tripping you up...
>
> Compare the two sets of email headers and see what you get, and also
> look at the information provided by the spam filters about WHY they
> think it's spam.
>
> --
> Like Music?
> http://l-i-e.com/artists.htm
>
>
>

attached mail follows:


blackwater dev wrote:

> Here is what I use as the header:
>
> $header="From:infomysite.com\r\nContent-Type: text/html";

I think you need a space in there:

  $header="From: infomysite.com\r\nContent-Type: text/html";

> Thanks!
>
> On 5/31/06, Richard Lynch <ceol-i-e.com> wrote:
>>
>> On Tue, May 30, 2006 12:45 pm, blackwater dev wrote:
>> > I have a site running on a linux box. If I use my mail server via an
>> > email
>> > client, the email works fine but if I send email through the mail
>> > function,
>> > clients mark it as spam. I see the line in php.ini for SMTP but that
>> > says
>> > windows only. How do I tell php to use my mail server?
>>
>> While it is possible that the IP has been logged as a spammer, it's
>> more likely that the email headers are tripping you up...
>>
>> Compare the two sets of email headers and see what you get, and also
>> look at the information provided by the spam filters about WHY they
>> think it's spam.
>>
>> --
>> Like Music?
>> http://l-i-e.com/artists.htm
>>
>>
>>

Cheers
--
David Robley

(C) 1992 Wild Bill's Machine Gun Shop and House of Wax.
Today is Boomtime, the 16th day of Confusion in the YOLD 3172.

attached mail follows:


On 6/11/06, David Robley <robleydozemail.com.au> wrote:
> blackwater dev wrote:
>
> > Here is what I use as the header:
> >
> > $header="From:infomysite.com\r\nContent-Type: text/html";
>
As Richard Lynch, suggested you need to check the headers from both the emails.
Send exatcly the same mails to yourself, using both methods, and then
using your mail client, check the FULL headers, and compare them.

attached mail follows:


On Jun 10, 2006, at 5:32 PM, Rafael wrote:

> Since you asked for some theory... theorically, you won't rely on
> javascript to prepare/validate/whatever some data to the server,
> that's what server-side scripts are for.
> Note: you may use JS to make things quicker if possible, or to
> pre-digest the data, but you shall not rely entirely on JS.
You misunderstand my question. I know the limitations of javascript.
The server won't respond to events registered in the browser. I write
tons of forms that are all processed
by the client with javascript. I have written ferocious regex filters
that hack apart form submissions before they even leave the client. I
have set it up so if the client doesn't
have javascript enabled, the form won't submit if it is going to the
server. That is why as much as possible I shift form processing to the
client as much as possible, for
security and to off load work to the client. I use php to dynamically
write js files when necessary, anticipating what data will be
requested.
This is a problem that is more a matter of programming theory. I have
posted to javascript forums and lists and have never got a response.
I will be applying this to dhtml which the server won't and can't do
but may help things along with Ajax.
Just a simple suggestion about how to reorder arrays if you have a few
words and suggestions. I'm not looking for free training.
I have been learning and using php and javascript for some five years
and have developed my own approach to testing and debugging
and such. So I am not really a newby. I have made the dumb mistakes of
asking for help from forums and lists when it was just a dumb
syntax error that I couldn't expect anyone but my self to find, which i
have in 99.9% of the cases. Some times it is nice to get some
quick help from a list and I will try to return the favor when ever
possible to the next person looking for help that I have some answers
for.
>
> You say that not all browsers support the javascript functions you
> pretend
'scuse me, did i "pretend" to use something??

> to use, and that not all them support Ajax either. That sounds just
> like saying that not all browser will have javascript enabled --that's
> why you shouldn't rely on javascript
>
> Although, this isn't a javascript list, why don't you send whatever
> you were trying to solve this issue? the code that uses JS functions
> not supported for all the browsers that will potentially run the
> script (as well as what these browsers are) Most likely someone will
> be able to help you this way.
Thanks for the attitude.
jk
>
> jekillen wrote:
>> Hello;
>> i'm scratching my head with a difficulty.
>> The situation is this.
>> A script begins with one indexed array (not associative) and one
>> other indexed array
>> with the same values in a different order, the final order.
>> I want to create an interim array and progressively re order the
>> array until it matches
>> slot for slot one of the original arrays. At this point the script is
>> considered completed.
>> One important factor is that I'm looking to write this in javascript
>> and the interim
>> array will be altered by the actions of a web page user.
>> Why am I asking the php list? Because I have a better chance of
>> getting an answer
>> here. I'm not looking for help with javascript, specifically, just
>> how one would go about
>> this task. Answer with php code and some theory if you wish and I
>> will try to translate
>> it into javascript.
>> Some javascript functions I might use aren't supported in all the
>> browsers that will
>> potentially run the script.
>> I might resort to using Ajax and let php keep track for me. But, then
>> again not all
>> browsers will do the Ajax either (as I understand it).
> --
> Atentamente / Sincerely,
> J. Rafael Salazar Magaa
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


On Saturday 10 June 2006 21:08, jekillen wrote:

> You misunderstand my question. I know the limitations of javascript.
> The server won't respond to events registered in the browser. I write
> tons of forms that are all processed
> by the client with javascript. I have written ferocious regex filters
> that hack apart form submissions before they even leave the client. I
> have set it up so if the client doesn't
> have javascript enabled, the form won't submit if it is going to the
> server. That is why as much as possible I shift form processing to the
> client as much as possible, for
> security and to off load work to the client. I use php to dynamically
> write js files when necessary, anticipating what data will be
> requested.

"...shift form processing to the client as much as possible, for security..."

Client-side security isn't. Your server has no way of telling if the data
it's receiving is from a properly setup client that did the correct JS
filtering, or if it's from someone writing as simple bot/script/program
that's just sending GET and POST requests to you. Your PHP should never
trust the client to be benign.

--
Larry Garfield AIM: LOLG42
larrygarfieldtech.com ICQ: 6817012

"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson

attached mail follows:


At 06:44 PM 6/9/2006, jekillen wrote:
...
>A script begins with one indexed array (not associative) and one
>other indexed array
>with the same values in a different order, the final order.
>I want to create an interim array and progressively re order the
>array until it matches
>slot for slot one of the original arrays. At this point the script
>is considered completed.
>One important factor is that I'm looking to write this in javascript
>and the interim
>array will be altered by the actions of a web page user.

You've asked your question in such abstract terms it's hard to know
what logic to suggest. Can you provide a concrete mini-example of
the kind of array transformation you want to occur?

Paul

attached mail follows:


On 6/9/06, Antonio Bassinger <antonio.bassingergmail.com> wrote:
> Hi gang,
>
> Situation:
>
> I've a HTTP server. I intend to run a file upload service. There could be up
> to 10000 subscribers. Each saving files up to 10 MB.
>
> I made a proof-of-concept service using PHP & MySQL, where there is a single
> database, but many tables - a unique table for each subscriber. But I
> realize that I may land in trouble with such a huge database. Would it be
> better to have a separate database for each subscriber?
>
> Which approach is better, many tables in 1 database, or many databases with
> 1 or max 2 tables?
>
> Kindly suggest with pros and cons of each.

you might want to consider storing the files outside of the database
as well, and just a pointer to it's path in the table.

with respect to table vs. databases per user, neither.

--
Anthony Ettinger
Signature: http://chovy.dyndns.org/hcard.html

attached mail follows:


On 6/8/06, Venky <venkymaduraigooglemail.com> wrote:
> Even better... if you want to use GET/POST, and access PHP scripts thru the
> web server, it is recommended to use wget ....very useful tool, supports
> http auth, etc.
>
> Regards
>
>
> Venky
>
>
>
> On 08/06/06, Brad Bonkoski <bbonkoskimediaguide.com> wrote:
> >
> $ php script.php
>
>
> OOzy Pal wrote:
>
> > How can I run a .php script from the command in Linux?
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

Thanks you all but everything up did not work for me until I install
php-cli. :). I am running Kubuntu-Dapper.

Everything is OK.

--
OOzy
Kubuntu-Dapper

attached mail follows:


$B%f!<%6!<BN83?M5$(BNO.1$B%5%$%H!*=w-2q0w$,F|K\:GBg5i$N054,%5%$%H$G$9!#(B
$BNx?M!"ITNQ!"%;%U%l!"L\E*$K1h$C$FJg=8$,2DG=!#Ls(B60$B!sDx$N=w$N;R$,<L??$r7G:\$7$F$$$k!#(B
$B$3$l$$17G:\$,B?$$$N$O!"=w-2q0w$b=P2q$&L\E*$,G0F,$K$"$j!"K\%5%$%H$N2q0w798~$,!"4{$K!V2q$&$3$HA0Ds!W$G$"$k>ZL$H(B
$B8$C$F$h$$!#Ls(B40$B!s$N=w$N;R$,2D0&$$$H;W$($k;R$G$9!#(B
$B$*;n$7$"$l!*!*!*!*(B
 http://vqlh.com/?my08








$B%a!<%k$$$i$J$$?M$O$3$A$i$X(B
s_for_sweetbabyyahoo.co.uk

attached mail follows:


$B$O$8$a$^$7$F!*(B
$BL>A0$O%"%5%_$H$$$$$^$9!#(B22$B$5$$$G0l1~%b%G%k$r$d$C$F$^$9!#(B
$B$$$m$$$m$JM'C#M'C#M_$7$$$N$G(B
$B$h$+$C$?$i%a!<%k$/$$5$$!#!!!!!!BT$C$F$^$9!!(B

$B!!!!(B

$B-b(B281522
http://vqlh.com/?2017

















$B<u?.5qH](B
p_point_bananayahoo.co.uk

attached mail follows:


hi all
when i have array in the form of :
Array ( [0] => 2 [ID] => 2 [1] => asdasd [CategoryName] => asdasd ) )
how can i make it in the form of :
Array ( [ID] => 2 [CategoryName] => asdasd ) )

can anyone help me with that plz ?

--
Ahmed Abdel-Aliem
Web Developer
www.SafariStudio.net
+20101108551
registered Linux user number 382789

attached mail follows:


Hello :)
I wish to add the FreeBSD news in my site
but I can't transform the RDF document:
http://www.freebsd.org/news/news.rdf
I have a little knowledge in XML XSL but it seems that isn't enough :)
here is my XSL script:

=======================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/>

<xsl:template match="/">
 <html>
  <body>
    <table border="1">
      <xsl:for-each select="//rdf:RDF/item">
      <tr>
        <td><xsl:value-of select="title"/></td>
        <td><xsl:value-of select="link"/></td>
      </tr>
      </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>
/======================================================================

why doesn't this work ?
it outputs this:

=======================================================================
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><table border="1"></table></body></html>
/======================================================================

I believe that my mistake is in the '<xsl:for-each select="//rdf:RDF/item">' tag
I've tried also '//rdf:item', '/rdf:item', 'rdf:item', '/rdf:RDF/item', 'rdf:RDF/item' but with the same result
how can I catch this ?
can anyone help me please ?
thank you :)

-----------------------------------------------------------------
http://www.sportni.bg/worldcup/ - 2006 - !

attached mail follows:


Hi gang:

What I am trying to do is after the user has selected an image to upload, I want to display a gif while a file is being uploaded. (The gif can be seen at: http://xn--ovg.com/a4.php )

I am trying to use ajax to accomplish this.

The following statement works great and does what I want:

<input type="submit" value="Submit" onClick="javascript:sndReq()" >

However, when I place the statement within a form, like thus --

<form method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="30000">
<input type="hidden" name="stage" value="1">
<input type="submit" value="Submit" onClick="javascript:sndReq()" >
</form>

-- the statement appears to no longer work.

The ajax script is using a 'get' and this form is using 'post' -- is this something that can't be done (.e., simultaneous post/get) or am I doing it wrong, or what's happening here?

Any ideas, suggestions, explanations, or comments welcomed?

Thanks in advance for your time.

tedd

--
------------------------------------------------------------------------------------
http://sperling.com http://ancientstones.com http://earthstones.com