Re: [PHP] xmldoc

2006-06-23 Thread Ahmed Saad
On 23/06/06, weetat [EMAIL PROTECTED] wrote: Anybody have any ideas what happening here ? Try this as the first line ?php ini_set('display_errors', 1); ? You can remove it later, of course, but it would enable displaying php errors as it's commonly disabled in production systems, AFAIK..

Re: [PHP] STRING TO ASCII CHARACTERS

2006-06-23 Thread Ahmed Saad
On 23/06/06, cajbecu [EMAIL PROTECTED] wrote: $data .= #.ord(substr($string,$i,1)).;; and I think there's no need for substr.. just $data .= #.$string[$i].;; /ahmed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] detect user click stop button in browser

2006-06-23 Thread Ahmed Saad
On 23/06/06, Richard Lynch [EMAIL PROTECTED] wrote: On Thu, June 22, 2006 4:16 am, weetat wrote: An javascript thingie for onStop if it exists might help. window.onunload /ahmed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php calendar

2006-06-20 Thread Ahmed Saad
On 19/06/06, Ryan A [EMAIL PROTECTED] wrote: guess i am using special version of google... an iGoogle? ;) /ahmed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] file_exists() behind firewall

2006-06-17 Thread Ahmed Saad
On 17/06/06, Richard Lynch [EMAIL PROTECTED] wrote: I dunno if AJAX will let you quit partway through, but you could definitely do this with the lean and mean hand-coded XmlHttpRequest object and sending HEAD to see if the URL is there or not. For security reasons, an XMLHttpRequest objects

Re: [PHP] transfer file

2006-06-17 Thread Ahmed Saad
Hi Richard.. On 15/06/06, Richard Lynch [EMAIL PROTECTED] wrote: HTTP just plain ain't gonna let you open a file up for writing -- thank god. I think it does in form of PUT requests.. http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html (apparently not supported by PHP streams(?)) Security

Re: [PHP] serving video files with php

2006-06-17 Thread Ahmed Saad
On 15/06/06, Andras Kende [EMAIL PROTECTED] wrote: Is there any drawback servings video files through php downloader script on high load site? the question is why you want that? If you want to log how many times/when the video files were viewed, you can send the request to a PHP script that

Re: [PHP] list noise [WAS: How to find img tag and get src of image]

2006-04-25 Thread Ahmed Saad
On 4/25/06, Robert Cummings [EMAIL PROTECTED] wrote: If you carefully comb the archives you'll see that many of us that make quite liberal use of RTFM also quite often give answers to the same simple questions, and often quite recently. That's a _quite_ true statement, I think :) I have been

Re: [PHP] PHP Standard style of writing your code

2006-04-25 Thread Ahmed Saad
On 4/25/06, Richard Lynch [EMAIL PROTECTED] wrote: Now *THAT* would be a feature worth paying for in an IDE! :-) Well, you actually don't have to pay anything. TruStudion PHP foundation version (read free/open source version) has a decent code formatter and a pretty neat editor: argument order,

Re: [PHP] strange php url

2006-04-24 Thread Ahmed Saad
On 4/21/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: redirects to: http://www.example.com/index.php?action=edittype=customerid=1234adminaccess=1 and you put admin access flags (read, determine roles) in URL parameters? -ahmed

Re: [PHP] CURLOPT_BINARYTRANSFER

2006-04-13 Thread Ahmed Saad
Hi Richard, On 4/12/06, Richard Lynch [EMAIL PROTECTED] wrote: I need the cookies and all that... There's a PHP implementation of an HTTP client at http://www.phpclasses.org/browse/package/576.html Even if you needed to tweak something, it should be easier to modify and debug good luck /ahmed

[PHP] Re: interview

2006-04-13 Thread Ahmed Saad
On 4/13/06, Mad Unix [EMAIL PROTECTED] wrote: can you please send some interview questions for php i have in few days to inteview some people. Well, a simple google search could have saved you all this http://www.google.com/search?q=php+interview+questions and do NOT try PHP at home! It's

Re: [PHP] wrapping anchor tags around a URL

2006-01-26 Thread Ahmed Saad
On 1/26/06, Richard K Miller [EMAIL PROTECTED] wrote: @(http://\S+)(?!\.)@ -- this still captures everything @(http://\S+?)(?!\.)@-- this captures too little hmm maybe this would work? @http://.+(?=\.)@

Re: [PHP] wrapping anchor tags around a URL

2006-01-25 Thread Ahmed Saad
On 1/23/06, Richard K Miller [EMAIL PROTECTED] wrote: function link_the_links($s) { return preg_replace('@(http://[^\s]+)@sm', 'a href=$1$1/a', $s); } I've got to somehow ignore the trailing period if it is present. if ($s[strlen($s)-1] == '.'){ $s = substr($s, 0, -1); } -ahmed

Re: [PHP] wrapping anchor tags around a URL

2006-01-25 Thread Ahmed Saad
On 1/25/06, Ahmed Saad [EMAIL PROTECTED] wrote: On 1/23/06, Richard K Miller [EMAIL PROTECTED] wrote: function link_the_links($s) { return preg_replace('@(http://[^\s]+)@sm', 'a href=$1$1/a', $s); } if ($s[strlen($s)-1] == '.'){ $s = substr($s, 0, -1); } oops! sorry i

Re: [PHP] wrapping anchor tags around a URL

2006-01-25 Thread Ahmed Saad
On 1/25/06, Ahmed Saad [EMAIL PROTECTED] wrote: On 1/25/06, Ahmed Saad [EMAIL PROTECTED] wrote: On 1/23/06, Richard K Miller [EMAIL PROTECTED] wrote: function link_the_links($s) { return preg_replace('@(http://[^\s]+)@sm', 'a href=$1$1/a', $s); } try looking ahead

Re: [PHP] FW: error de php!

2006-01-18 Thread Ahmed Saad
On 1/18/06, Miguel Guirao [EMAIL PROTECTED] wrote: $this-$NumDias = $unixtime2 - $unixtime1; --- This is the line 44 hmm wasn't it supposed to be $this-NumDias? (with no $ before the propery name) -ahmed

Re: [PHP] Image handling advice needed

2006-01-18 Thread Ahmed Saad
On 1/18/06, William Stokes [EMAIL PROTECTED] wrote: I'am trying to deside between two options. To resize (=scale down) the images once they are uploaded to server and store the smaller file or upload and store the original BIG file and scale it to thumbnail once it's viewed. Any opinnions

Re: [PHP] detecting file size

2005-12-13 Thread Ahmed Saad
Ahmed basha :) On 12/12/05, Ahmed Abdel-Aliem [EMAIL PROTECTED] wrote: i know i can detect the file size after being uploaded, but i do want to detect the file after it is being uploaded to the server. You may want to read this code walkthrough

RE: [PHP] Why do Sessions use Cookies?

2005-12-07 Thread Ahmed Saad
Hi Michael, On 12/3/05, Michael B Allen [EMAIL PROTECTED] wrote: Why do sessions use cookies? 'cause HTTP is a stateless protocol ... check Wikiepedia on HTTP Cookies at http://en.wikipedia.org/wiki/HTTP_cookies and RFC 2109 http://www.cse.ohio-state.edu/cgi-bin/rfc/rfc2109.html such

RE: [PHP] What software do you use for writing PHP?

2005-12-07 Thread Ahmed Saad
Hi Jeff, On 12/6/05, Jeff McKeon [EMAIL PROTECTED] wrote: I'm sure there's better software out there that is more suited to writing and editing PHP pages. What do you all use? Eclipse + TruFoundation (PHP/Python) + JSEclipse + CSSEditor + Web Standard Tools (HTML/XML/...) Well, first of

RE: [PHP] Security question

2005-12-07 Thread Ahmed Saad
Hi Andy, On 12/7/05, Andy Pieters [EMAIL PROTECTED] wrote: Right now when the user is logged in, I put its id in the session. Then when the user edits his details I put the id in the form and when it comes back I verify if the id matches the one in the session. Well, is session data saved in

RE: [PHP] $_POST returns Array when getting data from multiple dropdown

2005-12-01 Thread Ahmed Saad
On 12/1/05, Erfan Shirazi [EMAIL PROTECTED] wrote: foreach($_POST as $key = $tempvalue) { $cVariable .= $key.=.$tempvalue.; } Is there anyway I can get the values chosen instead of just Array? check for that first using is_array() and then loop through it appending it to the string

RE: [PHP] Database Class Help

2005-12-01 Thread Ahmed Saad
On 12/1/05, Albert [EMAIL PROTECTED] wrote: The downside of this is that you do not have persistent connections which last beyond the end of the script. Maybe it's not a real downside :) http://wordpress.org/support/topic/42389 and

Re: [PHP] MVC platform choice.

2005-12-01 Thread Ahmed Saad
On 11/30/05, Gregory Machin [EMAIL PROTECTED] wrote: Hi.. Any body recomend a good MVC platform that is easy to work with, and build on... http://www.agavi.org 0.10rc is already in the svn -ahmed

RE: [PHP] MVC platform choice.

2005-12-01 Thread Ahmed Saad
Hi Greg, On 12/1/05, Greg Donald [EMAIL PROTECTED] wrote: Do you still have to reassign the data in the view for use in the template after having already created it once in the action? That is quite the pain. in View::execute() you can quickly import all request parameters or attributes

Re: [PHP] Advice Needed for Klorofil Open Source PHP Platform

2005-11-28 Thread Ahmed Saad
On 11/28/05, Reza Iqbal [EMAIL PROTECTED] wrote: As a new open source project, we will need many advice in order to make it success. ah an open source project with encoded source code?! how come? -ahmed

Re: [PHP] Can't execute external program

2005-11-28 Thread Ahmed Saad
On 11/21/05, Voip tech [EMAIL PROTECTED] wrote: ?php exec(/var/www/html/myprog -E 123456789098.dat sample1.txt sample1.new); ? use ? system (/var/www/html/myprog -E 123456789098.dat sample1.txt sample1.new, $return_val); ? and check $return_val? -ahmed

Re: [PHP] SQL Password() function

2005-11-27 Thread Ahmed Saad
On 11/26/05, Yaswanth Narvaneni [EMAIL PROTECTED] wrote: I 'dont' want to use something like select * from table where table.passwd=password($passwd); Well, i think you better use a specific password hashing function rather than MySQL's password() 'cause it's implementation is not consistent

Re: [PHP] When to make a class

2005-11-27 Thread Ahmed Saad
On 11/26/05, Todd Cary [EMAIL PROTECTED] wrote: /* Input a field */ function input_field($name, $value, $size, $max) { echo('INPUT TYPE=text NAME=' . $name . ' VALUE=' . $value . ' SIZE=' . $size . ' MAXLENGTH=' . $max . ''); }; A bit away from your OO question, but

Re: [PHP] When to make a class

2005-11-27 Thread Ahmed Saad
On 11/27/05, Todd Cary [EMAIL PROTECTED] wrote: Ahmed - Been there! What would you suggest? My HTML looks like this if I use this look at http://smarty.php.net -ahmed

[PHP] calling static methods of variable class names

2005-11-22 Thread Ahmed Saad
hi all, how can i call static methods of a class whose name is variable.. something like ? $className::doSomething(); // throws a parser error ? I can do this with reflection by creating a ReflectionMethod object then invoke()ing it, but is there a better way? Thanks -ahmed

Re: [PHP] Big file encryption

2005-07-14 Thread Ahmed Saad
hi david, On 7/14/05, david forums [EMAIL PROTECTED] wrote: So I need to know a way to be able to encrypt large file. function readfile_chunked ($filename) { $chunksize = 1*(1024*1024); // it reads 1 mb per chunck. adjust this if u need. $buffer = ''; $handle = fopen($filename, 'rb');

Re: [PHP] How to run .sql files using php

2005-07-14 Thread Ahmed Saad
hi babu On 7/13/05, babu [EMAIL PROTECTED] wrote: i have a set of queries which i have placed them in one .sql file.i want to run this file using php's mssql and oracle(oci) functions. you need a database abstraction layer to help you with that (adodb for example) function fireSQL( $driver

Re: [PHP] Big file encryption

2005-07-14 Thread Ahmed Saad
hi Skippy On 7/14/05, Skippy [EMAIL PROTECTED] wrote: Quoting Ahmed Saad [EMAIL PROTECTED]: // do whatever with the chuck you read. // you can encrypt it and write all the chunks to the same file But if you encrypt one chunk at a time and concatenate them later, or if you encrypt

[PHP] Re: [PHP-DB] Security question [was Searchable/Sortable Database Fields with MySQL/PHP]

2005-07-13 Thread Ahmed Saad
Hi jeffrey, On 7/13/05, Jeffrey [EMAIL PROTECTED] wrote: Is it worth encrypting data on the database tables when anyone who can access the application itself - or better still the server - could readily access the encrypted data? Assuming SSL connections, secure server, etc, would you also

Re: [PHP] Session problems

2005-07-13 Thread Ahmed Saad
On 7/13/05, Richard Lynch [EMAIL PROTECTED] wrote: I think you need to call session_name() *BEFORE* session_start() but I could be wrong about that... totally right! in the php manual, The session name is reset to the default value stored in session.name at request startup time. Thus, you need

Re: [PHP] Logout help needed

2005-07-13 Thread Ahmed Saad
Hi Suma, On 7/11/05, suma parakala [EMAIL PROTECTED] wrote: Since i have placed logout in head frame its being logged out from head frame only. How i can log out from all three frames. anyone please help me Thanks Redirect the user to another page, which loads in the main window (not in a

[PHP] how to get time cost for MySQL query

2005-07-12 Thread Ahmed Saad
On 7/11/05, x [EMAIL PROTECTED] wrote: Since we can see the time cost each time we query MySQL through MySQL console (such as 75 rows in set (0.01 sec)), so I am wondering there is already an existing function which will return the value... I think you are confusing two things: mysql server

Re: [PHP] sockets

2005-07-12 Thread Ahmed Saad
hi all, On Tue, 2005-07-12 at 16:49 +0200, daro wrote: Also remember to set_time_limit(0) ;) PHP ENTER CONFUSION The *CLI* version of php has no max execution time by default (0) - Where's the php CLI version in php4? [PHP_HOME]/cli/php.exe and it reads a php.ini if it was in the SAME

Re: [PHP] Number of users

2005-07-12 Thread Ahmed Saad
On 7/12/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 2. If I write down the IP of a user that log on my web site, can I check later if the IP still browsing pages at my web site or if he had left my website? Don't assume that every IP maps to only ONE user. IPs are often masqueraded so

[PHP] Missing or wrong reply-to headers in this mailing list

2005-07-12 Thread Ahmed Saad
Hi all, I've been around this list for a month or something but i just discovered today that all my replies weren't sent to the list but instead to the individual who sent the message. I haven't administered any list systems before but at Apache for example it appends a reply-to header pointing

Re: [PHP] Missing or wrong reply-to headers in this mailing list

2005-07-12 Thread Ahmed Saad
Hi Chris On 7/12/05, Chris W. Parker [EMAIL PROTECTED] wrote: This has come up many times in the past and so far it has not changed. Just hit the Reply to All button and you'll be fine. thanks for pointing that out -ahmed -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Missing or wrong reply-to headers in this mailing list

2005-07-12 Thread Ahmed Saad
On 7/12/05, John Nichel [EMAIL PROTECTED] wrote: Can of Worms Status : Open oh yeah sure -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to read PHP variables.

2005-07-12 Thread Ahmed Saad
Hi Bruno, On 7/12/05, Bruno B B Magalhães [EMAIL PROTECTED] wrote: Hi you all! $vars['varname'] = 'varvalue'; And I would like to have a module to change those parameters, but I don't know how to write a pattern to match it... i think you mean an API to help you manage and persist your

Re: [PHP] sockets

2005-07-12 Thread Ahmed Saad
Hi André, On 7/12/05, André Medeiros [EMAIL PROTECTED] wrote: Since there was no reference to that on the PHP manual, I thought about mentioning it just to be safe. yeah the manual is completely drak when it comes to php CLI binary -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] sockets

2005-07-12 Thread Ahmed Saad
On 7/13/05, Greg Donald [EMAIL PROTECTED] wrote: `php -h` tells you all the command line options.. and all the basic fuctionality is covered in the manual online. Seems complete to me. ehmm you weren't refering to the CLI version but anyways, I'd be grateful to anyone who points me to more

Re: [PHP] Missing or wrong reply-to headers in this mailing list

2005-07-12 Thread Ahmed Saad
On 7/13/05, Chris W. Parker [EMAIL PROTECTED] wrote: I've been doing that forever and I've never had anyone complain? Did you get this message twice? i fell it my inbox though normally the filter would just skip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Missing or wrong reply-to headers in this mailing list

2005-07-12 Thread Ahmed Saad
On 7/13/05, Ahmed Saad [EMAIL PROTECTED] wrote: i fell it my inbox though normally the filter would just skip sorry i meant it fell in my inbox where my gmail filters would normally skip te inbox step and just apply the label -- PHP General Mailing List (http://www.php.net/) To unsubscribe