Re: [PHP] Exporting text with chinese characters in CSV

2009-03-27 Thread Michael Shadle
The php script language has no bearing on the output unless you have characters In the php file itself. We had some issue like this at work. They found a way using iconv to to it but had to change because redhats iconv isn't updated. They do something with saving the output to a utf8 encode

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-08 Thread Michael Shadle
i think it should also be fully utf-8 capable. saveHTML is not for me right now, and i have to run some preg_replace to remove the etc chunks, and the output is not utf-8, even though the input is. i got a workaround using html_decode_entities() or something like that but i haven't ran it to see

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-08 Thread Michael Shadle
On Wed, Apr 8, 2009 at 8:58 PM, Michael A. Peters wrote: > Yes it should - I believe php 6 is suppose to be much better at native UTF8. > At least according to some blog I read somewhere (IE don't believe me > without reservation, it's third hand knowledge at best) afaik you're right, it's suppo

Re: [PHP] convert video files to FLV

2009-04-08 Thread Michael Shadle
On Wed, Apr 8, 2009 at 10:30 PM, Gevorg Harutyunyan wrote: > Hi, > > I need to convert video files to FLV using php. > > The only solution that I found is to use ffmpeg, but because I am using > shared hosting I am not allowed to install it on server. > Do you know any other ways to convert any vi

Re: [PHP] convert video files to FLV

2009-04-08 Thread Michael Shadle
On Wed, Apr 8, 2009 at 10:33 PM, Adrian wrote: > Don't waste CPU power of shared servers for video recoding. > If you need that, get a dedicated server without other customers who > would probably be affected by you using lots of cpu power. > > Besides that, if you cannot install own (compiled) so

Re: [PHP] convert video files to FLV

2009-04-08 Thread Michael Shadle
there's some third party encoding services out there, and if you host with softlayer, they have media transcoding services they offer for their hosting customers (not sure the cost, but it's pay for what you use) On Wed, Apr 8, 2009 at 10:45 PM, Gevorg Harutyunyan wrote: > Thanks guys, but as I u

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-09 Thread Michael Shadle
On Thu, Apr 9, 2009 at 12:25 AM, Michael A. Peters wrote: > I did a little reading on the issue and I don't think php 6 will fix it. > The issue is with libxml2 - it mutilates utf8 when exporting to html and php > function wraps the libxml2 function. > > The solution? > I don't know - but perhaps

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-09 Thread Michael Shadle
On Thu, Apr 9, 2009 at 12:25 AM, Michael A. Peters wrote: > I did a little reading on the issue and I don't think php 6 will fix it. > The issue is with libxml2 - it mutilates utf8 when exporting to html and php > function wraps the libxml2 function. not to mention i swore i tried saveXML and it

Re: [PHP] convert video files to FLV

2009-04-10 Thread Michael Shadle
On Fri, Apr 10, 2009 at 4:31 AM, Ashley Sheridan wrote: > I know of no way you can do this. Not only would any potential solution > be too slow, but it would affect other users of the server, and more > than likely result in an email from you hosting provider! > > Have you considered using YouTub

Re: [PHP] convert video files to FLV

2009-04-10 Thread Michael Shadle
On Fri, Apr 10, 2009 at 9:12 AM, Ashley Sheridan wrote: > If you'll note, the original question was to find a way which did not > require ffmpeg. I should really have rephrased that to say "I know of no > way you can do this without ffmpeg". I've used ffmpeg and mencoder > myself to transcode vid

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-12 Thread Michael Shadle
On Sun, Apr 12, 2009 at 8:07 AM, Raymond Irving wrote: > > Hello, > > After talking with Michael about how to generate XHTML code using the DOM I > came up with this little function that I'm thinking of using to generate > XHTML code that's HTML compatible: > > function saveXHTML($dom) { >    $h

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael Shadle
On Sun, Apr 12, 2009 at 8:07 AM, Raymond Irving wrote: >    $html = > preg_replace('/<\!\[CDATA\[(.*)\]\]><\/script>/s','//',$html); question - the output of this would be right? is the cdata truly necessary? I typically use XHTML 1.0 transitional and I don't have

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael Shadle
compatible) Code using DOMDocument To: "Michael Shadle" Cc: "Raymond Irving" , "php- gene...@lists.php.net" Date: Monday, April 13, 2009, 5:36 AM Michael A. Peters wrote: function makeHTML($document) { $buffer = $document->saveHTML(); $output = h

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael Shadle
Peters Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: "Michael Shadle" Cc: "Raymond Irving" , "php- gene...@lists.php.net" Date: Monday, April 13, 2009, 5:36 AM Michael A. Peters wrote: function makeHTML($docum

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael Shadle
On Mon, Apr 13, 2009 at 2:19 AM, Michael A. Peters wrote: > The problem is that validating xhtml does not necessarily render properly in > some browsers *cough*IE*cough* I've never had problems and my work is primarily around IE6 / our corporate standards. Hell, even without a script type it sti

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-14 Thread Michael Shadle
web application development? __ Raymond Irving --- On Tue, 4/14/09, Peter Ford wrote: From: Peter Ford Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: php-general@lists.php.net Date: Tuesday, April 14, 2009, 5:05 AM Michael Shadle wrote: On Mon, Apr 13,

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-15 Thread Michael Shadle
I like the option of serving both. My only concern is that a proxy server might cache an xhtml page and then serve it to a non-xhtml browser. Do you think it's possible that a proxy might serve the xhtml source to the wrong browser? __ Raymond Irving --- On Tue, 4/14/09, Mic

Re: [PHP] Re: Suggestions of some good, simple file upload 'in progress' code?

2009-04-21 Thread Michael Shadle
On Tue, Apr 21, 2009 at 9:02 PM, scubak1w1 wrote: > > ""scubak1w1"" wrote in message > news:cf.13.21597.2ee8e...@pb1.pair.com... >> Hello, >> >> Can someone pass on some suggestions of some good, simple file upload 'in >> progress' code? >> >> Maybe as simple as changing the cursor icon for the d

Re: [PHP] Re: Suggestions of some good, simple file upload 'in progress' code?

2009-04-22 Thread Michael Shadle
On Wed, Apr 22, 2009 at 6:20 AM, haliphax wrote: > Michael, > > Given the fact that Gears requires a client-side installation, has an > awful penetration percentage, and his original solution is all > server-side (though it does require APC and YUI-JS), I wouldn't say > this is a very good sugges

Re: [PHP] Re: Suggestions of some good, simple file upload 'in progress' code?

2009-04-22 Thread Michael Shadle
On Wed, Apr 22, 2009 at 2:41 PM, haliphax wrote: > On Wed, Apr 22, 2009 at 11:25 AM, Michael Shadle wrote: >> On Wed, Apr 22, 2009 at 6:20 AM, haliphax wrote: >> >>> Michael, >>> >>> Given the fact that Gears requires a client-side installation, has an

Re: [PHP] I need ideas for things to code

2009-04-24 Thread Michael Shadle
how about: a replacement for mailman in php a trac/redmine written in php a better bugzilla replacement in php On Fri, Apr 24, 2009 at 4:25 PM, Nathan Rixham wrote: > Andrew Hucks wrote: >> >> I've been coding PHP for about a year, and I'm running out of things to >> code >> that force me to le

Re: [PHP] I need ideas for things to code -- Roach vs Bugzilla

2009-04-27 Thread Michael Shadle
On Mon, Apr 27, 2009 at 2:47 PM, Daevid Vincent wrote: > I got that one done for you: > http://www.daevid.com/content/examples/roach.php > > p.s. the PHP code is absolute crap by the way. I inherited the start of this > and just had to keep building on top of it, so i never got time to re-write >

Re: [PHP] I need ideas for things to code -- Roach vs Bugzilla

2009-04-27 Thread Michael Shadle
On Mon, Apr 27, 2009 at 3:27 PM, Daevid Vincent wrote: > I just didn't want someone to think this was the caliber of code I wrote! > ;-) totally understood. i don't like people getting the wrong idea of my code too :) > I am using Trac personally, but I'm not a fan of Trac's ticket system. Roac

Re: [PHP] I need ideas for things to code -- Roach vs Bugzilla

2009-04-27 Thread Michael Shadle
On Mon, Apr 27, 2009 at 5:46 PM, Shawn McKenzie wrote: > #1  Which one are we talking about? Tickets/trackers (Bugzilla, Mantis, Roach, you name it) and SCM integration tools (Redmine, Trac) > #2  Having rarely used either, what are the main (must have) features? For general purpose ticketing

Re: [PHP] I need ideas for things to code -- Roach vs Bugzilla

2009-04-27 Thread Michael Shadle
On Mon, Apr 27, 2009 at 6:09 PM, Shawn McKenzie wrote: > OK, so geared towards software bugs I assume (I haven't used any)? Web site development, a little system administration. But yes, basically software bugs. > OK, so I am not familiar with the bug tracking software or anything that > it nee

Re: [PHP] SQL Injection - Solution

2009-05-06 Thread Michael Shadle
mysql_escape_string can be used instead. You just lose the ability to have it match coallation. I still think there should be the mysql_escape_string or real one and allow it to pass the coallation without a database handle -or- just make a unicode/utf8 one and be done with it. On May 6,

Re: [PHP] Re: SQL Injection - Solution

2009-05-07 Thread Michael Shadle
On Thu, May 7, 2009 at 4:28 PM, Shawn McKenzie wrote: > RTFP!  ;-) > > He has no idea what DB will be used. Wouldn't that be a better argument -for- using PDO? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Best Encryption Algorithm

2009-06-03 Thread Michael Shadle
+1 for AES 256-bit On Wed, Jun 3, 2009 at 11:43 AM, Eddie Drapkin wrote: > Another camper on the AES / Rijndael bandwagon.  I don't think there's even > been a theoretical attack point for anything >128 bit, but I could be wrong. > > And re: sha1, sha1 isn't an encryption algorithm... -- PHP Gen

Re: [PHP] Converting MP3 to FLV On-The-Fly

2009-06-07 Thread Michael Shadle
I would also batch it. Keeping a user waiting (unless you have a "please wait..." screen, which still can take some time and be a bad user experience) in my experience hasn't been ideal and won't scale very well. On Sun, Jun 7, 2009 at 11:04 AM, Nitsan Bin-Nun wrote: > I thought of using FFMPEG bu

Re: [PHP] Converting MP3 to FLV On-The-Fly

2009-06-07 Thread Michael Shadle
On Sun, Jun 7, 2009 at 11:23 AM, wrote: > These is a PHP binding for FFMPEG here: > http://ffmpeg-php.sourceforge.net/, though most of the tutorials you will > find are for the C API, for example http://www.dranger.com/ffmpeg/, which > demonstrates how to implement a media player. > Personally I

Re: [PHP] Re: Search/Replace in entire database?

2009-06-15 Thread Michael Shadle
You can always cheat. Use information_schema or just show databases and show tables and loop through it. Just using information_schema is perfect though i think then you can know or query on column type and save some work. Sent from my iPhone On Jun 15, 2009, at 1:10 AM, Peter Ford wrote:

Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-23 Thread Michael Shadle
On Tue, Jun 23, 2009 at 2:34 AM, Robert Cummings wrote: > Revolutionary, no. Major changes for PHP, yes! Major shifts in development > practices for PHP... it depends on who you are or where you work, but > certainly some of these will mark changes in development for many people. +1 http://cv

[PHP] Does anyone know how gettext works under the hood?

2009-06-25 Thread Michael Shadle
I'm wondering if there is a way to save some processing time, and I could totally be off my rocker, or violating the pre-mature optimization rule... But my assumption is when you ask gettext in PHP to load up a .po file, it has to convert that into bytecode. That takes some overhead, especially on

Re: [PHP] Does something like this exist?

2009-06-29 Thread Michael Shadle
On Mon, Jun 29, 2009 at 1:16 PM, Dotan Cohen wrote: > * What files are include in which scripts pecl.php.net/package/inclued - an awesome tool, will show you includes/require calls to other ones, show you any redundancy (dotted lines) etc. helps you clean up any nested and unnecessary includes o

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Michael Shadle
On Mon, Jul 6, 2009 at 8:24 AM, Daniel Brown wrote: >    Conversely, using the code example from above (and building upon > it), we know that __FILE__ remains static regardless of the point of > the call.  Thus, it's a better and more reliable method, and is usable > even if $_SERVER data is not a

Re: [PHP] Host that allows edit of php.ini

2009-07-08 Thread Michael Shadle
Someone who adopts php 5.3.0 or uses htscanner might allow for it. I'm too lazy to check if memory limit is allowed on an htscanner/htaccess level or not On Wed, Jul 8, 2009 at 1:27 AM, Matthew Croud wrote: > Apologies if this type of question is frowned upon in the mailing list, > however I woul

Re: [PHP] Converting print_r() output to an array

2009-09-30 Thread Michael Shadle
first off, if you pass print_r($var, true) it will return it instead of printing it. if you go that route. have you looked at var_export() ? On Wed, Sep 30, 2009 at 8:07 PM, James Colannino wrote: > Hey everyone, I was pretty sure there was an easy built-in solution for > what I want to do, but

Re: [PHP] ip-to-country

2009-10-18 Thread Michael Shadle
http://pecl.php.net/package/geoip however i tried a few IPs once and it was "unknowns" On Sun, Oct 18, 2009 at 12:03 PM, SED wrote: > Hi, > > How can I access an index for IP to a country (or a more detailed location)? > I have not yet found a function for that in PHP nor a free to use websit

[PHP] Issues with MySQL connectivity ... on only one machine, and for a while now

2009-10-25 Thread Michael Shadle
Oct 25 22:00:01 sql02 php: PHP Warning: mysqli_connect(): (HY000/2013): Lost connection to MySQL server at 'sending authentication information', system error: 32 in /home/foo/web/foo.com/core.php on line 2394 It's either this or one or two others. What is odd is I have switched to making it socke

Re: [PHP] Issues with MySQL connectivity ... on only one machine, and for a while now

2009-10-26 Thread Michael Shadle
26, 2009 at 12:24 AM, Kim Madsen wrote: > Michael Shadle wrote on 2009-10-26 06:48: >> >> Oct 25 22:00:01 sql02 php: PHP Warning:  mysqli_connect(): >> (HY000/2013): Lost connection to MySQL server at 'sending >> authentication information', system error: 32 in

Re: [PHP] Issues with MySQL connectivity ... on only one machine, and for a while now

2009-10-26 Thread Michael Shadle
86 [r...@sql02 ~]# i do have collectd installed and am waiting for it to happen some more to see if i can correlate it with any specific event On Mon, Oct 26, 2009 at 5:53 AM, John Black wrote: > Michael Shadle wrote: >> >> Oct 25 22:00:01 sql02 php: PHP Warning:  mysqli_connect(): &

Re: [PHP] Free tech talk by Percona tonight in Palo Alto, CA

2009-11-05 Thread Michael Shadle
On Tue, Nov 3, 2009 at 10:17 AM, Sam Ghods wrote: > Hi all, > > I would like to invite everyone to a Box.net sponsored free tech talk (and > free dinner!) in Palo Alto tonight on Goal Oriented Performance > Optimization, given by Peter Zaitsev of Percona, the leading MySQL/LAMP > performance consu

Re: [PHP] Emergency! Performance downloading big files

2009-12-01 Thread Michael Shadle
On Tue, Dec 1, 2009 at 3:21 PM, James McLean wrote: > The suggestion from other users of off-loading the PDF downloading to > Apache (or another webserver) is a good idea also. ^ I never allow PHP to be [ab]used and kept open to spoonfeed clients with fopen/readfile/etc. in nginx: header("X-A

Re: [PHP] Re: Emergency! Performance downloading big files

2009-12-02 Thread Michael Shadle
Ah I didn't pay attention to the first part. Just gave my typical don't spoonfeed bytes from php rant :) Sent from my iPhone On Dec 2, 2009, at 1:42 AM, Colin Guthrie wrote: 'Twas brillig, and Michael Shadle at 01/12/09 23:51 did gyre and gimble: On Tue, Dec 1, 2009 at

Re: [PHP] Server-side encryption to prevent form hacking: new idea?

2009-12-11 Thread Michael Shadle
you don't necessarily need encryption, you could use digests instead and issue a use-once ticket as well. On Fri, Dec 11, 2009 at 12:29 PM, Mattias Thorslund wrote: > Kelly Jones wrote: >> >> If you have an HTML form select field xyz with possible values >> "apple", "banana", and "cucumber", anyo

Re: [PHP] PHP & MS Sequel Server

2010-01-17 Thread Michael Shadle
I use PHP with MSSQL right now. PHP is on Linux, MSSQL is on Windows. Just use the FreeTDS libraries to connect. On Sun, Jan 17, 2010 at 10:47 AM, dealtek wrote: > http://www.aspfree.com/c/a/MS-SQL-Server/Using-PHP-with-MS-SQL-Server/ > > This article seems to sate that PHP can interface with MS

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Michael Shadle
On Mon, Feb 22, 2010 at 12:55 PM, Joseph Thayne wrote: > I am not sure what the security issues are you are referring to as the > $_REQUEST superglobal contains both $_GET and $_POST values.  Could you > expound on that?  Thanks. $_REQUEST opens you up to POST/GET values overriding cookie values

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Michael Shadle
On Mon, Feb 22, 2010 at 1:30 PM, David Murphy wrote: > Richard, > > > The use of $_REQUEST it no more a security hole than $_GET or $_REQUEST, > they should ALL be treats as bad data until normalized and sanitized.  The > claim that it opens a security hole  is  just false, that’s like saying PHP

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Michael Shadle
On Mon, Feb 22, 2010 at 2:07 PM, John Black wrote: > And how is this more secure? I can create a cookie, send post or get on my > client machine and send anything I want to the server. Just because you are > getting a cookie does not mean that you created it :) > > So you might as well use reques

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Michael Shadle
0, at 2:26 PM, John Black technologies.org> wrote: On 02/22/2010 11:17 PM, Michael Shadle wrote: "Secure" might be the wrong term here. As you can easily change GET to POST and vice-versa and send any cookies you like, this is why I tried to revise my statement and quantify

Re: [PHP] $_GET is Mangling Base64 value

2010-03-11 Thread Michael Shadle
On Thu, Mar 11, 2010 at 1:57 PM, George Langley wrote: > x is a Japanese phrase, that has been encoded into Base64. So is using > the + symbol: > > ...OODq+OCou... > > but my $_GET is replacing the + with a space: > > ...OODq OCou... > > thus the base64_decode() is failing (displays diamonds

Re: [PHP] how to upload large file ( bigger than 1G) with PHP

2010-03-12 Thread Michael Shadle
On Fri, Mar 12, 2010 at 4:41 AM, Ashley Sheridan wrote: > I've noticed that large uploads over http seem to behave a little > unpredictably at times, and aren't something I'd rely on. FTP is > definitely the way to go, and there are plenty of Java applets that > allow you to do this. FTP is not

Re: [PHP] how to upload large file ( bigger than 1G) with PHP

2010-03-12 Thread Michael Shadle
On Fri, Mar 12, 2010 at 11:51 AM, Ashley Sheridan wrote: > It's not much trouble to map the FTP to a file and have the right > permissions, and FTP is a doddle to set up on a server. I'd say a darn sight > less work than rolling your own mechanism in Java. Well, mechanisms already exist. We're

Re: [PHP] How to Force IE to download text file?

2010-04-30 Thread Michael Shadle
On Fri, Apr 30, 2010 at 9:19 AM, Ali Asghar Toraby Parizy wrote: > I have written this code to export data to a text file and asks user > to save generated file. It works with Firefox perfectly, but IE shows > content of file instead of prompting the download window. > How can I force IE to show t

Re: [PHP] Inconsistent json_decode() results

2010-05-05 Thread Michael Shadle
2010/5/5 Michiel Sikma : > By the way, if you're stuck on 5.2.10, you could simply cast the result to > array: > > var_dump((array)json_decode('{"_urls": ["a", "b"]}')); I don't see a "available starting in 5.x.x" notice, so I think it's been there for a long time... http://www.php.net/json_deco

Re: [PHP] Inconsistent json_decode() results

2010-05-05 Thread Michael Shadle
On Wed, May 5, 2010 at 1:11 PM, Michiel Sikma wrote: > You're right, but this is about how 5.2.10 ignores the second parameter and > always returns a class, which appears to be a bug. I'm not sure which other > versions have this same problem, but 5.2.11 has correct behavior, which > seems to sug

Re: [PHP] Credit Card encryption

2010-06-01 Thread Michael Shadle
Is this a joke? Better hope your merchant provider isn't lookin... On Jun 1, 2010, at 7:17 PM, Brandon Rampersad wrote: I store CC # in plain text on my custom ecommerse website script so i can compare it with others. That way it's easier to convert to different hashes when i decide to

Re: [PHP] Security Issue

2010-06-07 Thread Michael Shadle
It's not that bad. Use filter functions and sanity checks for input. Use htmlspecialchars() basically on output. That should take care of basically everything. On Jun 7, 2010, at 6:16 AM, Igor Escobar wrote: This was my fear. Regards, Igor Escobar Systems Analyst & Interface Designer + ht

Re: [PHP] Security Issue

2010-06-07 Thread Michael Shadle
On Jun 7, 2010, at 10:45 AM, Ashley Sheridan wrote: On Mon, 2010-06-07 at 10:38 -0700, Michael Shadle wrote: It's not that bad. Use filter functions and sanity checks for input. Use htmlspecialchars() basically on output. That should take care of basically everything. On Jun 7, 201

Re: [PHP] Security Issue

2010-06-07 Thread Michael Shadle
27;m have a bug difficult do identify the focus of the problem. Got it? Regards, Igor Escobar Systems Analyst & Interface Designer + http://blog.igorescobar.com + http://www.igorescobar.com + @igorescobar (twitter) On Mon, Jun 7, 2010 at 2:38 PM, Michael Shadle wrote: It's

Re: [PHP] Security Issue

2010-06-07 Thread Michael Shadle
Because that only typecasts it. It's safe but it isn't what the user actually entered. This way I can actually determine if the user put in "123abc" and reject it, not accept it and keep the "123" silently for example. Same with floats. You may or may not consider a negative number acceptab

Re: [PHP] Security Issue

2010-06-07 Thread Michael Shadle
cobar Systems Analyst & Interface Designer + http://blog.igorescobar.com + http://www.igorescobar.com + @igorescobar (twitter) On Mon, Jun 7, 2010 at 2:51 PM, Ashley Sheridan > wrote: On Mon, 2010-06-07 at 10:48 -0700, Michael Shadle wrote: Oh yeah. I do more than just intval() I ma

Re: [PHP] Security Issue

2010-06-08 Thread Michael Shadle
Yes and scrubbing the input to ensure the field used for this URL rejects certain characters or does sanity checking on it would also be another suggestion. Turning this off would fix remote include requests. But still need to check for people requesting local files. Should never take user

Re: [PHP] Re: [PHP-WEBMASTER] Web Service Problem

2010-06-15 Thread Michael Shadle
Wso2 is also pretty awesome. I wish soap would just die and be replaced with rest and json. On Jun 15, 2010, at 6:15 AM, Richard Quadling wrote: > On 15 June 2010 12:44, John wrote: >> >> >> >> Really i need help coz i am trying to solve this problem from 4 weeks and i >> can not so please

Re: [PHP] Re: [PHP-WEBMASTER] Web Service Problem

2010-06-15 Thread Michael Shadle
On Tue, Jun 15, 2010 at 10:14 AM, Richard Quadling wrote: > REST is a concept, not a protocol (as I understand it), so you cannot > just create a service and supply a contract file. You have to document > the service in some other way and then the users have to write all the > code. I know it's

[PHP] How to store encrypted data and how to store the key?

2010-06-23 Thread Michael Shadle
This is somewhat related to the whole PCI/credit card discussion a couple weeks back. The consensus was basically "leave it to other people" - however, what if YOU are the other person? I wonder if anyone has some BKMs to share about encrypting data in a web application. A lot of people take the m

Re: [PHP] $_SERVER['REMOTE_ADDR'] and sql injection

2010-06-23 Thread Michael Shadle
On Wed, Jun 23, 2010 at 12:06 AM, Rene Veerman wrote: > unlikely. it's a apache delivered ip address.. very little chance of > insert vulnerabilities, imho. still, the overhead for a db escape is better than your site being trashed. also, you could look at converting the IP to an INT(10) (at lea

Re: [PHP] How to store encrypted data and how to store the key?

2010-06-23 Thread Michael Shadle
On Wed, Jun 23, 2010 at 12:21 AM, Peter Lind wrote: > I haven't had to implement a scheme like this but for an app I'm > working on we've been considering the same issues in order to keep > member data safe. I would say your best bet is to keep the decryption > key in memory while the app is runn

Re: [PHP] $_SERVER['REMOTE_ADDR'] and sql injection

2010-06-23 Thread Michael Shadle
On Wed, Jun 23, 2010 at 1:01 AM, Tommy Pham wrote: > If you're going to implement this, then it's better to implement the > conversion in the backend DB (via SP or UDF).  So you can always use MySQL > query browser or the command line to run queries or other methods depending > on your access

Re: [PHP] How to store encrypted data and how to store the key?

2010-06-23 Thread Michael Shadle
On Wed, Jun 23, 2010 at 12:55 AM, Tommy Pham wrote: >> I haven't had to implement a scheme like this but for an app I'm working on >> we've been considering the same issues in order to keep member data safe. >> I would say your best bet is to keep the decryption key in memory while the > > This i

Re: [PHP] $_SERVER['REMOTE_ADDR'] and sql injection

2010-06-23 Thread Michael Shadle
On Wed, Jun 23, 2010 at 1:12 AM, Tommy Pham wrote: > Then I presume that your firewall, servers, and application is test proven > 'bulletproof'? :-P a) no such thing b) pretty damn solid, yes and the reason? because i don't overcomplicate things. "a simple stack is a happy stack" :) -- PHP

Re: [PHP] How to store encrypted data and how to store the key?

2010-06-23 Thread Michael Shadle
rote: >> -Original Message- >> From: Peter Lind [mailto:peter.e.l...@gmail.com] >> Sent: Wednesday, June 23, 2010 12:22 AM >> To: Michael Shadle >> Cc: PHP-General >> Subject: Re: [PHP] How to store encrypted data and how to store the key? >> >>

Re: [PHP] How to store encrypted data and how to store the key?

2010-06-23 Thread Michael Shadle
On Wed, Jun 23, 2010 at 12:43 PM, Peter Lind wrote: > I'm just wondering if this is a correct understanding: > 1. plaintext data arrives on the web frontend. or over SSL > 2. It's sent to the app server SSL or non-SSL - your choice > 3. It's encrypted and sent to the DB server encrypted or n

Re: [PHP] PHP Trick or Not - You Be the Judge

2010-06-30 Thread Michael Shadle
biggest difference: http://php.net/print print() returns 1, always - which means it's returning a value http://php.net/echo doesn't return anything Sara Golemon's "how long is a piece of string" blog post (http://blog.libssh2.org/index.php?/archives/28-How-long-is-a-piece-of-string.html which ap

Re: [PHP] validating form input

2010-07-08 Thread Michael Shadle
On Jul 8, 2010, at 12:38 PM, David Mehler wrote: > Hello, > Got a form that takes in data to enter in to a database. I want to > make it as secure and as invulnerable to sql injection and other > attacks as possible. I'm wondering if mysqli_real_escape_string or > stripslashes should be used or

Re: [PHP] enabling domdocument

2010-07-19 Thread Michael Shadle
Makes sense. Core would be more stripped down if it has modules available as separate packages. On Jul 19, 2010, at 4:19 AM, Ashley Sheridan wrote: > On Mon, 2010-07-19 at 12:09 +0100, Ashley Sheridan wrote: > >> Hi all, >> >> I'm having a bit of a problem here with getting DomDocument on PHP

Re: [PHP] Quotes vs. Single Quote

2010-08-05 Thread Michael Shadle
On Thu, Aug 5, 2010 at 7:10 PM, Rick Dwyer wrote: > Hi List. > I've mentioned before that I am both just beginning to learn PHP AND I have > inherited a number of pages that I'm trying to clean up the w3c validation on. > > Something that confuses me is how the code on the page is written where i

Re: [PHP] Quotes vs. Single Quote

2010-08-05 Thread Michael Shadle
On Thu, Aug 5, 2010 at 8:51 PM, Adam Richardson wrote: > I would suggest that saying is "the wrong way" is a > rather strong assessment.  Whether you're talking about SGML (the > grandparent), XML (the parent), or XHTML, the use of a single quote is > perfectly valid, and has served a purpose si

Re: [PHP] Quotes vs. Single Quote

2010-08-05 Thread Michael Shadle
On Thu, Aug 5, 2010 at 8:51 PM, Adam Richardson wrote: > Tim Bray, who knows a little bit about XML dialects (tongue in cheek), > appears to default to the single quote as his delimiter of choice: > http://www.tbray.org/ongoing/ Side note, looks like his stuff is auto-generated by something, so

Re: [PHP] XML with PHP

2010-08-26 Thread Michael Shadle
On Thu, Aug 26, 2010 at 2:54 AM, wrote: > Hi > > I am trying to read XML files (invoices) from a directory and display them > to the visitor. Each XML file contains several invoices. The visitor then > clicks on the XML file (invoices). My PHP snippet should open the xml file > and locate the app

Re: [PHP] XML with PHP

2010-08-26 Thread Michael Shadle
On Thu, Aug 26, 2010 at 3:10 AM, Sridhar Pandurangiah wrote: > Mike > > Thanks a ton for the quick response. I have updated the mail id on my email > client (using Mozilla TB) and I did repost but your reply was quicker! > > Will try this out and post the results on this thread. Just waiting for >

[PHP] Looking for open source Learning Management System suggestions

2010-08-31 Thread Michael Shadle
Yes, there is Moodle. However, upon installing it, I found the admin UI to be extremely gaudy, counter-intuitive, and requires it's own learning system just to get it right (ha ha) Does anyone know of any other options out there? Obviously, open source is best, I'd even take some reasonably pric

Re: [PHP] Looking for open source Learning Management System suggestions

2010-08-31 Thread Michael Shadle
On Aug 31, 2010, at 7:53 PM, Bastien Koert wrote: >> >> > Our company built one on top of wordpress. You can easily build most > of it with stock plugins and it has UIs for idevices...worth > considering Yeah - obviously anything can be built and a lot of things can be extended... But were

Re: [PHP] How to handle a submitted form with no changes -- best practices sought

2010-09-12 Thread Michael Shadle
On Sun, Sep 12, 2010 at 2:12 PM, Tamara Temple wrote: > Ok, but how do you detect if a field changes? The specific implementation > between application and data storage is probably moot until you figure that > part out. +1 without talking to the server, or accessing it in the DOM somewhere, the

Re: [PHP] How to handle a submitted form with no changes -- best practices sought

2010-09-12 Thread Michael Shadle
On Sun, Sep 12, 2010 at 3:04 PM, Tamara Temple wrote: > Actually, even the client-side aspect isn't good enough -- they could simply > retype the same value in the field. Also, I'd like to not rely on JavaScript > alone to indicate that there's been a change, since, as Ashley points out, > someon

Re: [PHP] Checking file type when uploading

2010-09-18 Thread Michael Shadle
There is a fileinfo module for php (and it's packaged in 5.3) http://www.php.net/manual/en/intro.fileinfo.phphttp://www.php.net/manual/en/intro.fileinfo.php However after trying to use "file" in a system call back in the day its great with graphics and some other stuff, but a large number of the

Re: [PHP] Reminder On Mailing List Rules

2010-10-21 Thread Michael Shadle
On Thu, Oct 21, 2010 at 12:42 PM, Larry Martell wrote: > http://idallen.com/topposting.html top posting is no big IMHO. in fact, it's easier to read on mobile devices such as an iphone. it's also easier to reply. email clients like google will hide the common lines anyway. to me this comes on

Re: [PHP] Reminder On Mailing List Rules

2010-10-21 Thread Michael Shadle
On Thu, Oct 21, 2010 at 12:56 PM, Nathan Nobbe wrote: > um, right, the whole point is that the conversations are not being viewed > through mail clients when people are finding them via search engines on the > web. > and some mail clients are dumber than others, lol. a lot of the time even the w

Re: [PHP] Reminder On Mailing List Rules

2010-10-21 Thread Michael Shadle
On Thu, Oct 21, 2010 at 1:21 PM, Nathan Nobbe wrote: > what does syntax highlighting have to do w/ a mess of text that could be > sorted out by folks willing to take the extra 2 seconds to put their > thoughts at the bottom of a mail? > i doubt there are any web-based lists that reorganize top-po

Re: [PHP] Reminder On Mailing List Rules

2010-10-21 Thread Michael Shadle
On Thu, Oct 21, 2010 at 3:12 PM, Nathan Nobbe wrote: > i've found top-posting to be useful in the corporate environment where the > people i'm working with are too ignorant to understand the rationale. >  however, when you're working with programmers, i think the expectation is > more than reason

Re: [PHP] Reminder On Mailing List Rules

2010-10-21 Thread Michael Shadle
On Thu, Oct 21, 2010 at 3:40 PM, Daniel Brown wrote: >    Unfortunately, Michael, while I appreciate your analogy (rarely is > something well-balanced between wit, truth, and vivid imagery enough > to make me laugh at the mental picture), I must point out that, in > this case, you're incorrect.  

Re: [PHP] Template engines

2010-11-08 Thread Michael Shadle
On Mon, Nov 8, 2010 at 1:41 PM, Hansen, Mike wrote: > I really like the idea of using a templating engine. Which one do you use? > Why? For those that don't use templating engines, why don't you use them? smarty is everyone's favorite usually but i find it a bit annoying. not to mention php its

Re: [PHP] Template engines

2010-11-08 Thread Michael Shadle
i would point someone in the direction of XHP too if they really wanted to https://github.com/facebook/xhp/wiki/ On Mon, Nov 8, 2010 at 2:10 PM, Peter Lind wrote: > On 8 November 2010 22:59, Michael Shadle wrote: >> On Mon, Nov 8, 2010 at 1:41 PM, Hansen, Mike wrote: >>> I re

Re: [PHP] Template engines

2010-11-11 Thread Michael Shadle
Not to discredit this long post but the media here is now calling kids who text often "hypertexting teens" which really irked me even more... I bet some non-technical news guy thinks he is awesome for coming up with that one. On Nov 11, 2010, at 9:54 AM, "Daniel P. Brown" wrote: > On Thu, No

Re: [PHP] range header in curl?

2010-11-21 Thread Michael Shadle
Is range the right header to be sending? I thought it was something else. Also I believe there is a curl_setopt option for range... Look at php.net's predefined constants for the curl modul On Nov 21, 2010, at 3:05 PM, Tontonq Tontonq wrote: > hi im downloading files from h0tf1le as a premium

Re: [PHP] Warning when calling session_start()

2010-12-21 Thread Michael Shadle
On Tue, Dec 21, 2010 at 9:27 PM, wrote: >   Warning: session_start() [function.session-start]: >   Cannot send session cache limiter - headers already >   sent (output started at /./sess.php:3) in >   /./sess.php on line 5 first - this is probably your culprit: don't output empty lines

Re: [PHP] Need code like

2010-12-27 Thread Michael Shadle
Try google. This is getting a bit insane now. Sorry. On Dec 27, 2010, at 1:19 PM, Michelle Konzack wrote: > Hi *, > > after I got my pastebin runing, I need a second tool for binary uploads. > > Any hints? > > (Must work easy like the pastebin script) > > Thanks, Greetings and nice Day/Even

Re: [PHP] File-Upload per Drag-N-Drop?

2010-12-29 Thread Michael Shadle
On Wed, Dec 29, 2010 at 10:30 AM, Daniel P. Brown wrote: >    That's more of a frontend question to which you and your > six-million-line signature should check Google to find the answer. > Don't get me wrong, Michelle, we've always tried to help out even with > off-topic questions, but this is r

Re: [PHP] OT (maybe not): Drupal vs WordPress

2012-08-19 Thread Michael Shadle
I suggest Wordpress only for blogs or "brochureware" or basic page based sites. It has security flaws often and I've had many sites hacked and servers compromised because of it. Out of the box it is very easy to use and polished and has a lot of themes available and is pretty easy to theme. I

Re: [PHP] OT (maybe not): Drupal vs WordPress

2012-08-19 Thread Michael Shadle
ot; wrote: > > > > Joomla. > > Michael Shadle wrote: >> I suggest > Wordpress only for blogs or "brochureware" or basic page > based >> sites. It has security flaws often and I've had many sites > hacked and >> servers compromised becaus

  1   2   >