Re: [PHP] SMS questions
On Thu, July 12, 2007 7:07 pm, Brian Dunning wrote: Here's another thing that would be nice: A web service to look up the carrier for a cell number. That way you could simply send an email to [EMAIL PROTECTED], though this would still be only a partial solution. This is a lot harder now that numbers are transportable between carriers. If you have the service from the SMS vendors, you can lookup the carrier for any number. If there was a web service for it, you'd have a zillion more spammers using those gateways to send text messages to random cell numbers. Oh joy. I was not able to find any service provider that makes the SMS messages appear to come from the sender's cell phone, so they could be replied to normally. So you'll have to play postman and route things through your number. Doesn't seem that onerous to me... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SMS questions
On Thu, July 12, 2007 6:39 pm, Brian Dunning wrote: Hi all - I've been looking at a number of the commercial service providers for bulk SMS messaging, most of whom have PHP APIs. But since they are selling something they don't answer my question Is there any (legal, legitimate) way to send an SMS message that can be replied to the desired SMS cell number? Like, if I use PHP to send an SMS to Bob, can I make it appear to come from Jim's cell phone so that Bob can reply directly to Jim normally? The services all require Jim to log into their web site to read any replies. Almost for sure no. The SMS carriers are taking their lessons from email spam and pretty much won't let you do anything even remotely like that hinky. Plus, their only customers are mostly, umm, errr, ring tones and fortune-tellers, so they have more than enough problems already with disputed billing from their clients' customers. Hmmm. I'm probably conflating SMS short code provisioning with more general short code services, as I only worked on a short code application... But I'm betting you can't forge the caller phone number even in regular messaging. Just too much room for abuse there. Good Luck! -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] text field truncation with sql server
What is the 3981st character? Does your database driver, whatever it is, which you've told us is not PDO, have any kind of limit in the buffer size of query data back/forth? What driver ARE you using? I see mssql in the code, so assume that's it, right?... Does it happen on every record at 3980? If you don't know, add more records with enough length to find out. PS Using all those echo statements probably a pretty bad habit to get into, and you probably should be using htmlentities() on each element, before you do the nl2br... If the 3981st character happens to be a '' that would explain why you aren't seeing our data... Use View Source in your browser if you don't understand the preceding sentence. :-) On Thu, July 12, 2007 11:37 pm, Bruce Cowin wrote: I have a simple page that displays a record from the sql server database. One of the fields is a text field and keeps getting truncated at 3980 characters. I searched and saw someone had reported this as a PDO bug so I'm not using PDO anymore, but I'm still getting the truncation. Anyone know about this or have a work around? Here is the code. It's the body field that is a text field. I've checked the field in the database and it definitely has more data than is displayed. $cn = mssql_connect($myserver, $myuser, $mypwd); mssql_select_db($mydb, $cn); $result = mssql_query(select * from emails where id = $emailid, $cn); $row = mssql_fetch_array($result, MSSQL_ASSOC); echo ul; echo libId:/b . $row['id'] . /li; echo libFrom:/b . $row['mailfrom'] . /li; echo libTo:/b . $row['mailto'] . /li; echo libCc:/b . $row['mailcc'] . /li; echo libSubject:/b . $row['subject'] . /li; echo libDate:/b . $row['sentdate'] . /li; echo libBody:/bbr . nl2br($row['body']) . /li; echo /ul; Thanks for any help. Regards, Bruce -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP short tags: Questions
On Thu, July 12, 2007 6:42 pm, Micky Hulse wrote: I am trying to describe why php short tags failed to work on a server... here is my simplified explanation: it had to do with the server settings... The short_open_tag directive in php.ini was set to 0. Do you think that is an ok way to describe the problem to a technically literate non php coder? How technically literate are we talking here?... :-) (It's fine, just kidding.) Additionally, is there a good reference on the net that explains the differences between short open tags and normal open tags? http://php.net/ Main negative things I have read about short open tags: 1. Not as portable. 2. Security risk/less secure. 3. Will conflict with XML tags. 4. Other? #2 sounds awfully bogus to me... 1 and 3 sure ought to cover it though. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SMS questions
It's annoying as crap to work with them. But if they were not so vigilant and picuyane, you know what we'd have? A zillion spam phone messages ringing your cell day and night from all kinds of idiots. Do you really want that? I sure don't. Give them at least some credit for trying to be responsible, even if it does stifle lot of potentially useful applications. I'd give a lot of money to be able to teleport back in time and yell at the email designer folks to tell them just how horrible a mess they were making... :-) On Thu, July 12, 2007 6:56 pm, Nathan Nobbe wrote: Brian, I was experimenting late last year using PHP to send SMS messages. I think there is a lot of potential in the marketplace around SMS. But most of the phone companies wouldnt even talk to me and all i was trying to do was hit a development API to test some code out. im almost certain you will have to go through a provider if you intend to have messages source # based upon a value you provide rather than a phone you own. i have already grown a deep hatred for telcos due to this exclusive club thing they have going. i will focus all my energy on any opportunity that arises to thwart them. good luck, -nathan On 7/12/07, Brian Dunning [EMAIL PROTECTED] wrote: Hi all - I've been looking at a number of the commercial service providers for bulk SMS messaging, most of whom have PHP APIs. But since they are selling something they don't answer my question Is there any (legal, legitimate) way to send an SMS message that can be replied to the desired SMS cell number? Like, if I use PHP to send an SMS to Bob, can I make it appear to come from Jim's cell phone so that Bob can reply directly to Jim normally? The services all require Jim to log into their web site to read any replies. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP short tags: Questions
Hey Richard, thanks for the reply. I appreciate it. :) Richard Lynch wrote: http://php.net/ Yikes! I guess it was one of those RTFM question/answers! Lol. :D #2 sounds awfully bogus to me... Yeah... Hmm, now I am starting to wonder where I heard/read that. Maybe it was a co-worker. I am glad I asked here for clarification. 1 and 3 sure ought to cover it though. Yep yep. Sounds good to me. Good enough reasons to think twice about using short tags. Also, FYI for those interested, a list member mentioned (off-list) that shorthand tags are considered by many to be deprecated and have been on the verge of removal from the PHP language a few times in the past. Interesting stuff. :) Thanks again Richard and all. Cheers, Micky -- Wishlists: http://snipurl.com/1gqpj Switch: http://browsehappy.com/ BCC?: http://snipurl.com/w6f8 My: http://del.icio.us/mhulse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail function from and reply to address problem
On Thu, July 12, 2007 6:33 pm, Tanner Postert wrote: I am currently running PHP 5.1.4 Fedora Core 5 i'm trying to exectute the following test script. ?php $to = '[EMAIL PROTECTED]'; $subject = 'the subject'; $message = 'body'; $headers = 'From: [EMAIL PROTECTED]' . \r\n . 'Reply-To: [EMAIL PROTECTED]' . \r\n . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ? You really ought to be getting the return value from mail() and checking it for success... Error-checking is good. :-) i have about 10 or so different virtual hosts running on this machine, and if i use any of them for the from reply-to addresses, it works fine, or even if i use domains I don't control like aol.com or example.com those work too, but one particular new virtual host doesn't work, it re-writes the from address to the default virtual host address. which is strange because that isn't in the php.ini anywhere, but it could just be taking the hostname. anyone have any ideas? As I understand it: If the PHP (read: Apache) User is not trusted in sendmail config, then sendmail won't let that user forge the return headers, and the return comes from the default set in sendmail configuration. Substitute postfix or whatever as appropriate for your configuration. So you now have the joy of digging into sendmail configuration. Good luck! -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] About PHP/XML/XSLT/MYSQL Web Sites
On Thu, July 12, 2007 4:15 pm, Kelvin Park wrote: I'm trying to setup a XSLT based web site. I wasn't exactly sure about the flow of the whole system when data from relational database is transferred to XML and in turn the data inputted from the user is relayed back to the database through XML (or directly to the database with PHP DB connection). I built a flowchart illustrating what the flow of the XSLT/PHP/MYSQL system might be like. If you think it's the wrong way or an inefficient way of getting user inputted data back to mysql, I would appreciate any comments. If you cannot download the PDF file, you can bring it up with direct address the the file: http://www.envigan.net/CMSFLOW.pdf Maybe you already know this, and it's too detail oriented to be in your diagram. Maybe not. Filter Input; Escape Output Escape output is pretty easy: Right before you cram it into MySQL, put it into another variable with mysql_real_escape_string() called on it first, and put THAT into MySQL, not the original. Right before you spew it to a browser, call htmlentities() on it, and use THAT to go out to the browser, not the original. Filter Input is a bit tougher... It basically boils down to: Trust no one. Validate everything. If you aren't already paranoid, nor even not paranoid enough, start reading here: http://phpsec.org/ -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] About PHP/XML/XSLT/MYSQL Web Sites
On Fri, July 13, 2007 12:19 am, Nathan Nobbe wrote: thing as i mentioned before is i cannot see a reason to create xml data while processing a GET or POST request from a client; it would just be an extra step with no apparent benefit as far as i can tell. You DEFINITELY are not being nearly paranoid enough! Don't write another line of code or draw another diagram until you've realized the sheer fallacy of the above statement. :-) -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Displaying HTML characters in real format
On Thu, July 12, 2007 12:37 pm, Don Don wrote: Am kind of confused between htmlspecialchars and htmlentities. I've got data i need to display data on a page containing e.g. quot; but will like it to be displayed as htmlspecialchars or htmlentities or page character set ? htmlspecialchars ONLY escapes four characters: htmlentities escapes ALL characters that need it I honestly can think of no valid use for htmlspecialchars, to tell you the truth... There must be some use for it, though. Put it this way: Whatever data you have, it probably shouldn't contain HTML if you are asking this question, so you probably should be using htmlentities to escape everything and be safe. If it DOES have HTML in it, and you want that HTML to get to the browser, I'm concerned that you don't understand just how dangerous that is... http://phpsec.org/ -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] need a form for connecting to paypal payment pro.
On Thu, July 12, 2007 7:33 am, Ross wrote: I need a secure form. I have one here http://www.edinburghnights.co.uk/pay/php/curl_https.html but it has no algorithm check on the CC number. Also I need to make the form secure. Can someone point me to an example or tutorial. To make the form secure in regards to internet transmission, you need to install OpenSSL (or other SSL implementation) and buy an SSL Certificate from a reputable CA (e.g., Verisign/Thawte...) Well, okay, technically, you can generate a free one for yourself, and it's just as secure in the transmission, but the browser pops up a nasty warning to the users that they are doing something insecure (i.e., trusting you even though you haven't paid the $200 for a background check to get a Cert) and you almost for sure don't want that. The algorithm to check the validity of a CC number can be found in Google so easily, I refuse to even answer that one. :-) credit card number validity checksum algorithm ought to get you the results you want. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] can't open file
On Thu, July 12, 2007 11:10 am, Anugrah Widya wrote: dear php developer, i have weird situation here, i can't create a file in 777 mode directory and stay in same server, is this a bug ?? fyi. i'm using fc6, and php 5.1.6 Show us code. It's almost for sure not a PHP bug, whatever it is you are saying. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] can't open file
On Thu, July 12, 2007 11:30 am, Anugrah Widya wrote: Stut wrote: Anugrah Widya wrote: dear php developer, i have weird situation here, i can't create a file in 777 mode directory and stay in same server, is this a bug ?? fyi. i'm using fc6, and php 5.1.6 I'm not sure I understand what the problem is. Please post the code you're using and a more detailed description of what you're trying to achieve and what's actually happening. -Stut here the situation is, i have two domain (two website), and both stay in same server, and use same php Website A - /var/www/html/A Website B - /var/www/html/B website A would like to create some file in website B, in /var/www/html/B/var/tmp/queue, and that map is in 777 mode created by script what i got is the fopen() won't succeed to create the file in website B but if i test to write into /var/www/html/A/var/tmp/queue in website A admin it succeed is it because of some configuration in php.ini i didn't activate or what ?? If it's not safe_mode as Stut suggests, it's also possible that the PHP user (probably Apache User) does not have permission to write into /var/www/html/B/var/tmp/queue, regardless of whether you are in A or B. It's also remotely possible that your server is running two (or more) pools of Apache servers, one for each of A and B (and others) and A can write to A dir and B can write to B dir, because each is running as a different user. Or, you could be using php_suexec or fast cgi to achieve a similar effect... Basically, this is going to boil down to: PHP us running as User X. User X does not have permission to write to dir B. The permission could be foiled by PHP with safe_mode, or could be built into the permissions on the directories with chmod. So if it's not safe_mode, mess around with ls -als on the directory, and use phpinfo() or http://php.net/get_current_user to figure out who you are, and then it should be pretty clear who can/can't write to that directory and why it's not working. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Displaying HTML characters in real format
On Thu, July 12, 2007 6:08 pm, Dan wrote: string htmlentities ( string $string [, int $quote_style [, string $charset [, bool $double_encode]]] ) This function is identical to htmlspecialchars() in all ways, except with htmlentities(), all characters which have HTML character entity equivalents are translated into these entities. This means that if there's an HTML equivelant it will translate into that. For example. ' and don't have HTML equivelants, it is #039, anything with a #number won't get translated. With htmlspecialchars it will. I think you've managed to confuse more than you've explained... does have an HTML equivalent, it's quot; htmlspecialchars and htmlentities do the same thing to , they turn it into quot; so it can be displayed as CONTENT in a webpage instead of possibly being mistaken for CODE. Both functions will also do exactly the same thing foras well: Convert them to lt; gt; amp; respectively. htmlentities will ALSO convert every other goofy character into an HTML Equivalent, so it is safe to spew out to a browser, so the browser will know it's CONTENT and not CODE. htmlspecialchars will do NO conversion on anything but those special four chars, so is not save to apply unless you somehow magically know that the data contains no HTML-specific characters other than those four... IOW, htmlspecialchars is probably not real useful for general everyday PHP scripting, as it only escapes 4 our of a whole bunch of characters that need escapgin. htmlentities is irreplacable for general everyday PHP scripting, because it escapes all of them. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail function from and reply to address problem
Richard Lynch wrote: On Thu, July 12, 2007 6:33 pm, Tanner Postert wrote: I am currently running PHP 5.1.4 Fedora Core 5 i'm trying to exectute the following test script. ?php $to = '[EMAIL PROTECTED]'; $subject = 'the subject'; $message = 'body'; $headers = 'From: [EMAIL PROTECTED]' . \r\n . 'Reply-To: [EMAIL PROTECTED]' . \r\n . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ? You really ought to be getting the return value from mail() and checking it for success... Error-checking is good. :-) i have about 10 or so different virtual hosts running on this machine, and if i use any of them for the from reply-to addresses, it works fine, or even if i use domains I don't control like aol.com or example.com those work too, but one particular new virtual host doesn't work, it re-writes the from address to the default virtual host address. which is strange because that isn't in the php.ini anywhere, but it could just be taking the hostname. anyone have any ideas? As I understand it: If the PHP (read: Apache) User is not trusted in sendmail config, then sendmail won't let that user forge the return headers, and the return comes from the default set in sendmail configuration. Which is mentioned in the documentation: http://www.php.net/manual/en/function.mail.php ;) Sendmail and exim definitely have this sort of problem, I don't think postfix or qmail do though. -- 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] Help setting up php
On Thu, July 12, 2007 8:25 am, Karl Schmitt wrote: Can someone please help me? I am new to installing and working with php and webservers. I am using IIS 6. I can not get php to load the ini file. This line: Configuration File (php.ini) Path C:\WINDOWS tells you that PHP *looked* for the php.ini file in: C:\WINDOWS However, it did not FIND php.ini there, as there is no php.ini on the path name shown. Therefore, PHP just used the default default values for everything. You need to copy the php.ini-recommended to C:\WINDOWS and name it php.ini You'll then need to restart Apache, errr, IIS, which probably means reboot the whole machine, knowing Microsoft. :-) -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Single Quote in String functions
On Thu, July 12, 2007 7:02 am, Sancar Saran wrote: I cannot do any operation wiht single quote like explode(',$strContent); Did I miss someting ? Works for me, so you've definitely missed something somewhere. Like telling us what's in $strContent and whatever else is before the code that you think is broken, but isn't, because that code that came before this code is what's really broken. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array Push question
On Thu, July 12, 2007 3:45 am, John Comerford wrote: Is there a better way of doing the following: $Rows[] = array(); $currentRow = count($Rows) - 1; $Rows[$currentRow]['test'] = this is a test; Specifically I am wonder if I can avoid having to use 'count'. count() is not slow, really... PHP maintains the count internally as you add stuff, so it is a quick lookup. Or you could just do: $Rows[] = array('test'=this is a test); At least I think that works out the same array-wise... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Brain Teasers
On Thu, July 12, 2007 10:20 am, Daniel Brown wrote: On 7/12/07, Robert Cummings [EMAIL PROTECTED] wrote: G... must be nice, some of us had to toil 18 hours a day sweeping chimneys! ;) Cheers, Rob. What do you mean us? Weren't you born before they invented the chimney? ?php $when = array('uphill', 'in', 'the', 'snow'); $age = time() - mktime(0, 0, 0, 0, 0, mt_rand(10, 50); ? -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Brain Teasers
On Thu, July 12, 2007 10:26 am, Robert Cummings wrote: On Thu, 2007-07-12 at 11:20 -0400, Daniel Brown wrote: On 7/12/07, Robert Cummings [EMAIL PROTECTED] wrote: G... must be nice, some of us had to toil 18 hours a day sweeping chimneys! ;) Cheers, Rob. What do you mean us? Weren't you born before they invented the chimney? I wasn't born silly-ass, I was hatched. :) So the egg definitely came before the chicken! :-) -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array Question
On Thu, July 12, 2007 8:29 am, Robert Cummings wrote: Hmmm, I thought using an explicit cast was very self explanatory -- especially when the name of the cast is array. Maybe I'm alone in that thought. I mean if you convert a scalar to an array what do you expect to get? An array with the scalar. *shrug* I can't see how it would be anything else. $foo = (array) 'foo'; var_dump($foo); A couple perfectly reasonable (though wrong) outputs: #1 array (3){ 0 = 'f', 1 = 'o', 2 = 'o' ); And, actually, PHP having been derived (partially) from C, one could almost argue this is the EXPECTED output. :-) #2 array (1) { 'foo' = 'foo' } Which might work just fine for whatever the original code was doing, but isn't quite the same as what happens... #3 array (1) { 'foo' = TRUE } Bit of a stretch, I suppose... #4 ERROR: Invalid typecast of String to Array. Not very PHP, I suppose, but there it is... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Announcing Xaja, a PHP Reverse Ajax framework
Hi list! A few month ago, I asked a question on this mailing list regarding the closing of a connexion between the PHP server and the browser. Thanks to the answers I was given, I have been able to complete the framework I was working on. Today, I'm proud to announce the first open source alpha release of The Xaja Machine, a full-featured PHP Reverse Ajax framework, at http://www.thecodingmachine.com/projects/xaja. /The Xaja Machine /is a PHP framework that enables the developer to access the most advanced Ajax features very easily. It is a quite big piece of work. It has been in development for more than a year now. Xaja is a *Reverse Ajax* framework, therefore, it enables the server to *push* data directly to the client (just like DWR in the Java world). Furthermore, Xaja changes the way a developer thinks about its application. Instead of being a series of request and responses like any web framework does today, a Xaja application is made of a process on the server side that truly dialogs with the browser. This is a shift in the web paradigm. This is furthermore made easier by an extensible tag library and numerous functions to manipulate the DOM of your web page. The best part of this is you can do that *without typing a single line of Javascript*. Below is a list of features that you will find in Xaja: * *Ajax:* Xaja makes it easy to develop pages with Ajax features. You can develop applications that update the HTML page without having to reload the entire page. * *Pencil:* In order to update the HTML page easily, Xaja provides an innovative method that we called the /Pencil/. Basically, you just tell to Xaja where you would like to write into the page, and you let the application output some HTML using the usual PHP echo function. * *DOM Mapping:* From your PHP application, you can manipulate the Document Object Model (DOM) of the HTML page that is displayed in the browser. You can dynamically add some items, remove other items, etc... Basically, you take control of the browser from the server side. * *Tag library:* To make development easier for the developer, Xaja comes with an extensible tag library. For instance, with Xaja, adding a calendar is as easy as writing calendar /. Furthermore, Xaja adds a number of custom event handlers to standard HTML tags that link directly back to PHP code. * *Reverse Ajax:* Last but not least, Xaja comes with a powerful /message broker/ that enables PHP processes to talk to each other, and a /reverse ajax/ feature that enables a PHP process to talk back to the browser. This makes it easy to develop highly interactive applications like instant messaging, live feeds, or real-time statistics. * *Database ORM tool:* although not part of Xaja directly, Xaja comes bundled with The Database Machine (TDBM). TDBM is a tool that enables the developer to access its database very easily. More information at www.thecodingmachine.com/projects/tdbm http://www.thecodingmachine.com/projects/tdbm Here is a sample using events handling and DOM manipulation: a = input type=text phpvalue=*$a* /br / b = input type=text phpvalue=*$b* /br / a + b = input type=text id=result readonly=true / input type=button value=Compute phponclick=*$xajaController-getWidgetById('result')-value = $a+$b* /br / In this simple adder sample, you will notice the phpvalue attribute that maps directly a PHP variable ($a and $b) to the value of the input field. You will also notice the phponclick attribute that contains PHP code that gets executed as soon as the button is clicked. This sample shows only a small part of the features that Xaja offers. Xaja is still in an early stage of development, but it is time for us to get some feedback (or some help, since it is released in GPL). You can download an alpha version of Xaja from http://www.thecodingmachine.com/projects/xaja You can view a screencast presenting Xaja at : http://www.thecodingmachine.com/cmsDoc/xaja/trunk/screencast.html?group_id=29 Thanks in advance to anyone sending me comments or problems regarding Xaja. Best regards, David. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting the next element of an associative array
On Thu, July 12, 2007 1:34 am, Chris wrote: Olav Mørkrid wrote: let's say we have the following associative array: $array = array( red = ferrari, yellow = volkswagen, green = mercedes, blue = volvo ); then we have a current index into the array: $index = yellow; $current = $array[$index]; now: how do i get the key of the next array element (in this case green)? $next = ? Funnily enough: $next = next($array); http://www.php.net/manual/en/function.next.php No, he'll just get the first one, regardless of which array index he has directly accessed with [] operator most recently... Unless the OP is uber-PHP-expert, you've probably just made some bad Design decisions along that way, and painted yourself into a corner because of them. Rather than write some hack function to find the element after the element of an index you know, figure out where you went wrong back when, and start over from there... If you're playing adventure, and about to die a horrible death, maybe the mistake was NOT the LAST move you made, but a little before that, no? :-) -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework
David Négrier wrote: Regarding the way Xaja is pronounced well that's a good question. Actually, I'm French and my pronunciation is... well... French ;), so I won't give you any advice on how to pronounce it. However, I will present Xaja in San Francisco at the Ajax Experience (a conference about Web 2.0 development). I will ask some people there if they can give me a clue on the way to pronounce it in English ;). I reckon it should be pronounced zah-jah in English. (the same Z sound as in Xavier) I wouldn't listen to the Americans in San Fran. Americans always pronounce English in a weird and colourful way (and yes, colourful has a U in it. get that right too!!!) :p Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Announcing Xaja, a PHP Reverse Ajax framework
On Fri, Jul 13, 2007 at 12:44:35PM +0200, David Négrier wrote: Hi Mario, hi Stuart, I fixed the SVN repository. You can try it now, it works better. Regarding the way Xaja is pronounced well that's a good question. Actually, I'm French and my pronunciation is... well... French ;), so I won't give you any advice on how to pronounce it. However, I will present Xaja in San Francisco at the Ajax Experience (a conference about Web 2.0 development). I will ask some people there if they can give me a clue on the way to pronounce it in English ;). Best regards, David. Now it works fine. :-) Thanks. I will test it and give you some response, if you want it. Greetings Mario -- - | havelsoft.com - Ihr Service Partner für Open Source | | Tel: 033876-21 966 | | Notruf: 0173-277 33 60 | | http://www.havelsoft.com| | | | Inhaber: Mario Günterberg | | Mützlitzer Strasse 19 | | 14715 Märkisch Luch | - pgpKtNDgyNqk7.pgp Description: PGP signature
Re: [PHP] Announcing Xaja, a PHP Reverse Ajax framework
Hi Mario, hi Stuart, I fixed the SVN repository. You can try it now, it works better. Regarding the way Xaja is pronounced well that's a good question. Actually, I'm French and my pronunciation is... well... French ;), so I won't give you any advice on how to pronounce it. However, I will present Xaja in San Francisco at the Ajax Experience (a conference about Web 2.0 development). I will ask some people there if they can give me a clue on the way to pronounce it in English ;). Best regards, David. Mario Guenterberg a écrit : On Fri, Jul 13, 2007 at 10:10:15AM +0200, David Négrier wrote: Xaja is still in an early stage of development, but it is time for us to get some feedback (or some help, since it is released in GPL). You can download an alpha version of Xaja from http://www.thecodingmachine.com/projects/xaja You can view a screencast presenting Xaja at : http://www.thecodingmachine.com/cmsDoc/xaja/trunk/screencast.html?group_id=29 Thanks in advance to anyone sending me comments or problems regarding Xaja. Hi... I will test your framework but the checkout for the svn repo don't accept the username and password documented in the website. :-( Greetings Mario -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: what trick is this? How to do it?
http://xsojix.imeem.com/music/1zyLl7y9/lost_my_music/ How did he/she do it? I meant the modal login window... I just found that linux.com is using the same trick. :) -- @~@ Might, Courage, Vision, SINCERITY. / v \ Simplicity is Beauty! May the Force and Farce be with you! /( _ )\ (Xubuntu 7.04) Linux 2.6.22.1 ^ ^ 20:03:01 up 1 day 22:07 0 users load average: 0.00 0.01 0.00 news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Social Networking Sites OT
On Thu, 2007-07-12 at 23:51 -0500, Richard Lynch wrote: It's gotten to the point where I pretty much view social networking sites as just another form of spammers... I blogged about it, and would like feedback from members of this lists, for various reasons I would hope would be obvious. PLEASE put responses in my blog, or your blog, or whatever, but not here, as I'm sure this thread could be quite annoying as it has minimal to zero concrete PHP content. http://richardlynch.blogspot.com/ I didn't feel like logging in so I'll post my comment here: The whole idea behind a social network is that you can socially network... as such inviting your friends is a great approach. I use facebook and from time to time I do indeed invite my friends. The problem you are experiencing is abuse of the feature. You have entities outside of what you would call friends that are hitting you up for a connection. The solution to this really should be the opportunity to register your address with the social network such that you will no longer receive requests. Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array Question
On Fri, 2007-07-13 at 02:15 -0500, Richard Lynch wrote: On Thu, July 12, 2007 8:29 am, Robert Cummings wrote: Hmmm, I thought using an explicit cast was very self explanatory -- especially when the name of the cast is array. Maybe I'm alone in that thought. I mean if you convert a scalar to an array what do you expect to get? An array with the scalar. *shrug* I can't see how it would be anything else. $foo = (array) 'foo'; var_dump($foo); A couple perfectly reasonable (though wrong) outputs: #1 array (3){ 0 = 'f', 1 = 'o', 2 = 'o' ); And, actually, PHP having been derived (partially) from C, one could almost argue this is the EXPECTED output. :-) #2 array (1) { 'foo' = 'foo' } Which might work just fine for whatever the original code was doing, but isn't quite the same as what happens... #3 array (1) { 'foo' = TRUE } Bit of a stretch, I suppose... #4 ERROR: Invalid typecast of String to Array. Not very PHP, I suppose, but there it is... Waves hands wildly and dismissively in the air. *pshaw* :) Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Brain Teasers
On Fri, 2007-07-13 at 01:59 -0500, Richard Lynch wrote: On Thu, July 12, 2007 10:20 am, Daniel Brown wrote: On 7/12/07, Robert Cummings [EMAIL PROTECTED] wrote: G... must be nice, some of us had to toil 18 hours a day sweeping chimneys! ;) Cheers, Rob. What do you mean us? Weren't you born before they invented the chimney? ?php $when = array('uphill', 'in', 'the', 'snow'); $age = time() - mktime(0, 0, 0, 0, 0, mt_rand(10, 50); It's missing a bracket after mt_rand( :) But more importantly there's an omission of the concept of both ways ;) Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Social Networking Sites OT
is anyone a member of linkedinhttp://www.google.com/url?sa=Lai=BUABgKX6XRvLdJ4zgggT8v52lC8ucgBebzIqWAemVpt4CsOoBCAAQARgBIL_gsAM4AVCU65jV_f8BYMmW2oj8o8gQqgEHZW4rMkdNTMgBAYACAdkD8zMUsRH52XIq=https://www.LinkedIn.com%253Ftrk%253Dlinkedin1usg=AFQjCNGT5ZjLeO1TTdxtZaChKbuUv0imhA ? ive had a few people approach me on that, but i heard from a freind that you can get people hounding you to help them find a job or give them a reference. i guess thats the point of the site, but it doesnt really interest me, since i can usually manage to get a job myself and ive even helped a couple buddies land some good jobs. -nathan On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote: On Thu, 2007-07-12 at 23:51 -0500, Richard Lynch wrote: It's gotten to the point where I pretty much view social networking sites as just another form of spammers... I blogged about it, and would like feedback from members of this lists, for various reasons I would hope would be obvious. PLEASE put responses in my blog, or your blog, or whatever, but not here, as I'm sure this thread could be quite annoying as it has minimal to zero concrete PHP content. http://richardlynch.blogspot.com/ I didn't feel like logging in so I'll post my comment here: The whole idea behind a social network is that you can socially network... as such inviting your friends is a great approach. I use facebook and from time to time I do indeed invite my friends. The problem you are experiencing is abuse of the feature. You have entities outside of what you would call friends that are hitting you up for a connection. The solution to this really should be the opportunity to register your address with the social network such that you will no longer receive requests. Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] The end of PHP4 is nigh!
In case anyone hasn't seen it there is an announcement regarding the future support for PHP4 on the PHP website. If you're running PHP4 you *need* to read it. http://php.net/ -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP short tags: Questions
On 7/13/07, Micky Hulse [EMAIL PROTECTED] wrote: Hey Richard, thanks for the reply. I appreciate it. :) Richard Lynch wrote: http://php.net/ Yikes! I guess it was one of those RTFM question/answers! Lol. :D #2 sounds awfully bogus to me... Yeah... Hmm, now I am starting to wonder where I heard/read that. Maybe it was a co-worker. I am glad I asked here for clarification. 1 and 3 sure ought to cover it though. Yep yep. Sounds good to me. Good enough reasons to think twice about using short tags. Also, FYI for those interested, a list member mentioned (off-list) that shorthand tags are considered by many to be deprecated and have been on the verge of removal from the PHP language a few times in the past. Interesting stuff. :) Thanks again Richard and all. Cheers, Micky -- Wishlists: http://snipurl.com/1gqpj Switch: http://browsehappy.com/ BCC?: http://snipurl.com/w6f8 My: http://del.icio.us/mhulse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php To my knowledge (and even a quick peek at http://www.php.net/ini.core), there is no indication that short_open_tags is deprecated, nor that it's been on the verge of removal at any point. I don't want to start a flame war, but it sounds like you've been given some bad information. In fact, removing the short_open_tags core directive would not only cause probably more than half of existing scripts to break (that's just an educated guess, of course), but would also completely eradicate the PHP core feature of shorthand output: ?php echo This is output.\n; ? versus: ?=This is output.\n? Also note that, with shorthand output, the echoed output does not need a semicolon at the end if it's a single line. I generally do it out of habit, but for the purpose of illustration here, I omitted the semicolon. Additionally, a disclaimer should be made in favor of the anti-short_open_tags people, where the three lines can safely coexist on one. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: what trick is this? How to do it?
View the source and trace through the javascript. Looks like it has to do with: function openLogin() Which calls: dojo.require(dojo.widget.Dialog); and.. floatingWindow = dojo.widget.createWidget(Dialog, properties, node); and.. floatingWindow.setContent(iframe (bunch of stuff)/iframe); Don't have time right now, but I'd dig deeper into dojo.widget.Dialog (in this specific case.. don't know about Linux.com). -TG = = = Original message = = = http://xsojix.imeem.com/music/1zyLl7y9/lost_my_music/ How did he/she do it? I meant the modal login window... I just found that linux.com is using the same trick. :) -- @~@ Might, Courage, Vision, SINCERITY. / v \ Simplicity is Beauty! May the Force and Farce be with you! /( _ )\ (Xubuntu 7.04) Linux 2.6.22.1 ^ ^ 20:03:01 up 1 day 22:07 0 users load average: 0.00 0.01 0.00 news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SMS questions
On Friday 13 July 2007 14:07, Richard Lynch wrote: I'd give a lot of money to be able to teleport back in time and yell at the email designer folks to tell them just how horrible a mess they were making... :-) But you have to give them credit for designing something so scaleable that even decades later it is still able to cope with the billions of spam. On the other hand if it weren't so scaleable it might have forced some drastic changes much earlier to curtail spam. Something like this: http://cr.yp.to/im2000.html in which the sender is responsible for storing the mail until the intended recipient retrieves it seems like a good start. -- Crayon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help setting up php
In news: [EMAIL PROTECTED] - Richard Lynch wrote : On Thu, July 12, 2007 8:25 am, Karl Schmitt wrote: Can someone please help me? I am new to installing and working with php and webservers. I am using IIS 6. I can not get php to load the ini file. This line: Configuration File (php.ini) Path C:\WINDOWS tells you that PHP *looked* for the php.ini file in: C:\WINDOWS However, it did not FIND php.ini there, as there is no php.ini on the path name shown. Therefore, PHP just used the default default values for everything. You need to copy the php.ini-recommended to C:\WINDOWS and name it php.ini You'll then need to restart Apache, errr, IIS, which probably means reboot the whole machine, knowing Microsoft. :-) -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? I would start again with a manual install much safer, c:\windows is not the best place to have php.ini .A manual install should not take more than 10/20 mins. Chris -- Cheap As Chips Broadband http://yeah.kick-butt.co.uk Superb hosting domain name deals http://host.kick-butt.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework
On 7/13/07, Colin Guthrie [EMAIL PROTECTED] wrote: I reckon it should be pronounced zah-jah in English. (the same Z sound as in Xavier) I wouldn't listen to the Americans in San Fran. Americans always pronounce English in a weird and colourful way (and yes, colourful has a U in it. get that right too!!!) :p Col I actually agree with Colin on part one and 2(a) of his message for the most part. I wouldn't enunciate a hard J on the second syllable, though, rather trading it for a 'zh' sound. Immediately upon reading it, I considered it to sound like ZAH-zhah. With regards to 2a, I agree that my fellow Americans over on the west coast, specifically San Francisco, speak a bit different than those of us in the northeast. Nowhere near as different as the south, but that's not the point. On points 2b and 2c (Americans always pronounce English in a weird and colourful way, and, yes, colourful has a U in it, respectively), I don't completely agree. Sure, we bastardized the language a bit, but considering Europeans bastardized it from Germanic in the first place, it's only fair. ;-P And to you, yes, colourful has a U in it. Well, guess what it does for us, too! Just not in the color part, but rather the ful part. So there! Finally, since I'm already off-topic, I may as well at least commend our more eastern friends (read: non-American English speakers) on understanding the difference between - and correctly using - the words theatre versus theater, and centre versus center correctly. /soapbox -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: what trick is this? How to do it?
On 7/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: View the source and trace through the javascript. Looks like it has to do with: function openLogin() Which calls: dojo.require(dojo.widget.Dialog); and.. floatingWindow = dojo.widget.createWidget(Dialog, properties, node); and.. floatingWindow.setContent(iframe (bunch of stuff)/iframe); Don't have time right now, but I'd dig deeper into dojo.widget.Dialog (in this specific case.. don't know about Linux.com). -TG = = = Original message = = = http://xsojix.imeem.com/music/1zyLl7y9/lost_my_music/ How did he/she do it? I meant the modal login window... I just found that linux.com is using the same trick. :) -- @~@ Might, Courage, Vision, SINCERITY. / v \ Simplicity is Beauty! May the Force and Farce be with you! /( _ )\ (Xubuntu 7.04) Linux 2.6.22.1 ^ ^ 20:03:01 up 1 day 22:07 0 users load average: 0.00 0.01 0.00 news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php It looks nice and all, but it doesn't work. I'm still able to click any link I want to, play the music, et cetera, without logging in. Plus, simply stopping the page before it loads all the way blocks the dimming of the background, disabling of page properties, and the popup of the login window. Not sure if it's the same for everyone, but it is for me here at work (Mandriva Linux 2006.0 Community, KDE 3.4, Firefox 2.0.0.4). -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SMS questions
On Fri, 2007-07-13 at 22:30 +0800, Crayon Shin Chan wrote: On Friday 13 July 2007 14:07, Richard Lynch wrote: I'd give a lot of money to be able to teleport back in time and yell at the email designer folks to tell them just how horrible a mess they were making... :-) But you have to give them credit for designing something so scaleable that even decades later it is still able to cope with the billions of spam. On the other hand if it weren't so scaleable it might have forced some drastic changes much earlier to curtail spam. Something like this: http://cr.yp.to/im2000.html in which the sender is responsible for storing the mail until the intended recipient retrieves it seems like a good start. Bleh, that's so easily solvable for spammers. Create one real message, then softllink it for every actual email they send out. Millions of links are cheap. Of course, that sort of presumes they use their own computers :) Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Announcing Xaja, a PHP Reverse Ajax framework
On Fri, Jul 13, 2007 at 10:10:15AM +0200, David Négrier wrote: Xaja is still in an early stage of development, but it is time for us to get some feedback (or some help, since it is released in GPL). You can download an alpha version of Xaja from http://www.thecodingmachine.com/projects/xaja You can view a screencast presenting Xaja at : http://www.thecodingmachine.com/cmsDoc/xaja/trunk/screencast.html?group_id=29 Thanks in advance to anyone sending me comments or problems regarding Xaja. Hi... I will test your framework but the checkout for the svn repo don't accept the username and password documented in the website. :-( Greetings Mario -- - | havelsoft.com - Ihr Service Partner für Open Source | | Tel: 033876-21 966 | | Notruf: 0173-277 33 60 | | http://www.havelsoft.com| | | | Inhaber: Mario Günterberg | | Mützlitzer Strasse 19 | | 14715 Märkisch Luch | - pgpiWaKUOc2F6.pgp Description: PGP signature
FW: [PHP] SMS questions
Richard makes some good points. Further to the original posting though, I have a friend who works with this SMS stuff, and out of interest asked him about it. Here is his (slightly scary) response, might be of some use ... His website is www.textit,biz -Original Message- From: Shaun M. Nixon Sent: 13 July 2007 09:17 To: Steve Perkins [mailto:[EMAIL PROTECTED] Subject: FW: [PHP] SMS questions Hi Steve Hope you're doing fine. It is possible. In short, you have seen how a SMS message is sent using a operators Name label i.e. the Messages says who it's from e.g. TEXT IT, but you are unable to reply because the Sender is 'Text it' and not a mobile number. Well in the same mechanism, you can send a mobile phone number as the Label. Thus allowing you to send someone a message as if it came from someone else. I guess this is what is being asked / wanted - spoofing a Mobile. It is illegal to do this without consent and you must audit / prove ownership / identity of the phone regarding the use / service (highly regulated) - it also carries great risk to the provider (e.g. 2 Million fine from ICTICS), hence most companies reluctance etc. I believe Skype have recently introduced this service (but it's expensive) if Brian wants to try it out. We can do the same if required, as too relay all reply messages via email / texts if needed. Kind Regards Shaun Nixon Principal Consultant W: www.textit.biz -Original Message- From: Steve Perkins [mailto:[EMAIL PROTECTED] Sent: 13 July 2007 01:05 To: Shaun M. Nixon Subject: FW: [PHP] SMS questions I saw this and I though of you Shaun. You have any answers ? Cheers -Original Message- From: Brian Dunning [mailto:[EMAIL PROTECTED] Sent: 13 July 2007 00:40 To: php-general@lists.php.net Subject: [PHP] SMS questions Hi all - I've been looking at a number of the commercial service providers for bulk SMS messaging, most of whom have PHP APIs. But since they are selling something they don't answer my question Is there any (legal, legitimate) way to send an SMS message that can be replied to the desired SMS cell number? Like, if I use PHP to send an SMS to Bob, can I make it appear to come from Jim's cell phone so that Bob can reply directly to Jim normally? The services all require Jim to log into their web site to read any replies. -- 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: Announcing Xaja, a PHP Reverse Ajax framework
On Jul 13, 2007, at 10:31 AM, Daniel Brown wrote: And to you, yes, colourful has a U in it. Well, guess what it does for us, too! Just not in the color part, but rather the ful part. So there! It's all about U isn't it? ;) -- 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] Re: PHP Brain Teasers
On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote: But more importantly there's an omission of the concept of both ways ;) Ha! I was thinking exactly the same thing! -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework
On Fri, 2007-07-13 at 10:40 -0400, Jason Pruim wrote: On Jul 13, 2007, at 10:31 AM, Daniel Brown wrote: And to you, yes, colourful has a U in it. Well, guess what it does for us, too! Just not in the color part, but rather the ful part. So there! It's all about U isn't it? ;) Humour us! :) Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] The end of PHP4 is nigh!
On 7/13/07, Stut [EMAIL PROTECTED] wrote: In case anyone hasn't seen it there is an announcement regarding the future support for PHP4 on the PHP website. If you're running PHP4 you *need* to read it. http://php.net/ -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Fork! -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] The end of PHP4 is nigh!
On Fri, 2007-07-13 at 10:48 -0400, Daniel Brown wrote: On 7/13/07, Stut [EMAIL PROTECTED] wrote: In case anyone hasn't seen it there is an announcement regarding the future support for PHP4 on the PHP website. If you're running PHP4 you *need* to read it. http://php.net/ -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Fork! Spoon! Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Magis_qoutes + linux + smarty
This is wrong place for Smarty questions, try smarty mailing lists. That said, you probably have problem with file access rights, ie folder you're trying to write to or create has flags that don't allow that, or you've created it with ftp (and as ftp user) and your php script is running under as a different user. Boban -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework
On Fri, 2007-07-13 at 10:31 -0400, Daniel Brown wrote: On 7/13/07, Colin Guthrie [EMAIL PROTECTED] wrote: I reckon it should be pronounced zah-jah in English. (the same Z sound as in Xavier) I wouldn't listen to the Americans in San Fran. Americans always pronounce English in a weird and colourful way (and yes, colourful has a U in it. get that right too!!!) :p Col I actually agree with Colin on part one and 2(a) of his message for the most part. I wouldn't enunciate a hard J on the second syllable, though, rather trading it for a 'zh' sound. Immediately upon reading it, I considered it to sound like ZAH-zhah. I'm with Colin, I'd pronounce it ZahJah. Yah, Yah, that's would I would say. But really, it's up to it's creator how they would like it to be said :) Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] The end of PHP4 is nigh!
On Jul 13, 2007, at 10:55 AM, Robert Cummings wrote: On Fri, 2007-07-13 at 10:48 -0400, Daniel Brown wrote: On 7/13/07, Stut [EMAIL PROTECTED] wrote: In case anyone hasn't seen it there is an announcement regarding the future support for PHP4 on the PHP website. If you're running PHP4 you *need* to read it. http://php.net/ -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Fork! Spoon! Knufe! :P Spuun works better :P -- 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] The end of PHP4 is nigh!
On 7/13/07, Jason Pruim [EMAIL PROTECTED] wrote: On Jul 13, 2007, at 10:55 AM, Robert Cummings wrote: On Fri, 2007-07-13 at 10:48 -0400, Daniel Brown wrote: Fork! Spoon! Knufe! :P Spuun works better :P I knew there had to be a cross-reference today somewhere. ;-P -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: About PHP/XML/XSLT/MYSQL Web Sites
Although it is necessary to convert SQL data into XML before it can be processed in an XSL transformation, it is a waste of time converting user input into XML before it is added to the database as none of the SELECT/INSERT/UPDATE/DELETE commands can work with XML files. It is far easier to take the GET/POST array and convert it into an sql query directly without any intermediate XML. This is what i have been trying to express to OP. Also, i havent had time to fully explore your application framework, but i have had a glimpse at it. i really appreciate your explanation of modularizing the xsl templates as i was struggling to grasp this with my limited exposure to xsl. i read up about you on your site and discovered you had been using xsl prior to php. i am the reverse of that, so while ive been using php for a few years now xsl is still very new to me. your documentation and articles are quite excellent. i hope you dont mind if i ask a couple questions in the future myself :) -nathan On 7/13/07, Tony Marston [EMAIL PROTECTED] wrote: Although it is necessary to convert SQL data into XML before it can be processed in an XSL transformation, it is a waste of time converting user input into XML before it is added to the database as none of the SELECT/INSERT/UPDATE/DELETE commands can work with XML files. It is far easier to take the GET/POST array and convert it into an sql query directly without any intermediate XML. FYI a complete framework which creates all HTML using XML+XSL has already been built, and is described at http://www.tonymarston.net/php-mysql/infrastructure.html#figure5, with a working sample application which is described in and can be downloaded from http://www.tonymarston.net/php-mysql/sample-application.html -- Tony Marston http://www.tonymarston.net http://www.radicore.org Kelvin Park [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm trying to setup a XSLT based web site. I wasn't exactly sure about the flow of the whole system when data from relational database is transferred to XML and in turn the data inputted from the user is relayed back to the database through XML (or directly to the database with PHP DB connection). I built a flowchart illustrating what the flow of the XSLT/PHP/MYSQL system might be like. If you think it's the wrong way or an inefficient way of getting user inputted data back to mysql, I would appreciate any comments. If you cannot download the PDF file, you can bring it up with direct address the the file: http://www.envigan.net/CMSFLOW.pdf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: About PHP/XML/XSLT/MYSQL Web Sites
Although it is necessary to convert SQL data into XML before it can be processed in an XSL transformation, it is a waste of time converting user input into XML before it is added to the database as none of the SELECT/INSERT/UPDATE/DELETE commands can work with XML files. It is far easier to take the GET/POST array and convert it into an sql query directly without any intermediate XML. FYI a complete framework which creates all HTML using XML+XSL has already been built, and is described at http://www.tonymarston.net/php-mysql/infrastructure.html#figure5, with a working sample application which is described in and can be downloaded from http://www.tonymarston.net/php-mysql/sample-application.html -- Tony Marston http://www.tonymarston.net http://www.radicore.org Kelvin Park [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm trying to setup a XSLT based web site. I wasn't exactly sure about the flow of the whole system when data from relational database is transferred to XML and in turn the data inputted from the user is relayed back to the database through XML (or directly to the database with PHP DB connection). I built a flowchart illustrating what the flow of the XSLT/PHP/MYSQL system might be like. If you think it's the wrong way or an inefficient way of getting user inputted data back to mysql, I would appreciate any comments. If you cannot download the PDF file, you can bring it up with direct address the the file: http://www.envigan.net/CMSFLOW.pdf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework
Daniel Brown wrote: And to you, yes, colourful has a U in it. Well, guess what it does for us, too! Just not in the color part, but rather the ful part. So there! D'oh! You got me there :p Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: The end of PHP4 is nigh!
Jason Pruim wrote: Fork! Spoon! Knufe! :P Spuun works better :P Always about u. :D Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: The end of PHP4 is nigh!
On Fri, 2007-07-13 at 16:39 +0100, Colin Guthrie wrote: Jason Pruim wrote: Fork! Spoon! Knufe! :P Spuun works better :P Always about u. :D *obligatory Cheers quote* Don't assume, when you do so it makes an ASS out of U and out of ME. :) Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail function from and reply to address problem
apache is definitely listed in the trusted users, as I mentioned, I can send from dozens of other domains, its just one specific domain that I can't. i'll let you know the results of sending the email from outside of php. On 7/12/07, Chris [EMAIL PROTECTED] wrote: Richard Lynch wrote: On Thu, July 12, 2007 6:33 pm, Tanner Postert wrote: I am currently running PHP 5.1.4 Fedora Core 5 i'm trying to exectute the following test script. ?php $to = '[EMAIL PROTECTED]'; $subject = 'the subject'; $message = 'body'; $headers = 'From: [EMAIL PROTECTED]' . \r\n . 'Reply-To: [EMAIL PROTECTED]' . \r\n . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ? You really ought to be getting the return value from mail() and checking it for success... Error-checking is good. :-) i have about 10 or so different virtual hosts running on this machine, and if i use any of them for the from reply-to addresses, it works fine, or even if i use domains I don't control like aol.com or example.com those work too, but one particular new virtual host doesn't work, it re-writes the from address to the default virtual host address. which is strange because that isn't in the php.ini anywhere, but it could just be taking the hostname. anyone have any ideas? As I understand it: If the PHP (read: Apache) User is not trusted in sendmail config, then sendmail won't let that user forge the return headers, and the return comes from the default set in sendmail configuration. Which is mentioned in the documentation: http://www.php.net/manual/en/function.mail.php ;) Sendmail and exim definitely have this sort of problem, I don't think postfix or qmail do though. -- Postgresql php tutorials http://www.designmagick.com/
[PHP] Re: SMS questions
What you're looking for is SMS Spoofing. Here's the first result from googling SMS Spoofing. It provides some services that let you spoof and talks about the legality of doing so http://www.answers.com/topic/sms-spoofing - Dan Brian Dunning [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all - I've been looking at a number of the commercial service providers for bulk SMS messaging, most of whom have PHP APIs. But since they are selling something they don't answer my question Is there any (legal, legitimate) way to send an SMS message that can be replied to the desired SMS cell number? Like, if I use PHP to send an SMS to Bob, can I make it appear to come from Jim's cell phone so that Bob can reply directly to Jim normally? The services all require Jim to log into their web site to read any replies. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SMS questions
Might want to retry that link, it's broken. - Dan Steve Perkins [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Richard makes some good points. Further to the original posting though, I have a friend who works with this SMS stuff, and out of interest asked him about it. Here is his (slightly scary) response, might be of some use ... His website is www.textit,biz -Original Message- From: Shaun M. Nixon Sent: 13 July 2007 09:17 To: Steve Perkins [mailto:[EMAIL PROTECTED] Subject: FW: [PHP] SMS questions Hi Steve Hope you're doing fine. It is possible. In short, you have seen how a SMS message is sent using a operators Name label i.e. the Messages says who it's from e.g. TEXT IT, but you are unable to reply because the Sender is 'Text it' and not a mobile number. Well in the same mechanism, you can send a mobile phone number as the Label. Thus allowing you to send someone a message as if it came from someone else. I guess this is what is being asked / wanted - spoofing a Mobile. It is illegal to do this without consent and you must audit / prove ownership / identity of the phone regarding the use / service (highly regulated) - it also carries great risk to the provider (e.g. 2 Million fine from ICTICS), hence most companies reluctance etc. I believe Skype have recently introduced this service (but it's expensive) if Brian wants to try it out. We can do the same if required, as too relay all reply messages via email / texts if needed. Kind Regards Shaun Nixon Principal Consultant W: www.textit.biz -Original Message- From: Steve Perkins [mailto:[EMAIL PROTECTED] Sent: 13 July 2007 01:05 To: Shaun M. Nixon Subject: FW: [PHP] SMS questions I saw this and I though of you Shaun. You have any answers ? Cheers -Original Message- From: Brian Dunning [mailto:[EMAIL PROTECTED] Sent: 13 July 2007 00:40 To: php-general@lists.php.net Subject: [PHP] SMS questions Hi all - I've been looking at a number of the commercial service providers for bulk SMS messaging, most of whom have PHP APIs. But since they are selling something they don't answer my question Is there any (legal, legitimate) way to send an SMS message that can be replied to the desired SMS cell number? Like, if I use PHP to send an SMS to Bob, can I make it appear to come from Jim's cell phone so that Bob can reply directly to Jim normally? The services all require Jim to log into their web site to read any replies. -- 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] Social Networking Sites OT
is anyone a member of linkedin Yes. I've not been hounded. I've reconnected with a couple former co-workers, and been approached (professionally) by College Classmates, but that's been all. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework
I have imagined being able to connect to a client browser and push changes to the client rather than have something sit on the client side and periodically wait for updates. or only update when the client refreshes the page manually. both of those antiquated options are ugly. the push technique discussed in this email is essentially leveraging the Observer design pattern. As i said i imagined it could be achieved via ajax, but wasnt sure on the implementation. im curious now to see it in action and pour through the Xaja code for the answer to the riddle! btw. i found myelf thinking of the pronouciation as ZahJah. -nathan On 7/13/07, Colin Guthrie [EMAIL PROTECTED] wrote: Daniel Brown wrote: And to you, yes, colourful has a U in it. Well, guess what it does for us, too! Just not in the color part, but rather the ful part. So there! D'oh! You got me there :p Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework
On Fri, 2007-07-13 at 14:28 -0400, Nathan Nobbe wrote: I have imagined being able to connect to a client browser and push changes to the client rather than have something sit on the client side and periodically wait for updates. or only update when the client refreshes the page manually. both of those antiquated options are ugly. the push technique discussed in this email is essentially leveraging the Observer design pattern. As i said i imagined it could be achieved via ajax, but wasnt sure on the implementation. im curious now to see it in action and pour through the Xaja code for the answer to the riddle! btw. i found myelf thinking of the pronouciation as ZahJah. I haven't looked at the code for Xaja and in no way do I want to subtract from its potential, but I'm going to guess that in some way it holds the HTTP connection open and as such is an expensive feature. Also, I'm not entirely sure, but isn't that the principle that Comet uses? Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework
On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote: I haven't looked at the code for Xaja and in no way do I want to subtract from its potential, but I'm going to guess that in some way it holds the HTTP connection open and as such is an expensive feature. Also, I'm not entirely sure, but isn't that the principle that Comet uses? As i said ive only imagined such a feature. In my imagination i wonder if it is possible to track the clients address in a data structure within the application. Then a connection could be established whenever a push was needed. I also think the app would have to track the last page a user requested in order to realize such an implementation. This *should* be feasible using sessions because whenever the client makes a new request the last page variable could be updated. I havent seen nor heard of Comet; would you mind providing a link? -nathan On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-07-13 at 14:28 -0400, Nathan Nobbe wrote: I have imagined being able to connect to a client browser and push changes to the client rather than have something sit on the client side and periodically wait for updates. or only update when the client refreshes the page manually. both of those antiquated options are ugly. the push technique discussed in this email is essentially leveraging the Observer design pattern. As i said i imagined it could be achieved via ajax, but wasnt sure on the implementation. im curious now to see it in action and pour through the Xaja code for the answer to the riddle! btw. i found myelf thinking of the pronouciation as ZahJah. I haven't looked at the code for Xaja and in no way do I want to subtract from its potential, but I'm going to guess that in some way it holds the HTTP connection open and as such is an expensive feature. Also, I'm not entirely sure, but isn't that the principle that Comet uses? Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ...
Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework
On Fri, 2007-07-13 at 14:59 -0400, Nathan Nobbe wrote: On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote: I haven't looked at the code for Xaja and in no way do I want to subtract from its potential, but I'm going to guess that in some way it holds the HTTP connection open and as such is an expensive feature. Also, I'm not entirely sure, but isn't that the principle that Comet uses? As i said ive only imagined such a feature. In my imagination i wonder if it is possible to track the clients address in a data structure within the application. Then a connection could be established whenever a push was needed. This isn't possible since you can't request a connection to the client's machine. Only the other way around. I also think the app would have to track the last page a user requested in order to realize such an implementation. This *should* be feasible using sessions because whenever the client makes a new request the last page variable could be updated. I havent seen nor heard of Comet; would you mind providing a link? http://ajaxian.com/archives/comet-a-new-approach-to-ajax-applications Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail function from and reply to address problem
mail function returns 1(true) whether or not i'm sending to the new virtual host domain name or any random domain name. turns out sendmail function does the same thing, so it looks like it's a sendmail problem... but how is that possible if i've never configured anything for this new domain except for http virtual host config? hmm. On 7/13/07, Tanner Postert [EMAIL PROTECTED] wrote: apache is definitely listed in the trusted users, as I mentioned, I can send from dozens of other domains, its just one specific domain that I can't. i'll let you know the results of sending the email from outside of php. On 7/12/07, Chris [EMAIL PROTECTED] wrote: Richard Lynch wrote: On Thu, July 12, 2007 6:33 pm, Tanner Postert wrote: I am currently running PHP 5.1.4 Fedora Core 5 i'm trying to exectute the following test script. ?php $to = '[EMAIL PROTECTED]'; $subject = 'the subject'; $message = 'body'; $headers = 'From: [EMAIL PROTECTED]' . \r\n . 'Reply-To: [EMAIL PROTECTED]' . \r\n . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ? You really ought to be getting the return value from mail() and checking it for success... Error-checking is good. :-) i have about 10 or so different virtual hosts running on this machine, and if i use any of them for the from reply-to addresses, it works fine, or even if i use domains I don't control like aol.com or example.com those work too, but one particular new virtual host doesn't work, it re-writes the from address to the default virtual host address. which is strange because that isn't in the php.ini anywhere, but it could just be taking the hostname. anyone have any ideas? As I understand it: If the PHP (read: Apache) User is not trusted in sendmail config, then sendmail won't let that user forge the return headers, and the return comes from the default set in sendmail configuration. Which is mentioned in the documentation: http://www.php.net/manual/en/function.mail.php ;) Sendmail and exim definitely have this sort of problem, I don't think postfix or qmail do though. -- Postgresql php tutorials http://www.designmagick.com/
Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework
On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote: This isn't possible since you can't request a connection to the client's machine. Only the other way around. hmm... in that case perhaps the open connection could be employed and the feature used selectively; only on certain pages for instance ? im thinking mainly of a monitoring page; like an app that shows a servers state, or stock quotes or something. the main reason i dont like a javascript timer refreshing the page is sometimes you dont want the whole page refreshed; especially when halfway through filling out a form on the page ;) -nathan On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-07-13 at 14:59 -0400, Nathan Nobbe wrote: On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote: I haven't looked at the code for Xaja and in no way do I want to subtract from its potential, but I'm going to guess that in some way it holds the HTTP connection open and as such is an expensive feature. Also, I'm not entirely sure, but isn't that the principle that Comet uses? As i said ive only imagined such a feature. In my imagination i wonder if it is possible to track the clients address in a data structure within the application. Then a connection could be established whenever a push was needed. This isn't possible since you can't request a connection to the client's machine. Only the other way around. I also think the app would have to track the last page a user requested in order to realize such an implementation. This *should* be feasible using sessions because whenever the client makes a new request the last page variable could be updated. I havent seen nor heard of Comet; would you mind providing a link? http://ajaxian.com/archives/comet-a-new-approach-to-ajax-applications Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ...
Re: [PHP] mail function from and reply to address problem
figured it out... the domain in question's dns is set to CNAME to the main domain on that server, whereas, the remaining domains are just using the A record with the IP. I changed one of the other domains to use the CNAME and it did the same thing. So looks like thats the culprit. I'll have to comb through the sendmail configuration and find out if I can reverse this behavior. On 7/13/07, Tanner Postert [EMAIL PROTECTED] wrote: mail function returns 1(true) whether or not i'm sending to the new virtual host domain name or any random domain name. turns out sendmail function does the same thing, so it looks like it's a sendmail problem... but how is that possible if i've never configured anything for this new domain except for http virtual host config? hmm. On 7/13/07, Tanner Postert [EMAIL PROTECTED] wrote: apache is definitely listed in the trusted users, as I mentioned, I can send from dozens of other domains, its just one specific domain that I can't. i'll let you know the results of sending the email from outside of php. On 7/12/07, Chris [EMAIL PROTECTED] wrote: Richard Lynch wrote: On Thu, July 12, 2007 6:33 pm, Tanner Postert wrote: I am currently running PHP 5.1.4 Fedora Core 5 i'm trying to exectute the following test script. ?php $to = '[EMAIL PROTECTED]'; $subject = 'the subject'; $message = 'body'; $headers = 'From: [EMAIL PROTECTED]' . \r\n . 'Reply-To: [EMAIL PROTECTED]' . \r\n . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ? You really ought to be getting the return value from mail() and checking it for success... Error-checking is good. :-) i have about 10 or so different virtual hosts running on this machine, and if i use any of them for the from reply-to addresses, it works fine, or even if i use domains I don't control like aol.com or example.com those work too, but one particular new virtual host doesn't work, it re-writes the from address to the default virtual host address. which is strange because that isn't in the php.ini anywhere, but it could just be taking the hostname. anyone have any ideas? As I understand it: If the PHP (read: Apache) User is not trusted in sendmail config, then sendmail won't let that user forge the return headers, and the return comes from the default set in sendmail configuration. Which is mentioned in the documentation: http://www.php.net/manual/en/function.mail.php ;) Sendmail and exim definitely have this sort of problem, I don't think postfix or qmail do though. -- Postgresql php tutorials http://www.designmagick.com/
[PHP] Newbie seeks urgent help
Good afternoon list, My first post here and i'm having trouble with a form: it doesn't send the input to the given e-mail address: i get a blank mail without any of the fields. Here's how it should arrive in the mailbox: Empresa: field input Contato: field input Fone: field input Fax: field input Email: field input Produto: field input Origem: field input Destino: field input Quantidade: field input Peso: field input Comprimento: field input Altura: field input Largura: field input I really appreciate the help Here's the code and the form: // Your email address $youremail = 'email adress'; // Your web site title $websitetitle = 'newbie.com'; // Path to thanks for the message page $thankyoupage = 'http://wwwContact_success1.php'; // Send notification to sender (use false if not required) $sendnotification = true; # // Do not edit below this # $contact_form_action = $_SERVER['PHP_SELF']; if ((isset($_POST[sendcontact])) ($_POST[sendcontact] == contactsent)) { $contacter_form_error = array(); if (empty($_POST['empresa_name'])){ $contacter_form_error[] = 'favor preencher nome da empresa'; } if (empty($_POST['contato_name'])){ $contacter_form_error[] = 'favor preencher nome do contato'; } if (empty($_POST['fone'])){ $contacter_form_error[] = 'favor preencher número do telefone'; } if (empty($_POST['contato_email'])){ $contacter_form_error[] = 'favor preencher seu e-mail'; } if (empty($_POST['produto'])){ $contacter_form_error[] = 'favor preencher o produto'; } if (empty($_POST['origem'])){ $contacter_form_error[] = 'favor preencher origem'; } if (empty($_POST['destino'])){ $contacter_form_error[] = 'favor preencher destino'; } if (empty($_POST['quantidade'])){ $contacter_form_error[] = 'favor preencher quantidade'; } if (empty($_POST['peso'])){ $contacter_form_error[] = 'favor preencher peso'; } if (empty($_POST['comprimento'])){ $contacter_form_error[] = 'favor preencher comprimento'; } if (empty($_POST['altura'])){ $contacter_form_error[] = 'favor preencher altura'; } if (empty($_POST['largura'])){ $contacter_form_error[] = 'favor preencher largura'; } else { $empresa_name = stripslashes($_POST['empresa_name']); $contato_email = stripslashes($_POST['contato_email']); $subjectline = $websitetitle | Mensagem de $empresa_name; mail($youremail, $subjectline, Orçamento de empresa); if($sendnotification == true) { $notification_message = Obrigado por nos contatar, $contato_name. Recebemos sua mensagem e entraremos em contato em breve; $notification_subject = Obrigado por sua mensagem para $websitetitle.; mail($contato_email, $notification_subject, $notification_message, From: $youremail); } header(Location:$thankyoupage); } } ? ? // Print form field errors if present if (count($contacter_form_error)0){ print 'p id=bottomstrongAlgo está errado:/strong/p'.\n; print 'ul'.\n; foreach($contacter_form_error as $form_err) { print li class=\error\$form_err/li\n; } print '/ul'.\n; } ? form method=post id=contactform action=? print $contact_form_action; ? div pTodos os campos obrigatórios são marcados com asteriscos (span class=required*/span)./p fieldset legendSeus Dados/legend label for=empresa_nameEmpresa span class=required*/span/label br / input type=text id=empresa_name name=empresa_name size=30 value=? print $empresa_name; ? / br / label for=contato_nameContato span class=required*/span/label br / input type=text id=contato_name name=contato_name size=30 value=? print $contato_name; ? / br / label for=foneNúmero do telefone span class=required*/span/label br / input type=text id=fone name=fone size=30 value=? print $fone; ? / br / label for=faxFax/label br / input type=fax id=fax name=fax size=30 value=? print $fax; ? / br / label for=contato_emailE-mail span class=required*/span/label br / input type=contato_email id=contato_email name=contato_email size=30 value=? print $contato_email; ? / br / label for=produtoProduto span class=required*/span/label br / input type=produto id=produto name=produto size=30 value=? print $produto; ? / br / label for=origemOrigem span class=required*/span/label br / input type=origem id=origem name=origem size=30 value=? print $origem ? /
[PHP] Alter an Array Key
Hello, Is there any easy way to alter a key's name? I would like to remove some underscores in the $_POST array keys. Thanks, OD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie seeks urgent help
On 7/13/07, Luc [EMAIL PROTECTED] wrote: Good afternoon list, My first post here and i'm having trouble with a form: it doesn't send the input to the given e-mail address: i get a blank mail without any of the fields. Here's how it should arrive in the mailbox: Empresa: field input Contato: field input Fone: field input Fax: field input Email: field input Produto: field input Origem: field input Destino: field input Quantidade: field input Peso: field input Comprimento: field input Altura: field input Largura: field input I really appreciate the help Here's the code and the form: // Your email address $youremail = 'email adress'; // Your web site title $websitetitle = 'newbie.com'; // Path to thanks for the message page $thankyoupage = 'http://wwwContact_success1.php'; // Send notification to sender (use false if not required) $sendnotification = true; # // Do not edit below this # $contact_form_action = $_SERVER['PHP_SELF']; if ((isset($_POST[sendcontact])) ($_POST[sendcontact] == contactsent)) { $contacter_form_error = array(); if (empty($_POST['empresa_name'])){ $contacter_form_error[] = 'favor preencher nome da empresa'; } if (empty($_POST['contato_name'])){ $contacter_form_error[] = 'favor preencher nome do contato'; } if (empty($_POST['fone'])){ $contacter_form_error[] = 'favor preencher número do telefone'; } if (empty($_POST['contato_email'])){ $contacter_form_error[] = 'favor preencher seu e-mail'; } if (empty($_POST['produto'])){ $contacter_form_error[] = 'favor preencher o produto'; } if (empty($_POST['origem'])){ $contacter_form_error[] = 'favor preencher origem'; } if (empty($_POST['destino'])){ $contacter_form_error[] = 'favor preencher destino'; } if (empty($_POST['quantidade'])){ $contacter_form_error[] = 'favor preencher quantidade'; } if (empty($_POST['peso'])){ $contacter_form_error[] = 'favor preencher peso'; } if (empty($_POST['comprimento'])){ $contacter_form_error[] = 'favor preencher comprimento'; } if (empty($_POST['altura'])){ $contacter_form_error[] = 'favor preencher altura'; } if (empty($_POST['largura'])){ $contacter_form_error[] = 'favor preencher largura'; } else { $empresa_name = stripslashes($_POST['empresa_name']); $contato_email = stripslashes($_POST['contato_email']); $subjectline = $websitetitle | Mensagem de $empresa_name; mail($youremail, $subjectline, Orçamento de empresa); if($sendnotification == true) { $notification_message = Obrigado por nos contatar, $contato_name. Recebemos sua mensagem e entraremos em contato em breve; $notification_subject = Obrigado por sua mensagem para $websitetitle.; mail($contato_email, $notification_subject, $notification_message, From: $youremail); } header(Location:$thankyoupage); } } ? ? // Print form field errors if present if (count($contacter_form_error)0){ print 'p id=bottomstrongAlgo está errado:/strong/p'.\n; print 'ul'.\n; foreach($contacter_form_error as $form_err) { print li class=\error\$form_err/li\n; } print '/ul'.\n; } ? form method=post id=contactform action=? print $contact_form_action; ? div pTodos os campos obrigatórios são marcados com asteriscos (span class=required*/span)./p fieldset legendSeus Dados/legend label for=empresa_nameEmpresa span class=required*/span/label br / input type=text id=empresa_name name=empresa_name size=30 value=? print $empresa_name; ? / br / label for=contato_nameContato span class=required*/span/label br / input type=text id=contato_name name=contato_name size=30 value=? print $contato_name; ? / br / label for=foneNúmero do telefone span class=required*/span/label br / input type=text id=fone name=fone size=30 value=? print $fone; ? / br / label for=faxFax/label br / input type=fax id=fax name=fax size=30 value=? print $fax; ? / br / label for=contato_emailE-mail span class=required*/span/label br / input type=contato_email id=contato_email name=contato_email size=30 value=? print $contato_email; ? / br / label for=produtoProduto span class=required*/span/label br / input type=produto id=produto name=produto size=30 value=? print $produto; ? / br / label for=origemOrigem span class=required*/span/label br / input type=origem id=origem name=origem size=30 value=? print $origem ? / br / label
Re: [PHP] Alter an Array Key
On Fri, 2007-07-13 at 15:36 -0500, OD wrote: Hello, Is there any easy way to alter a key's name? I would like to remove some underscores in the $_POST array keys. ?php foreach( $_POST as $key = $value ) { if( strpos( $key, '_' ) !== false ) { $_POST[str_replace( '_', '', $key )] = $value; unset( $_POST[$key] ); } } ? I would suggest NOT removing the original key though and just have both. To do so just comment out/remove the line that has unset(). Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] preg_replace() help
I have quotes like the following: $txt = 'A promise is a debt. -- Irish Proverb'; I'd like to replace all the spaces afer the '--' with nbsp; This is what I've tried: $pat = '/( --.*)(\s|\n)/U'; $rpl = '$1$2nbsp;'; while (preg_match($pat,$txt,$matches) 0) { print $txt\n; printf([0]: %s\n,$matches[0]); printf([1]: %s\n,$matches[1]); printf([2]: %s\n,$matches[2]); preg_replace($pat,$rpl,$txt); } The prints are for debugging. $matches contains what I expect but nothing gets replaced and $txt stays the same so it loops forever. What am I doing wrong? -- Everyone is as God has made him, and oftentimes a great deal worse. -- Miguel De Cervantes Rick Pasotto[EMAIL PROTECTED]http://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Alter an Array Key
OD wrote: Hello, Is there any easy way to alter a key's name? I would like to remove some underscores in the $_POST array keys. Thanks, OD sure use str_replace in the value of the key name string. But, that probably doesn't answer your question. Why don't you supply us with an example of how you are using the $_POST array and maybe we can give you a better solution. -- 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
Re: [PHP] preg_replace() help
Rick Pasotto wrote: I have quotes like the following: $txt = 'A promise is a debt. -- Irish Proverb'; I'd like to replace all the spaces afer the '--' with nbsp; This is what I've tried: $pat = '/( --.*)(\s|\n)/U'; $rpl = '$1$2nbsp;'; while (preg_match($pat,$txt,$matches) 0) { print $txt\n; printf([0]: %s\n,$matches[0]); printf([1]: %s\n,$matches[1]); printf([2]: %s\n,$matches[2]); preg_replace($pat,$rpl,$txt); } The prints are for debugging. $matches contains what I expect but nothing gets replaced and $txt stays the same so it loops forever. What am I doing wrong? Maybe this ?php $txt = 'A promise is a debt. -- Irish Proverb'; $parts = explode('--', $txt, 2); $parts[1] = str_replace(' ', 'nbsp;', $parts[1]); echo join('--', $parts); ? -- 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
Re: [PHP] preg_replace() help
On 7/13/07, Rick Pasotto [EMAIL PROTECTED] wrote: I have quotes like the following: $txt = 'A promise is a debt. -- Irish Proverb'; I'd like to replace all the spaces afer the '--' with nbsp; This is what I've tried: $pat = '/( --.*)(\s|\n)/U'; $rpl = '$1$2nbsp;'; while (preg_match($pat,$txt,$matches) 0) { print $txt\n; printf([0]: %s\n,$matches[0]); printf([1]: %s\n,$matches[1]); printf([2]: %s\n,$matches[2]); preg_replace($pat,$rpl,$txt); } The prints are for debugging. $matches contains what I expect but nothing gets replaced and $txt stays the same so it loops forever. What am I doing wrong? -- Everyone is as God has made him, and oftentimes a great deal worse. -- Miguel De Cervantes Rick Pasotto[EMAIL PROTECTED]http://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php If you mean that EVERY space after the -- separator should be replaced, then just try this: ? $txt = As a rule, kids with meningitis don't smile when looking at attractive faces -- not even you, Miss America, or the ravishing pharmacist I mentioned above. -- ER Questions and Answers, Part 3; function replace_space($txt) { $field = explode(--,$txt); for($i=0;$i(count($field)-1);$i++) $new_txt .= $field[$i]; $new_txt .= --.str_replace( ,nbsp;,$field[(count($field)-1)]); return $new_txt; } echo replace_space($txt).\n; ? This would print: A promise is a debt. --nbsp;Irishnbsp;Proverb Conversely, it will still properly handle the existence of double-hyphens anywhere else in the quote, but not the source. Consider this string: As a rule, kids with meningitis don't smile when looking at attractive faces -- not even you, Miss America, or the ravishing pharmacist I mentioned above. -- ER Questions and Answers, Part 3 This would still become: As a rule, kids with meningitis don't smile when looking at attractive faces -- not even you, Miss America, or the ravishing pharmacist I mentioned above. --nbsp;ERnbsp;Questionsnbsp;andnbsp;Answers,nbsp;Partnbsp;3 However, if you have double-hyphens in the source, like so: What a pain in the butt this would be! -- Me, sending an example -- to you The phrase would be printed like this: What a pain in the butt this would be! -- Me, sending an example --nbsp;tonbsp;you -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] preg_replace() help
Rick Pasotto wrote: I have quotes like the following: $txt = 'A promise is a debt. -- Irish Proverb'; I'd like to replace all the spaces afer the '--' with nbsp; This is what I've tried: $pat = '/( --.*)(\s|\n)/U'; $rpl = '$1$2nbsp;'; while (preg_match($pat,$txt,$matches) 0) { print $txt\n; printf([0]: %s\n,$matches[0]); printf([1]: %s\n,$matches[1]); printf([2]: %s\n,$matches[2]); preg_replace($pat,$rpl,$txt); } The prints are for debugging. $matches contains what I expect but nothing gets replaced and $txt stays the same so it loops forever. What am I doing wrong? What is your goal for this? -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Installation problem
Hi, I am trying to install a package using SSH because my Web-based PEAR is not working. So, I type in pear install Date. But, it only says Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Non-recoverable failure in name resolution in RPC.php on line 464 Warning: fsockopen(): unable to connect to pear.php.net:80 in RPC.php on line 464 xml_rpc_client: Connection to RPC server pear.php.net failed What do I do? Thanks
Re: [PHP] Newbie seeks urgent help
On 7/13/07, Daniel Brown [EMAIL PROTECTED] wrote: On 7/13/07, Luc [EMAIL PROTECTED] wrote: Good afternoon list, My first post here and i'm having trouble with a form: it doesn't send the input to the given e-mail address: i get a blank mail without any of the fields. Here's how it should arrive in the mailbox: Empresa: field input Contato: field input Fone: field input Fax: field input Email: field input Produto: field input Origem: field input Destino: field input Quantidade: field input Peso: field input Comprimento: field input Altura: field input Largura: field input I really appreciate the help Here's the code and the form: // Your email address $youremail = 'email adress'; // Your web site title $websitetitle = 'newbie.com'; // Path to thanks for the message page $thankyoupage = 'http://wwwContact_success1.php'; // Send notification to sender (use false if not required) $sendnotification = true; # // Do not edit below this # $contact_form_action = $_SERVER['PHP_SELF']; if ((isset($_POST[sendcontact])) ($_POST[sendcontact] == contactsent)) { $contacter_form_error = array(); if (empty($_POST['empresa_name'])){ $contacter_form_error[] = 'favor preencher nome da empresa'; } if (empty($_POST['contato_name'])){ $contacter_form_error[] = 'favor preencher nome do contato'; } if (empty($_POST['fone'])){ $contacter_form_error[] = 'favor preencher número do telefone'; } if (empty($_POST['contato_email'])){ $contacter_form_error[] = 'favor preencher seu e-mail'; } if (empty($_POST['produto'])){ $contacter_form_error[] = 'favor preencher o produto'; } if (empty($_POST['origem'])){ $contacter_form_error[] = 'favor preencher origem'; } if (empty($_POST['destino'])){ $contacter_form_error[] = 'favor preencher destino'; } if (empty($_POST['quantidade'])){ $contacter_form_error[] = 'favor preencher quantidade'; } if (empty($_POST['peso'])){ $contacter_form_error[] = 'favor preencher peso'; } if (empty($_POST['comprimento'])){ $contacter_form_error[] = 'favor preencher comprimento'; } if (empty($_POST['altura'])){ $contacter_form_error[] = 'favor preencher altura'; } if (empty($_POST['largura'])){ $contacter_form_error[] = 'favor preencher largura'; } else { $empresa_name = stripslashes($_POST['empresa_name']); $contato_email = stripslashes($_POST['contato_email']); $subjectline = $websitetitle | Mensagem de $empresa_name; mail($youremail, $subjectline, Orçamento de empresa); if($sendnotification == true) { $notification_message = Obrigado por nos contatar, $contato_name. Recebemos sua mensagem e entraremos em contato em breve; $notification_subject = Obrigado por sua mensagem para $websitetitle.; mail($contato_email, $notification_subject, $notification_message, From: $youremail); } header(Location:$thankyoupage); } } ? ? // Print form field errors if present if (count($contacter_form_error)0){ print 'p id=bottomstrongAlgo está errado:/strong/p'.\n; print 'ul'.\n; foreach($contacter_form_error as $form_err) { print li class=\error\$form_err/li\n; } print '/ul'.\n; } ? form method=post id=contactform action=? print $contact_form_action; ? div pTodos os campos obrigatórios são marcados com asteriscos (span class=required*/span)./p fieldset legendSeus Dados/legend label for=empresa_nameEmpresa span class=required*/span/label br / input type=text id=empresa_name name=empresa_name size=30 value=? print $empresa_name; ? / br / label for=contato_nameContato span class=required*/span/label br / input type=text id=contato_name name=contato_name size=30 value=? print $contato_name; ? / br / label for=foneNúmero do telefone span class=required*/span/label br / input type=text id=fone name=fone size=30 value=? print $fone; ? / br / label for=faxFax/label br / input type=fax id=fax name=fax size=30 value=? print $fax; ? / br / label for=contato_emailE-mail span class=required*/span/label br / input type=contato_email id=contato_email name=contato_email size=30 value=? print $contato_email; ? / br / label for=produtoProduto span class=required*/span/label br / input type=produto id=produto name=produto size=30
Re: [PHP] Installation problem
On 7/13/07, William Sang Lee [EMAIL PROTECTED] wrote: Hi, I am trying to install a package using SSH because my Web-based PEAR is not working. So, I type in pear install Date. But, it only says Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Non-recoverable failure in name resolution in RPC.php on line 464 Warning: fsockopen(): unable to connect to pear.php.net:80 in RPC.php on line 464 xml_rpc_client: Connection to RPC server pear.php.net failed What do I do? Thanks You seem to have a problem with the DNS server of your server, does: ping pear.php.net give you the IP address of a pear server or does it fail? 90% sure that it will fail, and probably because there's a wrong configuration setting for DNS. (DNS is for hostname- IP conversion). If you can't fix the DNS, you can always modify RPC.php, to change pear.php.net to 216.92.131.66, which is the IP if I ping pear.php.net. Note that this isn't a fix, but only a workaround, and the IP of the pear server might change someday and then your stuck with the old IP. So really try to fix the DNS problem.. Tijnema -- Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework
On 7/13/07, Nathan Nobbe [EMAIL PROTECTED] wrote: On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote: This isn't possible since you can't request a connection to the client's machine. Only the other way around. hmm... in that case perhaps the open connection could be employed and the feature used selectively; only on certain pages for instance ? im thinking mainly of a monitoring page; like an app that shows a servers state, or stock quotes or something. the main reason i dont like a javascript timer refreshing the page is sometimes you dont want the whole page refreshed; especially when halfway through filling out a form on the page ;) -nathan Well, that's why AJAX is there, you do a check to a server to see if there's any new data to parse, if so, then you update (and probably only one or two divs on your site, and not the whole page) Keeping connection open isn't quite bad for sites that are visited a lot, as for each connection, a new port is opened to handle a client connection. While you think you're connected to port 80, it is actually redirected to another port (mostly from 3000 onwards). So, if you have a lot of visiters, you might reach the limit of ports, 65536 (0-65535). Some of them are already in use, so you end up to have a limit of about 65530 connections to keep open. For a normal site this isn't a problem, but if you count on shared hosts, with let's say 20 sites, then they can all handle about 3200 connections. Half of the users has probably more then one window open, which means another connection. So you end up to have a maximum of about 2000 visiters at same time for each site. Tijnema On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-07-13 at 14:59 -0400, Nathan Nobbe wrote: On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote: I haven't looked at the code for Xaja and in no way do I want to subtract from its potential, but I'm going to guess that in some way it holds the HTTP connection open and as such is an expensive feature. Also, I'm not entirely sure, but isn't that the principle that Comet uses? As i said ive only imagined such a feature. In my imagination i wonder if it is possible to track the clients address in a data structure within the application. Then a connection could be established whenever a push was needed. This isn't possible since you can't request a connection to the client's machine. Only the other way around. I also think the app would have to track the last page a user requested in order to realize such an implementation. This *should* be feasible using sessions because whenever the client makes a new request the last page variable could be updated. I havent seen nor heard of Comet; would you mind providing a link? http://ajaxian.com/archives/comet-a-new-approach-to-ajax-applications Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Social Networking Sites OT
On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote: On Thu, 2007-07-12 at 23:51 -0500, Richard Lynch wrote: It's gotten to the point where I pretty much view social networking sites as just another form of spammers... I blogged about it, and would like feedback from members of this lists, for various reasons I would hope would be obvious. PLEASE put responses in my blog, or your blog, or whatever, but not here, as I'm sure this thread could be quite annoying as it has minimal to zero concrete PHP content. http://richardlynch.blogspot.com/ I didn't feel like logging in so I'll post my comment here: I agree with you ;) logging is too much :-P The whole idea behind a social network is that you can socially network... as such inviting your friends is a great approach. I use facebook and from time to time I do indeed invite my friends. The problem you are experiencing is abuse of the feature. You have entities outside of what you would call friends that are hitting you up for a connection. The solution to this really should be the opportunity to register your address with the social network such that you will no longer receive requests. Cheers, Rob. I get invites from a lot of friends, but the problem is they all come from different sites (hyves, facebook, some dutch sites,...) I don't like to keep all of these sites up to date with my daily life etc., so I decided to NOT to join any of these social networking sites. The problem is, that most people on the sites I saw were only trying to get the most friends, most friends were even people they didn't know anything about. For me, No join, No Social Networking Friends, no spam :) Tijnema -- Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail function from and reply to address problem
On 7/13/07, Tanner Postert [EMAIL PROTECTED] wrote: figured it out... the domain in question's dns is set to CNAME to the main domain on that server, whereas, the remaining domains are just using the A record with the IP. I changed one of the other domains to use the CNAME and it did the same thing. So looks like thats the culprit. I'll have to comb through the sendmail configuration and find out if I can reverse this behavior. Sendmail has a usenet newsgroup (comp.mail.sendmail), where you might be able to find someone that can help you :) Tijnema On 7/13/07, Tanner Postert [EMAIL PROTECTED] wrote: mail function returns 1(true) whether or not i'm sending to the new virtual host domain name or any random domain name. turns out sendmail function does the same thing, so it looks like it's a sendmail problem... but how is that possible if i've never configured anything for this new domain except for http virtual host config? hmm. On 7/13/07, Tanner Postert [EMAIL PROTECTED] wrote: apache is definitely listed in the trusted users, as I mentioned, I can send from dozens of other domains, its just one specific domain that I can't. i'll let you know the results of sending the email from outside of php. On 7/12/07, Chris [EMAIL PROTECTED] wrote: Richard Lynch wrote: On Thu, July 12, 2007 6:33 pm, Tanner Postert wrote: I am currently running PHP 5.1.4 Fedora Core 5 i'm trying to exectute the following test script. ?php $to = '[EMAIL PROTECTED]'; $subject = 'the subject'; $message = 'body'; $headers = 'From: [EMAIL PROTECTED]' . \r\n . 'Reply-To: [EMAIL PROTECTED]' . \r\n . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ? You really ought to be getting the return value from mail() and checking it for success... Error-checking is good. :-) i have about 10 or so different virtual hosts running on this machine, and if i use any of them for the from reply-to addresses, it works fine, or even if i use domains I don't control like aol.com or example.com those work too, but one particular new virtual host doesn't work, it re-writes the from address to the default virtual host address. which is strange because that isn't in the php.ini anywhere, but it could just be taking the hostname. anyone have any ideas? As I understand it: If the PHP (read: Apache) User is not trusted in sendmail config, then sendmail won't let that user forge the return headers, and the return comes from the default set in sendmail configuration. Which is mentioned in the documentation: http://www.php.net/manual/en/function.mail.php ;) Sendmail and exim definitely have this sort of problem, I don't think postfix or qmail do though. -- Postgresql php tutorials http://www.designmagick.com/ -- Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail function from and reply to address problem
thanks, thats exactly where I went. looks like i'm on the right track. On 7/13/07, Tijnema [EMAIL PROTECTED] wrote: On 7/13/07, Tanner Postert [EMAIL PROTECTED] wrote: figured it out... the domain in question's dns is set to CNAME to the main domain on that server, whereas, the remaining domains are just using the A record with the IP. I changed one of the other domains to use the CNAME and it did the same thing. So looks like thats the culprit. I'll have to comb through the sendmail configuration and find out if I can reverse this behavior. Sendmail has a usenet newsgroup (comp.mail.sendmail), where you might be able to find someone that can help you :) Tijnema On 7/13/07, Tanner Postert [EMAIL PROTECTED] wrote: mail function returns 1(true) whether or not i'm sending to the new virtual host domain name or any random domain name. turns out sendmail function does the same thing, so it looks like it's a sendmail problem... but how is that possible if i've never configured anything for this new domain except for http virtual host config? hmm. On 7/13/07, Tanner Postert [EMAIL PROTECTED] wrote: apache is definitely listed in the trusted users, as I mentioned, I can send from dozens of other domains, its just one specific domain that I can't. i'll let you know the results of sending the email from outside of php. On 7/12/07, Chris [EMAIL PROTECTED] wrote: Richard Lynch wrote: On Thu, July 12, 2007 6:33 pm, Tanner Postert wrote: I am currently running PHP 5.1.4 Fedora Core 5 i'm trying to exectute the following test script. ?php $to = '[EMAIL PROTECTED]'; $subject = 'the subject'; $message = 'body'; $headers = 'From: [EMAIL PROTECTED]' . \r\n . 'Reply-To: [EMAIL PROTECTED]' . \r\n . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ? You really ought to be getting the return value from mail() and checking it for success... Error-checking is good. :-) i have about 10 or so different virtual hosts running on this machine, and if i use any of them for the from reply-to addresses, it works fine, or even if i use domains I don't control like aol.com or example.com those work too, but one particular new virtual host doesn't work, it re-writes the from address to the default virtual host address. which is strange because that isn't in the php.ini anywhere, but it could just be taking the hostname. anyone have any ideas? As I understand it: If the PHP (read: Apache) User is not trusted in sendmail config, then sendmail won't let that user forge the return headers, and the return comes from the default set in sendmail configuration. Which is mentioned in the documentation: http://www.php.net/manual/en/function.mail.php ;) Sendmail and exim definitely have this sort of problem, I don't think postfix or qmail do though. -- Postgresql php tutorials http://www.designmagick.com/ -- Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info
[PHP] Multiple Session Buffers
Is there a way to instigate 2 separate named session buffers? They will contain different data. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Newbie seeks urgent help
Hello Daniel, Friday, July 13, 2007, 5:50:53 PM, you wrote: In your code, all you have is this: Unfortunately it doesn't work, probably because of my lack of php skills :-) I copied and paste your solution as follows: ? // Your email address $youremail = 'mail adres'; // Your web site title $websitetitle = 'John Doe's Site'; // Path to thanks for the message page $thankyoupage = './Contact_success1.php'; // Send notification to sender (use false if not required) $sendnotification = true; $subjectline = Orçamento de empresa; $body =EOB Empresa: $_POST['empresa_name'] Contato: $_POST['contato_name'] Fone: $_POST['fone'] Fax: $_POST['fax'] Email: $_POST['email'] Produto: $_POST['produto'] Origem: $_POST['origem'] Destino: $_POST['destino'] Quantidade: $_POST['quantidade'] Peso: $_POST['peso'] Comprimento: $_POST['comprimento'] Altura: $_POST['altura'] Largura: $_POST['largura'] EOB; $from = [EMAIL PROTECTED]; $headers = From: .$from.\r\n; $headers .= X-Mailer: Dan Brown, pilotpig.net\r\n; mail($youremail,$subjectline,$body,$headers); // Continue with your error checking, output of form, et cetera. $contact_form_action = $_SERVER['PHP_SELF']; if ((isset($_POST[sendcontact])) ($_POST[sendcontact] == contactsent)) { $contacter_form_error = array(); if (empty($_POST['empresa_name'])){ $contacter_form_error[] = 'favor preencher nome da empresa'; } if (empty($_POST['contato_name'])){ $contacter_form_error[] = 'favor preencher nome do contato'; } if (empty($_POST['fone'])){ $contacter_form_error[] = 'favor preencher número do telefone'; } if (empty($_POST['contato_email'])){ $contacter_form_error[] = 'favor preencher seu e-mail'; } if (empty($_POST['produto'])){ $contacter_form_error[] = 'favor preencher o produto'; } if (empty($_POST['origem'])){ $contacter_form_error[] = 'favor preencher origem'; } if (empty($_POST['destino'])){ $contacter_form_error[] = 'favor preencher destino'; } if (empty($_POST['quantidade'])){ $contacter_form_error[] = 'favor preencher quantidade'; } if (empty($_POST['peso'])){ $contacter_form_error[] = 'favor preencher peso'; } if (empty($_POST['comprimento'])){ $contacter_form_error[] = 'favor preencher comprimento'; } if (empty($_POST['altura'])){ $contacter_form_error[] = 'favor preencher altura'; } if (empty($_POST['largura'])){ $contacter_form_error[] = 'favor preencher largura'; } else { $empresa_name = stripslashes($_POST['empresa_name']); $contato_email = stripslashes($_POST['contato_email']); $subjectline = $websitetitle | Mensagem de $empresa_name; if($sendnotification == true) { $notification_message = Obrigado por nos contatar, $contato_name. Recebemos sua mensagem e entraremos em contato em breve; $notification_subject = Obrigado por sua mensagem para $websitetitle.; mail($contato_email, $notification_subject, $notification_message, From: $youremail); } header(Location:$thankyoupage); } } ? which gives the following error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in / on line 14 -- Best regards, Luc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] Newbie seeks urgent help
On 7/14/07, Luc [EMAIL PROTECTED] wrote: Hello Daniel, Friday, July 13, 2007, 5:50:53 PM, you wrote: In your code, all you have is this: Unfortunately it doesn't work, probably because of my lack of php skills :-) I copied and paste your solution as follows: ? // Your email address $youremail = 'mail adres'; // Your web site title $websitetitle = 'John Doe's Site'; You're using a ' here, which ends the string. Use one of these: $websitetitle = John Doe's Site; OR $websitetitle = 'John Doe\'s Site'; Just a matter of preference ;) // Path to thanks for the message page $thankyoupage = './Contact_success1.php'; // Send notification to sender (use false if not required) $sendnotification = true; $subjectline = Orçamento de empresa; $body =EOB Empresa: $_POST['empresa_name'] Contato: $_POST['contato_name'] Fone: $_POST['fone'] Fax: $_POST['fax'] Email: $_POST['email'] Produto: $_POST['produto'] Origem: $_POST['origem'] Destino: $_POST['destino'] Quantidade: $_POST['quantidade'] Peso: $_POST['peso'] Comprimento: $_POST['comprimento'] Altura: $_POST['altura'] Largura: $_POST['largura'] EOB; $from = [EMAIL PROTECTED]; $headers = From: .$from.\r\n; $headers .= X-Mailer: Dan Brown, pilotpig.net\r\n; mail($youremail,$subjectline,$body,$headers); // Continue with your error checking, output of form, et cetera. $contact_form_action = $_SERVER['PHP_SELF']; if ((isset($_POST[sendcontact])) ($_POST[sendcontact] == contactsent)) { $contacter_form_error = array(); if (empty($_POST['empresa_name'])){ $contacter_form_error[] = 'favor preencher nome da empresa'; } if (empty($_POST['contato_name'])){ $contacter_form_error[] = 'favor preencher nome do contato'; } if (empty($_POST['fone'])){ $contacter_form_error[] = 'favor preencher número do telefone'; } if (empty($_POST['contato_email'])){ $contacter_form_error[] = 'favor preencher seu e-mail'; } if (empty($_POST['produto'])){ $contacter_form_error[] = 'favor preencher o produto'; } if (empty($_POST['origem'])){ $contacter_form_error[] = 'favor preencher origem'; } if (empty($_POST['destino'])){ $contacter_form_error[] = 'favor preencher destino'; } if (empty($_POST['quantidade'])){ $contacter_form_error[] = 'favor preencher quantidade'; } if (empty($_POST['peso'])){ $contacter_form_error[] = 'favor preencher peso'; } if (empty($_POST['comprimento'])){ $contacter_form_error[] = 'favor preencher comprimento'; } if (empty($_POST['altura'])){ $contacter_form_error[] = 'favor preencher altura'; } if (empty($_POST['largura'])){ $contacter_form_error[] = 'favor preencher largura'; } else { $empresa_name = stripslashes($_POST['empresa_name']); $contato_email = stripslashes($_POST['contato_email']); $subjectline = $websitetitle | Mensagem de $empresa_name; if($sendnotification == true) { $notification_message = Obrigado por nos contatar, $contato_name. Recebemos sua mensagem e entraremos em contato em breve; $notification_subject = Obrigado por sua mensagem para $websitetitle.; mail($contato_email, $notification_subject, $notification_message, From: $youremail); } header(Location:$thankyoupage); } } ? which gives the following error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in / on line 14 -- Best regards, Luc It's defenitely not line 14, but you probably snipped some stuff out of it ;) Tijnema -- Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP scripts with shebang line: Questions
Hi, i want to question about shebang line on FreeBSD6. This script works on FreeBSD4, but doesn't work on FreeBSD6 #!/usr/local/bin/php -d open_basedir=/path ?php file('/path/sample.txt'); ? i understood the reason from this pages. http://freebsd.monkey.org/freebsd-questions/200606/msg01073.html http://www.in-ulm.de/~mascheck/various/shebang/ i removed the space between '-d' and my config, and this script worked. #!/usr/local/bin/php -dopen_basedir=/path However i don't understand how i should appoint two options. This script doesn't work. #!/usr/local/bin/php -dopen_basedir=/path -dshort_open_tag=off This is a solution for only FreeBSD6. (it doesn't work on FreeBSD4) #!/usr/bin/env -S /usr/local/bin/php -d open_basedir=/path -d short_open_tag=off i want to know the solution that is suitable for both FreeBSD4 and FreeBSD6. Give me please good advice. Thanks, Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[4]: [PHP] Newbie seeks urgent help
Hello Tijnema, Friday, July 13, 2007, 10:09:05 PM, you wrote: You're using a ' here, which ends the string. Use one of these: $websitetitle = John Doe's Site; OR $websitetitle = 'John Doe\'s Site'; Just a matter of preference ;) Thanks Tijnema But still get: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in / on line 14 So i still don't have a clue what i could have snipped and if i have everything in the correct order. -- Best regards, Luc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[4]: [PHP] Newbie seeks urgent help
On 7/14/07, Luc [EMAIL PROTECTED] wrote: Hello Tijnema, Friday, July 13, 2007, 10:09:05 PM, you wrote: You're using a ' here, which ends the string. Use one of these: $websitetitle = John Doe's Site; OR $websitetitle = 'John Doe\'s Site'; Just a matter of preference ;) Thanks Tijnema But still get: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in / on line 14 So i still don't have a clue what i could have snipped and if i have everything in the correct order. -- Best regards, Luc You must have some unclosed single quote ( ' ) somewhere, on one of these lines probably: $youremail = $websitetitle = $thankyoupage = For test, leave all of them empty and see if the error is still popping up, if not, fill them back in one by one and see which one causes the error, OR Use a IDE (like Adobe Dreamweaver), and with the color coding you'll see directly where the fault is :) Tijnema ps. This is my last reply for today, as it is 3:45 AM here ;) Just try some things... -- Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Strange output using include()/require()
Hello, I'm new to this newsgroup so I hope this is the right place to ask for help. I have a script that starts with the following lines: Line1: require_once 'config.php'; Line2: require_once 'common.php'; Line3: require_once 'HTTP/Request.php'; However, when I run it on the browser, where line 1-2 is, I'll see the following output  That's two times  So it only affects both config.php and common.php. I can't seem to figure out what's wrong with both files (they contain constants and a couple functions) since it does not affect HTTP_Request (from PEAR) at all. I hope that makes sense. Any help is appreciated. Thanks! -m. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework
On 7/13/07, Tijnema [EMAIL PROTECTED] wrote: Well, that's why AJAX is there, you do a check to a server to see if there's any new data to parse, if so, then you update (and probably only one or two divs on your site, and not the whole page) I understand the use of AJAX to only update a subset of the DOM on a page, rather than rebuild the entire page. What i was getting at though is eliminating the busy-wait model by using the Observer pattern to push changes to the client only when the data has changed on the server side. This is decidedly more efficient in general and is more commonly referred to as *event driven programming* or *data driven programming*. it sounds like the only way to implement such a model over HTTP is by keeping the connection open; which in some circumstances may be appropriate. I have to say though, I never thought of using busy waiting to update just a portion of the DOM. It seems like almost a no-brainier, but since i havent worked w/ AJAX much it just never crossed my mind. That sounds like the most practical approach in general. -nathan On 7/13/07, Tijnema [EMAIL PROTECTED] wrote: On 7/13/07, Nathan Nobbe [EMAIL PROTECTED] wrote: On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote: This isn't possible since you can't request a connection to the client's machine. Only the other way around. hmm... in that case perhaps the open connection could be employed and the feature used selectively; only on certain pages for instance ? im thinking mainly of a monitoring page; like an app that shows a servers state, or stock quotes or something. the main reason i dont like a javascript timer refreshing the page is sometimes you dont want the whole page refreshed; especially when halfway through filling out a form on the page ;) -nathan Well, that's why AJAX is there, you do a check to a server to see if there's any new data to parse, if so, then you update (and probably only one or two divs on your site, and not the whole page) Keeping connection open isn't quite bad for sites that are visited a lot, as for each connection, a new port is opened to handle a client connection. While you think you're connected to port 80, it is actually redirected to another port (mostly from 3000 onwards). So, if you have a lot of visiters, you might reach the limit of ports, 65536 (0-65535). Some of them are already in use, so you end up to have a limit of about 65530 connections to keep open. For a normal site this isn't a problem, but if you count on shared hosts, with let's say 20 sites, then they can all handle about 3200 connections. Half of the users has probably more then one window open, which means another connection. So you end up to have a maximum of about 2000 visiters at same time for each site. Tijnema On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-07-13 at 14:59 -0400, Nathan Nobbe wrote: On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote: I haven't looked at the code for Xaja and in no way do I want to subtract from its potential, but I'm going to guess that in some way it holds the HTTP connection open and as such is an expensive feature. Also, I'm not entirely sure, but isn't that the principle that Comet uses? As i said ive only imagined such a feature. In my imagination i wonder if it is possible to track the clients address in a data structure within the application. Then a connection could be established whenever a push was needed. This isn't possible since you can't request a connection to the client's machine. Only the other way around. I also think the app would have to track the last page a user requested in order to realize such an implementation. This *should* be feasible using sessions because whenever the client makes a new request the last page variable could be updated. I havent seen nor heard of Comet; would you mind providing a link? http://ajaxian.com/archives/comet-a-new-approach-to-ajax-applications Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info
Re[6]: [PHP] Newbie seeks urgent help
Hello Tijnema, Friday, July 13, 2007, 10:45:48 PM, you wrote: You must have some unclosed single quote ( ' ) somewhere, on one of these lines probably: $youremail = $websitetitle = $thankyoupage = Found the problem :-) in the block: $body =EOB Empresa: $_POST[empresa_name] Contato: $_POST[contato_name] Fone: $_POST[fone] Fax: $_POST[fax] Email: $_POST[email] Produto: $_POST[produto] Origem: $_POST[origem] Destino: $_POST[destino] Quantidade: $_POST[quantidade] Peso: $_POST[peso] Comprimento: $_POST[comprimento] Altura: $_POST[altura] Largura: $_POST[largura] EOB; i had the names between [ ] with a ' ', so i removed the ' and it worked. Now i still have 2 problems: 1) the email of the sender is left blank: Empresa: LUC Contato: LUC Fone: 909 Fax: 90°0 Email: Produto: UIOU Origem: IUIIO Destino: IIOP Quantidade: OIOIOP Peso: IPOIOP Comprimento: OIOI Altura: POIIPO Largura: IPOO 2) the return mail to the sender also leaves his name blank: Obrigado por nos contatar,here should be the name of the contact . Recebemos sua mensagem e entraremos em contato em breve -- Best regards, Luc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strange output using include()/require()
That's UTF-8 Open it in a Unicode File Editor Change it from ANSI to UTF-8 and back to ANSI and then resave and it will go away On 7/13/07, melz [EMAIL PROTECTED] wrote: Hello, I'm new to this newsgroup so I hope this is the right place to ask for help. I have a script that starts with the following lines: Line1: require_once 'config.php'; Line2: require_once 'common.php'; Line3: require_once 'HTTP/Request.php'; However, when I run it on the browser, where line 1-2 is, I'll see the following output  That's two times  So it only affects both config.php and common.php. I can't seem to figure out what's wrong with both files (they contain constants and a couple functions) since it does not affect HTTP_Request (from PEAR) at all. I hope that makes sense. Any help is appreciated. Thanks! -m. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Phoenix Edge Network L.L.C. - Owner PHPLogic Development Services – Co-Owner Anton C. Swartz IV Based in Indianapolis, IN The Opposite of war is not Peace it is Creation. Don't let sin rule your body. After all, your body is bound to die, so dont obey its desires or let any part of it become slave to evil. Give yourselves to God, as people who have been raised from death to life. Make every part of your body a slavethat pleases God. Don't let sin keep ruling your lives.You are ruled by God's Kindness and not by the law. Romans 6:12-14
Re: Re[6]: [PHP] Newbie seeks urgent help
On 7/14/07, Luc [EMAIL PROTECTED] wrote: Hello Tijnema, Friday, July 13, 2007, 10:45:48 PM, you wrote: You must have some unclosed single quote ( ' ) somewhere, on one of these lines probably: $youremail = $websitetitle = $thankyoupage = Found the problem :-) in the block: $body =EOB Empresa: $_POST[empresa_name] Contato: $_POST[contato_name] Fone: $_POST[fone] Fax: $_POST[fax] Email: $_POST[email] Produto: $_POST[produto] Origem: $_POST[origem] Destino: $_POST[destino] Quantidade: $_POST[quantidade] Peso: $_POST[peso] Comprimento: $_POST[comprimento] Altura: $_POST[altura] Largura: $_POST[largura] EOB; i had the names between [ ] with a ' ', so i removed the ' and it worked. Now i still have 2 problems: 1) the email of the sender is left blank: Empresa: LUC Contato: LUC Fone: 909 Fax: 90°0 Email: Produto: UIOU Origem: IUIIO Destino: IIOP Quantidade: OIOIOP Peso: IPOIOP Comprimento: OIOI Altura: POIIPO Largura: IPOO 2) the return mail to the sender also leaves his name blank: Obrigado por nos contatar,here should be the name of the contact . Recebemos sua mensagem e entraremos em contato em breve -- Best regards, Luc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Isn't the sender's Email $contacto_email ? if($sendnotification == true) { $notification_message = Obrigado por nos contatar, $contato_name. Recebemos sua mensagem e entraremos em contato em breve; $notification_subject = Obrigado por sua mensagem para $websitetitle.; mail($contato_email, $notification_subject, $notification_message, From: $youremail);4 -- Phoenix Edge Network L.L.C. - Owner PHPLogic Development Services – Co-Owner Anton C. Swartz IV Based in Indianapolis, IN The Opposite of war is not Peace it is Creation. Don't let sin rule your body. After all, your body is bound to die, so dont obey its desires or let any part of it become slave to evil. Give yourselves to God, as people who have been raised from death to life. Make every part of your body a slavethat pleases God. Don't let sin keep ruling your lives.You are ruled by God's Kindness and not by the law. Romans 6:12-14
Re: [PHP] Strange output using include()/require()
DJ Necrogami wrote: That's UTF-8 Open it in a Unicode File Editor Change it from ANSI to UTF-8 and back to ANSI and then resave and it will go away Thanks! What a silly mistake I did. -m. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP scripts with shebang line: Questions
AFAICS, this is a FreeBSD question... That said, you could have a work-around where you put your 2 -d settings into a single php.mini :-) file and then use one -c to pull that in... On Fri, July 13, 2007 8:23 pm, sone gone wrote: Hi, i want to question about shebang line on FreeBSD6. This script works on FreeBSD4, but doesn't work on FreeBSD6 #!/usr/local/bin/php -d open_basedir=/path ?php file('/path/sample.txt'); ? i understood the reason from this pages. http://freebsd.monkey.org/freebsd-questions/200606/msg01073.html http://www.in-ulm.de/~mascheck/various/shebang/ i removed the space between '-d' and my config, and this script worked. #!/usr/local/bin/php -dopen_basedir=/path However i don't understand how i should appoint two options. This script doesn't work. #!/usr/local/bin/php -dopen_basedir=/path -dshort_open_tag=off This is a solution for only FreeBSD6. (it doesn't work on FreeBSD4) #!/usr/bin/env -S /usr/local/bin/php -d open_basedir=/path -d short_open_tag=off i want to know the solution that is suitable for both FreeBSD4 and FreeBSD6. Give me please good advice. Thanks, Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Session Buffers
On Fri, July 13, 2007 6:20 pm, Al wrote: Is there a way to instigate 2 separate named session buffers? They will contain different data. I don't see how you could, since you'll be changing the contents of $_SESSION which doesn't let you specify which of the two you are messing with... You could maybe do something like: ?php //session #1 session_set_cookie_params(...); session_start(); //change $_SESSION session_write_close(); //session #2 session_set_cookie_params(...); session_start(); //change $_SESSION session_write_close(); ? But it's an awful lot of discipline to organize your code like that... What might be easier would be to have a common session, but store all the data sensibly so that the division is in $_SESSION data, rather than actual separate sessions. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] preg_replace() help
On Fri, July 13, 2007 3:52 pm, Rick Pasotto wrote: I have quotes like the following: $txt = 'A promise is a debt. -- Irish Proverb'; I'd like to replace all the spaces afer the '--' with nbsp; This is what I've tried: $pat = '/( --.*)(\s|\n)/U'; You might want to use \\s and \\n, so you are 100% clear that the PHP strings have a single \ in them, and that they don't have a newline. The .* is probably messing you up... You could probably manage this with some kind of preg_replace_callback, but it seems to me it would be easier to do: $txt = 'A promise is a debt. -- Irish Proverb'; $pos = strpos($txt, '--'); $html = substr($txt, 0, $pos) . '--' . str_replace(' ', 'nbsp;', substr($txt, $pos + 2)); -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Alter an Array Key
On Fri, July 13, 2007 3:36 pm, OD wrote: Hello, Is there any easy way to alter a key's name? I would like to remove some underscores in the $_POST array keys. Not directly, but: $post = array(); foreach($_POST as $k = $v){ $k = str_replace('_', ' ', $k); $post[$k] = $v; } You could dink with unset instead, but it's a Bad Idea to alter what is actually in $_POST, imho. And you also don't really want to add new elements to an array while you iterate through it, generally... Though I think maybe foreach does the right thing with that. Better to build a new array and put the stuff you want into that. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP short tags: Questions
On Fri, July 13, 2007 8:54 am, Daniel Brown wrote: To my knowledge (and even a quick peek at http://www.php.net/ini.core), there is no indication that short_open_tags is deprecated, nor that it's been on the verge of removal at any point. I don't want to start a flame war, but it sounds like you've been given some bad information. In fact, removing the short_open_tags core directive would not only cause probably more than half of existing scripts to break (that's just an educated guess, of course), but would also completely eradicate the PHP core feature of shorthand output: You must have missed this: http://php.net/~derick/meeting-notes.html#remove-support-for-and-script-language-php-and-add-php-var This is at least one major PHP Dev Team meeting where remove short open tags was on the table... I do not know of the current status of this topic. This meeting was almost 2 years ago. The conclusion in the above URL should not be considered current, much less final. ?php echo This is output.\n; ? versus: ?=This is output.\n? Also note that, with shorthand output, the echoed output does not need a semicolon at the end if it's a single line. I generally do it out of habit, but for the purpose of illustration here, I omitted the semicolon. Additionally, a disclaimer should be made in favor of the anti-short_open_tags people, where the three lines can safely coexist on one. The omission of the semi-colon is not related in any way, shape, or form to the short open tag. It works completely independently of that. It also is completely irrelevant how many lines you use to type the code, nor how many lines of PHP there are. This is perfectly valid code: ?php echo 'foo' ? I do not foresee this feature disappearing, personally, but I'm not involved in making that decision. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strange output using include()/require()
DJ Necrogami wrote: That's UTF-8 Open it in a Unicode File Editor Change it from ANSI to UTF-8 and back to ANSI and then resave and it will go away Incidently, is there no way that I could keep all my files as UTF-8 and not have that encoding problem? I just realized one of my config files store some international characters and I need to keep them that way. I tried saving all 3 files into UTF-8 but the issue persists, so I'm assuming it doesn't work with UTF-8 files? Thanks for your help. -m. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php