FAQ

Search Discussions

903 discussions - 2,116 posts

  • Hi note'lers, as i don't know if i have Karma to fix this and i actually don't know how i can sign in to delete/edit notes, have a look at the note with the id 35477 (function getdate): It's spam. I ...
    AliAli
    Sep 5, 2003 at 12:36 pm
    Sep 5, 2003 at 3:12 pm
  • Following are the top 20 pages of the manual, sorted by the number of user notes contributed. These sections could use a polish, those notes represent 8.7% of the 8959 total user notes. Notes | Page ...
    PhpdocPhpdoc
    Sep 13, 2003 at 1:10 pm
    Sep 13, 2003 at 3:14 pm
  • Regular Expressions Tutorial from non PHP sites http://www.amk.ca/python/howto/regex/ http://sitescooper.org/tao_regexps.html http://www.english.uga.edu/humcomp/perl/regex2a.html ...
    BijuBiju
    Sep 21, 2003 at 1:02 am
    Oct 2, 2013 at 8:57 pm
  • I think an example is in order to specify what is meant by "returns a string containing a byte-stream representation of value that can be stored anywhere." Here's an example: $data = "php"; ...
    Iam4webworkIam4webwork
    Sep 14, 2003 at 9:02 pm
    Nov 6, 2012 at 2:03 am
  • Yeah yeah yeah... I forgot a return at the end :D It's gotta be: function mysql_buffered_query($data_select, $data_connection) { $sql_query = mysql_query($data_select, $data_connection); while($tmp = ...
    Php-generalPhp-general
    Sep 11, 2003 at 2:24 am
    Feb 26, 2007 at 6:52 am
  • Usually, not multipart or 'zero-parts' messages are displayed with imap_body, but you may have a multipart message with no parts. For this type, displaying with imap_body, you may get unwanted ...
    SitoSito
    Sep 11, 2003 at 10:11 am
    Jan 15, 2007 at 12:33 am
  • On jesusjr at mindless dot com's note The problem he mentioned is very important but his guess is wrong for sure. Of course, PHP doesn't evaluate any expressions inside quotation marks. "n/a" is ...
    RomikRomik
    Sep 7, 2003 at 11:06 am
    Mar 27, 2006 at 11:35 am
  • A little functio wich helps if you want to make a photo galery program.... $maxWidth & $maxHeight define the maximum size of a thumbnail image. The programs calculates automatically which contraint ...
    LhaLha
    Sep 12, 2003 at 10:09 pm
    Oct 4, 2004 at 9:42 am
  • If you want to catch output instead of printing it - use file-get-contents ---- Manual Page -- http://www.php.net/manual/en/function.readfile.php Edit Note -- ...
    NilsNils
    Sep 9, 2003 at 10:05 am
    Sep 24, 2004 at 1:27 am
  • a bit simplier case-insensitive text highliter $sBuff = preg_replace('/('.preg_quote($sHighLite).')/i', '<span style="color: Red;" \1</span ', $sBuff); ---- Manual Page -- ...
    GreeGree
    Sep 28, 2003 at 7:13 pm
    Jun 26, 2004 at 2:53 pm
  • As of very recently, Verisign have abused their market position and have entered a wildcard A RR in the .com and .net zone files. This means that any domain that doesn't exist within the zone files ...
    MM
    Sep 22, 2003 at 3:04 pm
    Feb 27, 2004 at 4:05 pm
  • Because of some bogus bug reports I will explain some problems with CGI environment variables: a) iPlanet/SunONE/Netscape is a multithreaded web server. Because of that all requests are running in ...
    ThetaphiThetaphi
    Sep 22, 2003 at 12:53 pm
    Dec 12, 2003 at 4:35 pm
  • A silly hack (which could prove to have some usefulness) to create a "progress indikator" using Andreas Schmeiler's hex2bin: Run this in command line: #!/usr/bin/php4 -q <? $progress[]="|"; ...
    MkrMkr
    Sep 11, 2003 at 11:25 am
    Dec 2, 2003 at 4:07 pm
  • I finally solved a huge problem I was having. I was setting a cookie using setcookie() like this: setcookie ('mycookie','$cookievalue'); and I was wondering why my script kept saying that the cookie ...
    David NospamDavid Nospam
    Sep 15, 2003 at 1:38 am
    Sep 22, 2003 at 2:14 pm
  • Because of some bogus bug reports I will explain some problems with CGI environment variables: a) iPlanet/SunONE/Netscape is a multithreaded web server. Because of that all requests are running in ...
    ThetaphiThetaphi
    Sep 22, 2003 at 12:57 pm
    Sep 22, 2003 at 1:03 pm
  • I have an array of arrays, and array_unique seems to kill off all but the first element of the arrays. I'm guessing this is because all the array element have the same string representation. ---- ...
    EddiekimEddiekim
    Sep 17, 2003 at 4:01 pm
    Sep 17, 2003 at 4:07 pm
  • strip_tags() appears to become nauseated at the site of a <!DOCTYPE declaration (at least in PHP 4.3.1). You might want to do something like: $html = str_replace('<!DOCTYPE','<DOCTYPE',$html); before ...
    DougalDougal
    Sep 10, 2003 at 5:05 pm
    Sep 20, 2012 at 11:42 am
  • If you need to reverse an array by reference, you can use the following function. <? function &array_reverse_ref(&$a) { $r = array(); for($i=0, $j=count($a); $i<count($a); $i++, $j--) { $r[$i] =& ...
    MichielMichiel
    Sep 8, 2003 at 4:56 pm
    Jun 8, 2012 at 8:29 pm
  • In respons to paj at pajhome dot org dot uk @ 21-May-2003 03:20: In many cases, there is only hash of password saved on server, so JavaScript script must return: md5(md5(password) + random) and ...
    Mina86Mina86
    Sep 12, 2003 at 9:42 pm
    Jun 20, 2011 at 3:20 pm
  • Re: Handling uploads and downloads of large files and storing in MySQL. Use two tables to store data about the file and the file data itself. ***Important: to preserve the integrity of the data use ...
    TherebechipsTherebechips
    Sep 6, 2003 at 6:04 pm
    Jan 23, 2011 at 4:56 pm
  • function is_upper($input) { return ($input == strtoupper($input)); } function is_lower($input) { return ($input == strtolower($input)); } this functions check if a string is all upper/lower case. ...
    DjhookDjhook
    Sep 11, 2003 at 11:22 pm
    Nov 1, 2010 at 2:03 pm
  • Here is an example of catching ALL errors from php including parse and compile. This example comes from a web page referenced in another post (http://www.webkreator.com/cms/view.php/1692.html ). My ...
    SmpSmp
    Sep 8, 2003 at 7:29 pm
    Oct 18, 2010 at 4:11 pm
  • Re: Kristin: Line feed vs carriage return I may be wrong, it's been a while since I cared about the difference. Line feeds add a new line below the current carriage position and moves the carriage to ...
    LoremasterLoremaster
    Sep 9, 2003 at 5:28 am
    Sep 15, 2010 at 9:13 pm
  • Easier hex2bin function: function hex2bin($data) { $len = strlen($data); return pack("H" . $len, $data); } ---- Manual Page -- http://www.php.net/manual/en/function.bin2hex.php Edit Note -- ...
    MikeMike
    Sep 28, 2003 at 5:44 pm
    Aug 17, 2010 at 1:44 am
  • This took me days to work out how to do so I gotta share it: How to get the word count from a MS Word Document: #Instantiate the Word component. $word = new COM("word.application") or die("Unable to ...
    PhpPhp
    Sep 6, 2003 at 5:18 pm
    Dec 22, 2009 at 2:06 pm
  • Took me a while to work this out as there is very little help available. Accessing com variables that are multi arrays can prove tricky. e.g. $ex = new COM("application"); $ex- Stock- stSalesBands is ...
    MkcostelloMkcostello
    Sep 22, 2003 at 1:37 pm
    Dec 22, 2009 at 2:06 pm
  • just to clarify that you can 'chain' expr1, expr2 and expr3, for instance: <? for($i=0 , $j=10 ; $i<5 ; $i++ , $j+=5, $k=($i+$j)) { echo "i: $i<br / j: $j<br / k: $k<br / <br / "; } ? produces: i: 0 ...
    PhpPhp
    Sep 15, 2003 at 8:47 am
    Dec 7, 2009 at 3:55 pm
  • Setting $this to null isn't available in PHP 4.3.3R3 anymore. Maybe in version below also. ---- Manual Page -- http://www.php.net/manual/en/language.oop.constructor.php Edit Note -- ...
    MarkusMarkus
    Sep 16, 2003 at 7:02 am
    Nov 7, 2009 at 6:46 pm
  • To workaround the problem that some people are having on multiple creator (or sub creators or whatever)... Its just to use an event! Yes... U can emulate an event (like the inprize people do) Here it ...
    PigmeuPigmeu
    Sep 19, 2003 at 7:32 pm
    Nov 7, 2009 at 6:46 pm
  • Adding to the last post... If u DON'T WANT to override the parent creator just put <? // ... function On_Create() { parent::On_Create(); // Some code } //... ? It will calls the parent creator and u ...
    Php-generalPhp-general
    Sep 20, 2003 at 8:10 am
    Nov 7, 2009 at 6:45 pm
  • if you want to join two tables having both the same column (e.g. 'id') but you don't want to (or cannot) specify all the other fields in these two tables (like erabbott mentioned), you can use: ...
    GabiGabi
    Sep 1, 2003 at 2:31 pm
    Oct 8, 2009 at 7:21 pm
  • Just a note. When INSERTing a CLOB, if a VALUES clause is used, Oracle notes: You cannot initialize an internal LOB attribute in an object with a value other than empty or null. That is, you cannot ...
    Maxwell_smartMaxwell_smart
    Sep 23, 2003 at 6:15 pm
    Oct 8, 2009 at 7:16 pm
  • <?php // Connect to Oracle database. // Username : Raju // Password : Password // Database : Database_name $conn=OCILogon("Raju", "Password", "DATABASE_NAME"); if ( ! $conn ) { echo "Unable to ...
    RajuRaju
    Sep 14, 2003 at 11:38 pm
    Oct 8, 2009 at 7:01 pm
  • flock() is disabled in some linux kernels (2.4 in my case), it always returns success. i'm using sysv semaphores to compensate. notice : knowing how to use icps and icprm are essential to debugging ...
    Thanatos_101Thanatos_101
    Sep 24, 2003 at 9:45 pm
    May 18, 2009 at 12:43 am
  • The following scripts show how to post form to a web server via https. I modified rodrigo posting because it did not work for me on IIS5. <?php $url = 'https://www.yourserver.com/yourrequest; $params ...
    AlwongAlwong
    Sep 20, 2003 at 11:37 pm
    May 17, 2009 at 7:39 pm
  • There are several characters that dont work correctly if part of the cookie name, I in particular ran into problems using = as part of the cookie name ie/ setcookie('dE4fR=', $foo); this was as a ...
    DaveDave
    Sep 9, 2003 at 8:46 pm
    May 17, 2009 at 5:58 pm
  • // htmlentities() does not support Mac Roman, so this is a workaround. It requires the below table. // This function runs on a Mac OSX machine, where text is stored in the Mac Roman character set ...
    DmurphyDmurphy
    Sep 19, 2003 at 3:16 pm
    May 17, 2009 at 5:06 pm
  • Jeff's array2file function is a good start; here are a couple of improvements (no possibility of handle leak when fwrite fails, additional capability of both string2file and array2file; presumably ...
    DirDir
    Sep 12, 2003 at 6:49 pm
    Mar 1, 2009 at 6:39 pm
  • On WinXP with Apache2 and PHP 4.3.3 you cannot start a program in background with exec and start. you have to do the following. This function should work on Windows and Unix, too. function ...
    JonasJonas
    Sep 12, 2003 at 1:26 pm
    Jan 4, 2009 at 4:19 pm
  • If you're wondering how to catch error messages when calling exec, you simply need to use 2 &1 at the end of your command, and then error messages will get populated into your $output string (i.e. ...
    ZitanZitan
    Sep 19, 2003 at 2:21 am
    Jan 4, 2009 at 4:18 pm
  • <? function jsaddslashes($s) { $o=""; $l=strlen($s); for($i=0;$i<$l;$i++) { $c=$s[$i]; switch($c) { case '<': $o.='\\x3C'; break; case ' ': $o.='\\x3E'; break; case '\'': $o.='\\\''; break; case ...
    Php-generalPhp-general
    Sep 21, 2003 at 3:46 pm
    Nov 2, 2008 at 5:06 pm
  • You may want to take note that if you try to open a font file that isn't readable or doesn't exist, you will NOT get any kind of error back. You will in fact get an SWFFont object back that looks ...
    PheePhee
    Sep 7, 2003 at 7:27 am
    Sep 26, 2008 at 3:14 pm
  • For everyone who needs this to work on FreeBSD 4.8 with php 4.3.3 (and for me next time i have to do it), please perform the following: unpack the tar.gz file for php. cd php-4.3.3/ and run the ...
    RrolfeRrolfe
    Sep 6, 2003 at 5:18 pm
    Sep 26, 2008 at 3:11 pm
  • To emulate a web browser with PHP using socket functions, there is a very good class to do this: http://sourceforge.net/projects/snoopy/ Some of its features: * easily fetch the contents of a web ...
    PulstarPulstar
    Sep 23, 2003 at 3:27 pm
    Jul 20, 2008 at 7:44 pm
  • When adding a timestamp to a database from php, be carefule because if your DB Server is a different computer than your webserver, the NOW() function in the SQL will use the DB Server's time, and not ...
    IntronisIntronis
    Sep 11, 2003 at 3:05 pm
    Jul 20, 2008 at 3:01 am
  • I have made a slight modification to treebe's jd to greg function, this one will transform a unix timestamp to Gregorian day/month/year format... function unix_to_greg($unix_timestamp) { $julian = ...
    Uni_fl4r3Uni_fl4r3
    Sep 14, 2003 at 12:06 pm
    Jul 20, 2008 at 2:01 am
  • I had some troubles when trying to resize an image gotten from a database blob field... Perhaps that these image functions don't work with opened image streams... So, I had to make this workaround... ...
    PigmeuPigmeu
    Sep 2, 2003 at 5:09 pm
    Jun 29, 2008 at 9:05 pm
  • The script shows how to get a simple response of a SSL Server. Enjoy it! <?php $defined_vars = get_defined_vars(); $_url = 'https://www.example.com.br'; $_VAR001 = 'nono'; $_VAR002 = 'nonono'; ...
    Rodrigo NakahodoRodrigo Nakahodo
    Sep 18, 2003 at 4:58 pm
    Mar 30, 2008 at 7:08 pm
  • inserting IP-to-Country Database into mysql <? //CREATE TABLE `ip2country` ( // `id` int(25) NOT NULL default '0', // `ipFrom` int(15) NOT NULL default '0', // `ipTo` int(15) NOT NULL default '0', // ...
    Chery79Chery79
    Sep 20, 2003 at 6:20 pm
    Feb 10, 2008 at 1:32 pm
  • Hey ... it is the LIFO (not FIFO)!! An Example: for ($i = 0;$i < 100;$i++) { swf_removeobject($this- Depth); swf_removeobject($this- Depth); swf_addcolor(0,0,0,0); $this- modifyCoords(); ...
    MatheMathe
    Sep 15, 2003 at 12:47 pm
    Dec 31, 2007 at 2:00 am
Group Navigation
period‹ prev | Sep 2003 | next ›
Group Overview
groupphp-notes @
categoriesphp
discussions903
posts2,116
users574
websitephp.net

574 users for September 2003

Vincent: 594 posts Sniper: 408 posts Mehdi: 223 posts Pollita: 68 posts Php-general: 63 posts Betz: 57 posts Ali: 27 posts : 13 posts Philip: 8 posts Php: 6 posts Abies: 6 posts Kop: 5 posts Nathan: 5 posts Thomas Hebinck: 5 posts Php-manual3: 5 posts Zitan: 5 posts Allowee: 5 posts Mehdi Achour: 5 posts Mathe: 4 posts Bob: 4 posts
show more
Archives