[PHP] slashes added before '

2002-09-25 Thread Khalid El-Kary
this code snippet: function save($file) { $my_file=fopen($file,wb); $my_status=fwrite($my_file,$text); fclose($my_file); } is intended to overwrite a file or create a file and write to it from a string that's already containing text. the problem is the after the script writes the

Re: [PHP] Configure php for windows

2002-09-25 Thread Khalid El-Kary
hi, please tell me about your Apache version, PHP version, the changes you made to the httpd.conf and error messages of returned thanx _ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com --

Re: [PHP] parse html code

2002-09-26 Thread Khalid El-Kary
hi, you have two things to do here, first obtain the file, second get urls inside it ... about the first you can get the file so easily using the functions fopen, fread and fclose int fopen ( string filename, string mode [, int use_include_path [, resource zcontext]] ) //for example (this

Re: [PHP] Help on OOP

2002-12-07 Thread Khalid El-Kary
hi, a function can be defined from inside another function! this works here: ?php function howru() { function hi() { echo hi,; } hi();echo how r u; } howru(); hi(); ? this gives the same result: ?php function hi() { echo hi,; } function howru() { hi();echo how r u; } howru(); hi(); ? It

Re: [PHP] Help on OOP

2002-12-07 Thread Khalid El-Kary
hi again, about functions wholly, here is the php manual functions section http://www.php.net/manual/en/functions.php about classes and objects: http://www.php.net/manual/en/language.oop.php Note: an object is an instance of a class! Regards, Khalid Al-kary

RE: [PHP] Help on OOP

2002-12-07 Thread Khalid El-Kary
hi, right, this is exactly what i mean Khalid _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] xml_parse and xml entities

2002-12-12 Thread Khalid El-Kary
hi Russ, why don't you just str_replace the , and with their entities and when they get extracted the parser will normally replace them with their original form, won't it? Regards, Khalid Al-Kary Hi all, I'm writing a guestbook and message in the guestbook might containso to make

Re: [PHP] Re: xml_parse and xml entities

2002-12-12 Thread Khalid El-Kary
Hi, If you are going to use this output in HTML pages, it won't matter at all, because HTMl only cares about br(s), so the additional line-feeds and even additional spaces(except the first space) won't be taken care of by the browser ;) or you have something additional to say ? Regards,

Re: [PHP] XSLT Transformation

2002-12-28 Thread Khalid El-Kary
Hi, Do you mean that the XSL style sheet is printed instead of the transformation result? if that's the case, i have faced the same problem, and at that time it was because of the xsl: namespace check it to verify it's correct, there's a deprecated on of it that you may be using and sablotron

Re: [PHP] Code contents of a function

2003-01-03 Thread Khalid El-Kary
although i never needed to do such a thing, but you can open the PHP file with the file system functions fopen,fread,fgets ... and work with it using string functions strpos(),substr() ... File system functions: http://www.php.net/manual/en/ref.filesystem.php String functions:

Re: [PHP] newbie q: how to count words in a file

2003-01-03 Thread Khalid El-Kary
Use file system functions to get the contents of the file in a string, then us substr_count() on that string. Filesystem: http://www.php.net/manual/en/ref.filesystem.php substr_count: http://www.php.net/manual/en/function.substr-count.php Regrads Khalid Al-kary Hi ! I'm new to php and I have

Re: [PHP] PHP-Performance

2003-01-03 Thread Khalid El-Kary
Performance related issues depend on too many factors infact, however, PHP is known to be fast in itself (as an apache module), oracle is also known to be fast just like MySQL, but still it depends on what your app will do with the database, and how would you manage both your database and

Re: [PHP] Parsing a string

2003-01-03 Thread Khalid El-Kary
check explode() ;) http://www.php.net/manual/en/function.explode.php Regrads, Khalid Al-kary Hi- I'd like to parse the string returned by popen(uptime, r);. The string that is returned is: 9:47am up 37 days, 16:24, 1 user, load average: 0.09, 0.02, 0.00 What I'd like is 5 strings...the

Re: [PHP] PHP intereferes with my Javascript

2003-01-03 Thread Khalid El-Kary
two problemes here, off-topic, and i didn't see the code to figure out the error but maybe you forgot to remove the htmlhead... parts from each include except the header? regards, Khalid Al-Kary I posted just before, i think i'll try again and re-word... I have split a page up into three

Re: [PHP] PHP Editors

2003-01-07 Thread Khalid El-Kary
PHPEdit i use it personally www.phpedit.net I'm running Apache 2.0 as a service and PHP (like a module) onto a Windows Advanced Server. I´m looking for a good and free Editor to use with PHP (With debugging features). Can anyone with experience guide me? Thanks. Janine.

Re: [PHP] regular expression help

2003-01-07 Thread Khalid El-Kary
why don't you just use str_replace ? I'm a bit useless at regular expressions so i thought i ask. i need to turn all [link url=http://www.site.com] link to site [/link] in a string into html a href= ...etc and back again. thanks adrian -- PHP General Mailing List

Re: [PHP] php and asp

2003-01-09 Thread Khalid El-Kary
Maybe you mean that PHP can use COM on windows platforms and load .NET modules http://www.php.net/manual/en/ref.com.php (com) http://www.php.net/manual/en/ref.dotnet.php (.NET) Regards, Khalid Hello all I seem to recall php being able to provide some suport for asp. How would I turn this

Re: [PHP] Mysql/php database performance question

2003-01-10 Thread Khalid El-Kary
the thing that may make difference in performance (as i think) is whether you make it a fixed -CHAR- or a variable -VARCHAR- it's preferable that you make separate char columns, so that PHP will not have to explode every record! Regards, Khalid Al-Kary, Hi, I got a question about using

Re: [PHP] Mysql/php database performance question

2003-01-10 Thread Khalid El-Kary
Oh, sorry, i should have remarked that all of the columns should be fixed width (CHAR) for this optimization to take effect, since if even one of the columns is variable width (VARCHAR) the whole row will be variable width, and it will be no use to change to CHAR. Regards, Khalid seems to be

Re: [PHP] Php's future with Asp .NET?

2003-01-16 Thread Khalid El-Kary
leave PHP, work with ASP .NET and let Microsoft gain more domination and say bye bye for your freedom, then let develpment go and work as a machine that does like Microsoft wants oh, i forgot, remember to submit ASP .NET bug reports to their site, to get a reply after 5 months :) Open-Source

[PHP] regexps

2003-01-28 Thread Khalid El-Kary
I need to use regular expressions, but i found that the current Perl-compaitable API unuseful in my case, infact i need to get the positions of every match to the pattern and i found nothing in the Manual that does so, does any one know a way to do this (the only one i found is specific to PHP

Re: [PHP] regexps

2003-01-28 Thread Khalid El-Kary
using any of the string functions on the output would ofcourse cause a performance drawback (do you agree with me?), i had used a combination of string functions to do instead of regexps, which one will be faster as you think ? where can i suggest such a function on the current regexps API ?

Re: [PHP] php as shell script

2003-01-30 Thread Khalid El-Kary
maybe, but not sure, you need to replace ? with ?php, just try it! maybe it works Hi, I am trying to run php as shell script. I have this: helloworld.php: ? echo Hello World.; ? I run php helloworld.php then I got this: Hello World. Fatal error: Nesting level too deep - recursive

Re: [PHP] mysq_connect()

2003-01-30 Thread Khalid El-Kary
is PHP configured with --with-mysql ? Hi there, my name is Cesar Rodriguez and I am trying to upgrade from Caldera Linux Server 2.3 into RedHat Server 8.0. The problem I encounter is that after testing different scripts, php is working, except when I make an MySQL call like mysql_connect()

Re: [PHP] can we know hard disk no via a php script?

2003-07-27 Thread Khalid El-Kary
Can we know clients' hard disk number with a phpscript. If yes what is the code? what do you mean by clients' hard disk number ? you simply can't because PHP runs on the server-side, maybe you can know it using javascript, but this - if it was available - will not be cross-browser or

Re: [PHP] file_exists() question

2003-03-08 Thread Khalid El-Kary
because you can't directly use the $annrow[id] within single quotes, you should use double quotes to do so. file_exists(cherpdocs/$annrow[id].doc) or file_exists('cherpdocs/'.$annrow[id].'.doc') or file_exists(cherpdocs/.$annrow[id]..doc) Note: i heared it's prefered to always use the .

Re: [PHP] no phun intended!!!

2003-03-08 Thread Khalid El-Kary
sorry, but if PHP (a great piece of knowledge) worths a wet girl for you, so you don't know how to appreciate knowledge. Both PHP and mod_perl are knowledge, science that's more honourful than a wet girl Regards, Khalid Al-Kary http://creaturesx.ma.cx/kxparse/

RE: [PHP] Re: Php +Xml?

2003-03-08 Thread Khalid El-Kary
try this parser, it would be useful. http://creaturesx.ma.cx/kxparse/ Regards, Khalid _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List

RE: [PHP] Configure php for windows

2002-09-30 Thread Khalid El-Kary
Hi, why do you want to run it from a cd, PHP doesn't pass the 6 MB limit! i suggest for reliability reasons that you run PHP from your disk, i don't think Apache would do okay if it didn't fine the PHP path (in case that you eject the cd) do you have special reasons? khalid

[PHP] XML Parser

2002-10-01 Thread Khalid El-Kary
hi, i have developped an XML parser that's easy to use and very fast, and i have run two websites using it. http://creaturesx.ma.cx http://creaturesx.ma.cx/osman/jokes/index.php (not complete website) the question comes now what's best way to contribute this parser to the PHP community

[PHP] XML Parser additional

2002-10-01 Thread Khalid El-Kary
hi, i wanted to add something, i want to receive contribtions from developers as well to make the parser be better _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List

RE: [PHP] How to send POST info without a form?

2002-10-02 Thread Khalid El-Kary
hi, you can make a hidden form l like this form style=visibilty:hidden;position:absolute;top:0px;left:0px; action=yourpage.php method=post id=myform .. form fields /form //in javascript you can use this myform.submit() and your form will be submited khalid

[PHP] how to user select multiple=true

2002-10-15 Thread Khalid El-Kary
hi, If i have a form that has a select with multiple=ture how would i be able to retireve it's multiple values in the PHP script, i tried the $_REQUEST['fieldname'] it gave me only the last selected value note: multiple selection is done by holding ctrl :) khalid

[PHP] a new XML Parser!

2002-10-30 Thread Khalid El-Kary
hi, just now i have finished a website showing a XML parser which i wrote, do you want to have a look? come in, it's free! :)) http://creaturesx.ma.cx/kxparse/ yours, khalid _ Get a speedy connection with MSN Broadband.  Join

Re: [PHP] test

2002-10-30 Thread Khalid El-Kary
hey it's a PHP mailing list, people here are developers, you must send something with action inside it like this Testing 5 Testing 5 Testing and awaiting for server response even if youa ren't awaiting Loading ... :)) _ Get

[PHP] Kxparse 0.2

2002-11-03 Thread Khalid El-Kary
hi, i want to just tell you about the new release of Kxparse (a XML parser) you can find everything about the new release here http://creaturesx.ma.cx/kxparse/ khalid _ Surf the Web without missing calls! Get MSN Broadband.

[PHP] Threads

2002-11-03 Thread Khalid El-Kary
hi, i would like to ask about PHP threads support, is there any threads support, how powerful, please redirect me to the right place thanx khalid _ Unlimited Internet access -- and 2 months free!  Try MSN.

[PHP] fgets()

2002-11-03 Thread Khalid El-Kary
hi, i want to open a remote file using fopen() i tried both of these ways $filename=http://www.domain.com/filename.txt;; $file=fopen($filename,r); $filecontents=fread($file,filesize($filename)); this one didn't work because it's apparent that the file isn't in the local file system so

Re: [PHP] php help for project!!

2002-11-05 Thread Khalid El-Kary
hi, check the PHP Manual about MySQL functions: http://www.php.net/manual/en/ref.mysql.php you can also check for HTML forms (including checkboxes) here: http://www.w3schools.com/html/html_forms.asp and tables (for the reports): http://www.w3schools.com/html/html_tables.asp if you face a

Re: [PHP] array()

2002-11-05 Thread Khalid El-Kary
hi, this one worked well, but to print the array you must use print_r() instead of echo print_r($test); khalid _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

Re: [PHP] array()

2002-11-05 Thread Khalid El-Kary
sorry ... big said the right, but you must use print_r() if you want to print the array _ Internet access plans that fit your lifestyle -- join MSN. http://resourcecenter.msn.com/access/plans/default.asp -- PHP General Mailing

Re: [PHP] arrays

2002-11-05 Thread Khalid El-Kary
hi, the function array is for making a new array. Observe this code and you will get the point (assuming that you won't to loop for five times) $myarr= array() for ($i=0;$i=5;$i++) { $myarr[$i]=$i; } //you can then get the values of the array echo $myarr[0]; echo $myarr[1]; //and like that

Re: [PHP] Convince teh boss

2002-11-06 Thread Khalid El-Kary
hi, thanx for that list it's really convincing for these Microsofts :) just something i wanted to ask about, is it a good thing or better for security to hide the script name from the address bar, through that list i found all the PHP pages hidden with HTML names, i don't know the technique

[PHP] big include

2002-11-08 Thread Khalid El-Kary
hi, I wanted to ask about if big include files affect the speed of the script ? Normally, it should, but i heared that PHP stores the parsed result of scripts in memory since the first run for next usage, is that true? and if not, does parsing 21 KB very time, really affects the speed? thanx

Re: [PHP] big include

2002-11-08 Thread Khalid El-Kary
hi, thanx ernest, infact every line in the code has a comment (maybe a long comment) directly above it :) and you are right i may be also able to remove some functions when they are not needed thanx khalid _ Tired of spam? Get

[PHP] re: W3C and PHP

2002-11-08 Thread Khalid El-Kary
hi, just use amp; instead a href=mypage.php?name=khalidamp;age=d/a _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- PHP General Mailing List (http://www.php.net/)

[PHP] confusion in session vars

2002-11-09 Thread Khalid El-Kary
hi, did any one face a prob when session vars get mixed from a website to another when you use the same browser window ? _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus

Re: [PHP] fopen() using non-standard port

2002-11-09 Thread Khalid El-Kary
hi, i suggest that you use CURL, check the PHP manual if CURL did't help you can use the lower-level PHP sockets extension also check the PHP manual khalid _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE*

RE: [PHP] How good is PHP to ASP?

2002-11-10 Thread Khalid El-Kary
oh man you missed a great opportunity, through the last few days some one posted a message saying convince the boss containing a list of well-known websites running PHP, go check the list archive it will be available there _

Re: [PHP] Submit hitting enter problem

2002-11-10 Thread Khalid El-Kary
well, you are right they may work, but according to the sepcification qoutes should be added, you should follow it, because you don't know the hidden browsers out there which you didn't test, and IE, Opera, NS can't guarantee that they will support this behaviour in future releases

Re: [PHP] XML into PHP

2002-11-12 Thread Khalid El-Kary
hi, do you want to show the whole XML content (including tags and other things) or you want to extract data (tag text and attribute vaules) from it? khalid _ The new MSN 8: smart spam protection and 2 months FREE*

Re: [PHP] XML into PHP

2002-11-12 Thread Khalid El-Kary
hi, try this parser http://creaturesx.ma.cx/kxparse/ (not stable) _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Including without a file

2002-11-13 Thread Khalid El-Kary
hi, if no one suggested a better way, i suggest that you write your data to a file stream and then include it, but this will be time consuming (as i think) so you should check a better way khalid _ MSN 8 with e-mail virus

Re: [PHP] Including without a file

2002-11-13 Thread Khalid El-Kary
hi, you may use chown, chgrp, chmod _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] something like array_walk?

2002-11-15 Thread Khalid El-Kary
hi, just remove the from the first argument of array_walk, the function then operates on a copy of the array. this is written in the PHP manual, check there khalid _ Add photos to your messages with MSN 8. Get 2 months FREE*.

[PHP] Strings and php.ini

2002-11-15 Thread Khalid El-Kary
hi, are there any php.ini directives that control the PHP string functions? sorry i'm not percise but infact i have a 1200 lines script that acts well on a windows machine with PHP 4.2.3 Apache 1.3.24, but on a linux machine with PHP 4.2.1 (keep it secret :)) and Apache 1.3.20 it acts bad but

Re: [PHP] Strings and php.ini

2002-11-16 Thread Khalid El-Kary
hi, infact i'm un able to obtain a copy of my hosting company's php.ini thanx _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- PHP General Mailing List

Re: [PHP] Strings and php.ini

2002-11-16 Thread Khalid El-Kary
hi, the script infact never used register_globals because it's a class that has nothing to do with the direct script input, but there's an idea that came to my mind, maybe the company compiled its own PHP? may this change anything? generally is Linux different from windows in String functions?

Re: [PHP] Strings and php.ini

2002-11-16 Thread Khalid El-Kary
hi, i was asking if there should be difference in functionality of PH string functions (not mb_) between the two following configurations: the company: PHP 4.2.1, Apache 1.3.20, linux me: PHP 4.2.3, Apache 1.3.24, windows my confthe company's conf thread safety Enabled Disabled

RE: [PHP] PHP search engines

2002-11-17 Thread Khalid El-Kary
hi, It depends on the data storage system you use, and the more you get deeper with it the more you get it more customized for your own site, i mean that when you do it with the natural PHP APIs it's better rather than obtaining a ready-made search system, however if you want to use a

Re: [PHP] STRICTLY CONFIDENCIAL

2002-11-17 Thread Khalid El-Kary
oh i caught you, i'll go before you :-) _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Display character 'x' times

2002-11-19 Thread Khalid El-Kary
hi, $numtimes=400; for ($i=1;$i=400;$i++) { echo 'd'; } ---Or--- $numtimes=400; for ($i=1;$i=400;$i++) echo 'd'; -Or $numtimes=400; for ($i=1;$i=400;$i++) {?d?} _ Tired of spam? Get advanced junk mail protection with

Re: [PHP] php teleprogramming -- How to avoid being ripped off ?

2002-11-23 Thread Khalid El-Kary
hi, don't be so unhappy withit, because you won however, money comes and goes knowledge stays, through this experience you learned much, right? so you didn't lost much! :-) _ Tired of spam? Get advanced junk mail protection

Re: [PHP] How to obtain unique XML Elements

2002-11-23 Thread Khalid El-Kary
hi, you can get this parser http://creaturesx.ma.cx/kxparse/ if you want only this limited functionality (take an old version) 0.2 for example, you may also want to take only particular functions from it this is valid in all cases (as i think), except that you are developing another parser :)

Re: [PHP] Parsing XML files, logic involved...

2002-11-27 Thread Khalid El-Kary
hi, If you are sure that all your files come with attributes double quoted (not single quoted) you may want to use this parser class: http://creaturesx.ma.cx/kxparse/ hint: use the function has_attribute() to verify whether an attribute is available Regards, khalid

[PHP] 2D Array

2002-11-28 Thread Khalid El-Kary
hi, which is faster; filling two array elements with two values, or making a two dimensional array to handle the two values in one element ... which is better for Memory usage as well ? (considering that both of them serve well in my situation) thanx in advance Regards, Khalid Al-Kary

Re: [PHP] First PHP

2002-11-29 Thread Khalid El-Kary
hi, how about the manual? http://www.php.net/manual/en/history.php#history.php :) Regards, khalid _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- PHP General