[PHP] null as function argumnent?

2004-12-08 Thread Bas Jobsen
Hi, I want to use a ?: statement. If not true de default function argument have to be used. How to do this What do i have to pass instead of null to get default print? Tnx, Bas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help inserting compressed data into a mysql database

2003-06-16 Thread Bas Jobsen
$data = @gzinflate(stripslahes($data)); Op maandag 16 juni 2003 18:03, schreef u: > Hi, > > I am trying to insert compressed data into a database. > > Inserting it in seems to work file: > > $data = addslashes(gzdeflate($data, 9)); > > > For the most part it works on reteiving the data but somet

Re: [PHP] error reporting linenumber and filename[Scanned]

2003-06-16 Thread Bas Jobsen
which produced the error. > > I'm not sure that there is a way beyond this to show the line within the > function but I don't see that this would be necessary - at least not for > resolving errors. > > HTH, > > Michael Egan > > -Original Message- >

[PHP] error reporting linenumber and filename

2003-06-16 Thread Bas Jobsen
Hi, Running the code below, shows an errror in line 2 as expected. How do i get the linenumber of the function call? 3 here. Best regards, Bas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] categorise list

2003-06-09 Thread Bas Jobsen
$letter=''; $while($row=mysql_fetch_array($result)) { if($letter!=$row[name][0]) { echo $row[name][0].''; $letter=$row[name][0]; } echo $row[name].''; } Op maandag 09 juni 2003 12:41, schreef u: > I am dispalying data from mysql database using the codes below: > > $while($row=mysql_fetch_array($

Re: [PHP] convert seconds to hours, minutes, seconds

2003-06-03 Thread Bas Jobsen
function secondstohours($seconds) { /* [EMAIL PROTECTED] */ $sec=$seconds%3600; return (($seconds-$sec)/3600).':'.($sec/60).':'.($sec%60); } echo secondstohours(7500); Op dinsdag 03 juni 2003 14:38, schreef u: > Hello everybody, > I have a value 178607, which is stored as

Re: [PHP] Correct number format (curency)

2003-02-20 Thread Bas Jobsen
> Example > > 1.000,00 > 1000.00 > 1,000.00 > > I would like to convert those to a single format > 1000.00 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] recursion?????

2003-02-14 Thread Bas Jobsen
not tested > Basically, have the form action call itself hince the recursion. > Any suggestion/examples? method="POST"> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] array_search() problem

2002-09-12 Thread Bas Jobsen
> What I was looking for was finding out what was the index of thet > value, lets say I have a array with some values like (23, 56, 45, 47) > and i don't know where the walue I'm looking for is indexed in the array > and I want to find out what the indexnumber is, how would that be > possable $v

Re: [PHP] array_search() problem

2002-09-12 Thread Bas Jobsen
> Hi I'm runing a PHP Version 4.0.4pl1 on Solaris 8 X86 on apache, and I'm > trying to search an array >From the manual: array_search (PHP 4 >= 4.0.5) send earlier to this list: Re: [PHP] Array - Match From: Bas Jobsen <[EMAIL PROTECTED]> To: "N. Pa

Re: [PHP] split() - not working in this case

2002-09-08 Thread Bas Jobsen
, efgh <[EMAIL PROTECTED]>"; $tos=split_addresses($to); echo $tos[1]; ?> echos efgh <[EMAIL PROTECTED]> ?? Whats the problem? Maybe you output to a browser and don't see <[EMAIL PROTECTED]> cause its between <> Op zondag 08 september 2002 10:17, schreef N. Pari Purna Chand: > I have a string

Re: [PHP] Array - Match

2002-09-07 Thread Bas Jobsen
= 4.0.5 && < 4.2.0 if(is_null(($b=array_search($sub,$subs echo 'not found!'; else echo 'found! In $sub['.$b.']'; //or for PHP 4 >= 4.2.0 if(($b=array_search($sub,$subs))) echo 'found! In $sub['.$b.']'; else echo 'not found!'; ?> -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] String operation

2002-09-04 Thread Bas Jobsen
$string3 = str_replace($string1,'',$string2); ??? Op woensdag 04 september 2002 17:04, schreef Richard Fox: > Hi > > Given > > string1 = /home/web/ > string2 = /home/web/www/index.php > > How can I elegantly do an exclusive or of string1 with string2, that is, I > want to end up with > > strin

Re: [PHP] Refering to an object from within an array variable in another class

2002-09-03 Thread Bas Jobsen
> Any insight appreciated. In a best case if someone can add in the required > '&'s to the following code that would be great. ' ; error_reporting ( E_ALL ) ; class Foo { var $bars = array() ; function AddBar($id,$text)

Re: [PHP] greeting based on time

2002-09-03 Thread Bas Jobsen
Op dinsdag 03 september 2002 13:01, schreef Javier Montserat: > really simple one - > > does someone have a bit of code that will variously display 'good morning', > 'good afternoon', 'good evening' based on the current time? > > good morning from london, > > Javier > > > >

Re: [PHP] wordwrap function (that skips html tags)

2002-09-03 Thread Bas Jobsen
Hello, What's your php version? Take at look at: http://www.php.net/manual/en/function.wordwrap.php and http://www.php.net/manual/en/function.strip-tags.php b.e. $str='http://www2.snm-hgkz.ch/~rieger/notepool/addnote.php'; echo wordwrap(strip_tags($str),8,'',1); i you can't use wordwrap(), try:

Re: [PHP] limit in a loop function to prevent server load

2002-09-03 Thread Bas Jobsen
Op dinsdag 03 september 2002 10:46, schreef u: > hi there i was wondering if there was a way to limit the ammount of items > in a loop to execute sleep then execute the rest of the items to prevent > server load ? for($i=0;...) { if($i>0&&$i%100==0)sleep(10); } -- PHP General Mailing List

Re: [PHP] How do I call a CGI script from PHP?

2002-08-26 Thread Bas Jobsen
> PHP page, nothing fancy. .In SSI, I just use the "#exec cgi=" line--is $test = `path_to_your_cgi 2>&1`; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help with matchng strings

2002-08-25 Thread Bas Jobsen
$lista=array(1,2,3,4,5,6,7,8,9); $listb=array(4,6,8); $listc=array_intersect($lista,$listb); $listd=array_diff($lista,$listb); Op maandag 26 augustus 2002 01:48, schreef Rasmus Lerdorf: > array_intersect() will give you listC directly. Just feed it list A and > B. Then you can take a copy of l

Re: [PHP] Count number of rows in table.

2002-08-25 Thread Bas Jobsen
> $sql = "select count(*) from table_name WHERE ."; > $result = mysql_query($sql) or die(mysql_error); > $row = mysql_fetch_row($result); > $rowCount=$row[0]; or $sql = "select count(*) from table_name WHERE ."; $result = mysql_query($sql) or die(mysql_error); $rowCount=mysql_result($resu

Re: [PHP] problem with using link variables

2002-08-25 Thread Bas Jobsen
> If the variable provnum contains text such as: hello & there urlencode($provnum); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Eregi_replace

2002-08-22 Thread Bas Jobsen
eregi_replace(']+>','',$string); Op donderdag 22 augustus 2002 14:42, schreef Roman Duriancik: > How to create pattern for function eregi_replace to > replace in html document every html tag for empty string. > > Thanks > > > roman -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: [PHP] Exiting from an include or required file

2002-08-21 Thread Bas Jobsen
Do: FILE A: Op woensdag 21 augustus 2002 16:39, schreef Henry: > Hi All, > > I would like to exit from an include file and continue in the calling > script! > > As an example > > FILE A: > > if (empty($_POST['search_criteria')) > { > echo "You must provide search criteria"; > > // exit

Re: [PHP] array_splice()

2002-08-21 Thread Bas Jobsen
$test=array('a'=>1,'b'=>2,'c'=>3); foreach ($test as $key=>$value) { if ($value==2) unset($test[$key]); } or $test=array('a'=>1,'b'=>2,'c'=>3); $i=0; foreach ($test as $key=>$value) { if ($value==2) array_splice($test,$i,1); $i++; } Op woensdag 21 augustus 2002 12:17, schr

Re: [PHP]

2002-08-20 Thread Bas Jobsen
echo `PATH_TO_PERLSCRIPT.CGI 2>&1`; Op dinsdag 20 augustus 2002 09:47, schreef Peter Janett: > I'm converting over some .shtml files that call an external Perl script > with the following format: > > > I'm not sure what php function to use, as I'm returning the results of a > Perl script, not re

Re: [PHP] preg_match help?

2002-08-17 Thread Bas Jobsen
preg_match("/.*]+>(.*).*/", $contents,$story); echo $story[1]; preg_match always return a array. The first element ($array[0])contains your complete regexp. The next ($array[1])one the first match between () etc. Don't use ! but / Op zondag 18 augustus 2002 01:27, schreef Jason Soza: > I se

Re: [PHP] quick ereg() question

2002-08-17 Thread Bas Jobsen
if (ereg("((\.)(php|inc))$",$o0o) && !ereg("\/\.\.", $o0o)){ Op zaterdag 17 augustus 2002 23:53, schreef eriol: > I checked the manual and it's comments as well as google, but didn't find > the simple answer i'm wanting.. > > I have the following line in a "show php source code" page: > > > i

Re: [PHP] Include/require and the HTML Code

2002-08-14 Thread Bas Jobsen
> Can anybody tell me why I get a "Parse error: parse error, > unexpected '}' in /usr/local/apache/htdocs/logbook/Functions.inc on line begin and end your include files with bllaalla -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysql_num_rows($Result)

2002-08-14 Thread Bas Jobsen
In your database design you need the following every username/pass comb is unique. so a query like ... WHERE username='$testvalue' AND password='$testvalue2' Have to give you one row for a good user/passcombination ALWAYS. And 0 rows for a wrong combination. If NOT your design doesn;t fit you

Re: [PHP] SESSION Security

2002-08-14 Thread Bas Jobsen
Op donderdag 15 augustus 2002 01:03, schreef u: > So, if somebody gets an ftp account somehow, he will be able to get session > vars via a system() command? You holds him in its own dir by the chroot setting of you ftpserver. > via a system(); you mean if they upload a php file? prevent that wit

Re: [PHP] file_get_contents ( string filename [, int use_include_path])

2002-08-14 Thread Bas Jobsen
> string filename The name of the file. b.e test.html or $_SERVER['DOCUMENT_ROOT'].'test.html' > int use_include_path Optional 1 true or 0 (or nothing) false the file above is in my default include path. Manual: you can use the optional second parameter and set it to "1", if you want to search f

Re: [PHP] [Class] "global" again, not working?

2002-08-14 Thread Bas Jobsen
Hi, do -- echo $data[0]*$data[1]); return ($data[0]*$data[1]); -- i think its empty. In the first place, i thought it was maybe impossible to call a class-functions in your constructor. (Cause the class function don't exists at the moment you call your constructor). But the code below showed i

Re: [PHP] problem with $_POST

2002-08-14 Thread Bas Jobsen
Op woensdag 14 augustus 2002 20:57, schreef Adam Williams: > Does anyone know why it is not working with $_POST but works fine with > $_GET? I don't know, but maybe you has to put "" around POST, method="POST". It works then with GET, cause that's default. Maybe something else is wrong, so met

Re: [PHP] Array question

2002-08-14 Thread Bas Jobsen
> How can I echo the name of the of the second array (subArray)? The name for value array('1','2'.'3'), 'c'=>array('6','5'.'4'), 'd'=>array('8','9'.'10'), ); $r=next($test); echo $r[0].' or :'."\n"; foreach

Re: [PHP] regex match problem

2002-08-14 Thread Bas Jobsen
To Match: Tue, Jul 29, 2003 > $pregmatchstring="/([\s])*(Renewal\DDate|Registered\sthrough|Expires|Record >\sExp ires|Domain\sExpires|Expiry\sDate)([\D\s]*)(.*)/i"; You can change the last part of $pregmatchstring in: Expiry\sDate)([\D\s]*|\w{3},\s\w{3}\s\d{2},\s\d{4})(.*)/i"; You can f

Re: [PHP] error reporting

2002-08-14 Thread Bas Jobsen
start your file with : error_reporting(E_ALL); Op woensdag 14 augustus 2002 20:09, schreef Georgie Casey: > rite, > > without access to the php.ini file, how can i get php to print all errors > on my web server. it runs linux > -- > Regards, > Georgie Casey > [EMAIL PROTECTED] > > ***

Re: [PHP] how many files are in a directory

2002-08-14 Thread Bas Jobsen
Op woensdag 14 augustus 2002 20:00, schreef Harry.de: > does anybody now a way in php to read out, > how many files are in a directory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [Class] Behaviour global variables

2002-08-14 Thread Bas Jobsen
$TEST= new TEST; $a=3; $b=4; $TEST->Show(); works, fine better to use $GLOBALS['a'] instead of global $a Op woensdag 14 augustus 2002 15:27, schreef Tim Stoop: > Hi there, > > I'm forgetting something, but I can't seem to get to it... Consider the > following Class. > > class Test > { >

Re: [PHP] fopen and sort by date modified

2002-08-14 Thread Bas Jobsen
Op woensdag 14 augustus 2002 13:04, schreef electroteque: > hi there i was wondering how i could fopen a directory and then sort the > files by date modified is there a way ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] no HTML in a form textarea field

2002-08-13 Thread Bas Jobsen
http://www.php.net/manual/en/function.strip-tags.php Op woensdag 14 augustus 2002 02:24, schreef Roger Thomas: > i presented my visitor to fill up some description about themselves via > HTML's textarea FORM element. > > how do i block them from entering unwanted HTML tags into the textarea > fiel

Re: [PHP] Read file dates for most recent

2002-08-13 Thread Bas Jobsen
Op dinsdag 13 augustus 2002 23:25, schreef Mike Davis: > I need to read a directory full of PDF files, and get the file date of the > most recent. > Can someone get me started? $latime) { $lasttime=filemtime($file); $lastfile=$file; } } } echo $lastfile.'

Re: [PHP] newbie array question

2002-08-13 Thread Bas Jobsen
Op dinsdag 13 augustus 2002 20:50, schreef Alexander Ross: > If I have a string variable that is already of the form > ('item','item2','item3') [including the parens and quotes in the string], > is there an easy way to change that variable into an array?? > Array($var) doesn't work. Thanks --

Re: [PHP] Template and Replacement

2002-08-13 Thread Bas Jobsen
http://www.php.net/manual/en/function.str-replace.php In PHP 4.0.5 and later, every parameter to str_replace() can be an array. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mkdate error?

2002-08-11 Thread Bas Jobsen
YOU use $parsed_date[2] in stead of $parsed_end_date[2] Op maandag 12 augustus 2002 00:01, schreef jc: > The following bit of code completely baffles me as to why it doesn't work. > I am doing a very simple validation where I check to see if the "end date" > field of an inputted record is an olde

[PHP] why true?

2002-08-11 Thread Bas Jobsen
echo ('test'==0); gives 1 why? Thanks, Bas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem with echo

2002-08-11 Thread Bas Jobsen
Op zondag 11 augustus 2002 16:42, schreef Kristoffer Strom: > Got a problem when echo:ing a variable containing alot of text. > When echoing it backslashes ("\") every apostrophe ("'") and quote ("). > This I don't like. > And I can't use HTMLSPECIALCHARS or HTMLENTITIES since the text has alot of

Re: [PHP] Problem with $PHP_SELF on PWS

2002-08-11 Thread Bas Jobsen
> http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Good Damn

2002-08-11 Thread Bas Jobsen
> if ($Result) { if(mysql_num_rows($Result)>0) Op zondag 11 augustus 2002 16:32, schreef Sascha Braun: > $Query = "SELECT * FROM basket_db WHERE session_id = '$PHPSESSID'"; > $Result = mysql_query($Query, $connect); > if ($Result) { > while ($arrResult = mysql_fetch_array($Result, MYSQL_ASSOC

Re: [PHP] passing an array in a link

2002-08-11 Thread Bas Jobsen
print "link" ; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Asking for help...

2002-08-08 Thread Bas Jobsen
Op donderdag 08 augustus 2002 23:22, schreef Ashley M. Kirchner: > DELETES another field and resubmits. At this point, that variable > was already registered, and deleting the value from the form has no > effect. The old value is still there and gets submitted. I need > to check

Re: [PHP] Creating variables...

2002-08-02 Thread Bas Jobsen
> That same script also gets a value ($step) from another one. Now I > need to figure out which $var_list# to use based on this $step value. Any > suggestion on how to do this? ${'var_list'.$step} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u

[PHP] shorter way to write include function?

2002-07-31 Thread Bas Jobsen
Hello, i have /include/dotest.php: and test.php: Us there a shorter way to write out that. I mean something like include::dotest; Thanks, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Speed issues.

2002-07-28 Thread Bas Jobsen
$string, dit is het"."\n"; 3) ?>: hallo , dit is het Best regards, Bas Jobsen Op zondag 28 juli 2002 09:56, schreef Yves Vrancken: > Greetings, > > I am new to PHP and trying to implement some PHP and MySQL on my website. > My website has a lot of tables and inside

[PHP] string comparison

2002-07-27 Thread Bas Jobsen
Hello, When should i prefer strcmp() above == or !=? I have test it out (see code below). But a == comparison seems to be faster always. First i thought is was cause, if(strcmp($1,$2)!=0), needs two comparisons (strcmp and !=). But even if($1!=$2) is faster then if(strcmp($1,$2)). Thanks, Bas

[PHP] unset array here?

2002-07-25 Thread Bas Jobsen
Hello, I have this example code: function doprint($a){foreach($a as $value)echo $value;} doprint(array('1','test','hello','and')); Question, is the array in memory after the function call? So, should it be better to use this: function doprint($a){foreach($a as $value)echo $value;} doprint($tem

Re: [PHP] an array_key_exists() substitute for php 4.0> <4.1 ?

2002-07-25 Thread Bas Jobsen
http://www.php.net/manual/en/function.array-key-exists.php: Note: The name of this function is key_exists() in PHP version 4.0.6. Op donderdag 25 juli 2002 18:53, schreef David D: > hello all, > > I download a gni script path2vars that manipulate query_string for web > crawlers. > But I have ph

Re: [PHP] String Manipulation

2002-07-25 Thread Bas Jobsen
Maybe something like: eregi('([a-z]*)( *)(\(*)([a-z]+)( *)(\)*)([a-z]*)',$string,$matches); echo $matches[4]; Op donderdag 25 juli 2002 17:13, schreef Mike: > Hello all, > I know that this has probably been discussed before and that you will > tell me to go through all the back messages on the li

Re: [PHP] redirecting after login

2002-07-23 Thread Bas Jobsen
> Umm...I hope register_globals is off... And if not. http://www.yourdomain.com/yourpage.php"; method="post"> Can be used from every server to login. Op dinsdag 23 juli 2002 12:42, schreef John Holmes: > > why don't u do something like > > > > if (!username) > > { you can not access this pa

Re: [PHP] Can a form submit to two PHP form processers in succession?

2002-07-22 Thread Bas Jobsen
//post to this script if($value_found_in_database) include('error_document.php'); else include('handling_script.php'); Op maandag 22 juli 2002 16:59, schreef DonPro: > Hi, > > I'm not sure how to do this but I have a form which I wish to do the > following. > > When the uses clicks the "submit bu

Re: [PHP] activating php scripts via cron

2002-07-16 Thread Bas Jobsen
Instead of a second version, you can call your script via lynx: TERM=vt100 0 * * * * lynx -dump http://www.domeinnaam.nl/yourscript.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] no-cache konqueror/opera

2002-07-16 Thread Bas Jobsen
Hello, How do i make a page which isn't cached for konqueror/opera browers? Now i have: $now = gmdate('D, d M Y H:i:s') . ' GMT'; header('Expires: ' . $now); header('Last-Modified: ' . $now); header('Cache-Control: no-store, no-cache, must-revalidate,pre-check=0, post-check=0, max-age=0'); he

Re: [PHP] substr_count() and regex

2002-03-17 Thread Bas Jobsen
Op zondag 17 maart 2002 20:15, schreef Gil Disatnik: > Hello there, > I am trying to use substr_count() to count the number of Hebrew characters > in a string, > I tried substr_count($test, "/[à-ú]/"), but it returns 0 as if it can't > match the regex I have inserted there, I hoped it will work

Re: [PHP] where is http_cookie ?

2002-03-16 Thread Bas Jobsen
mputer. Try > setting a cookie with > setcookie() before your > phpinfo() line on your > test.php page. > > Hope this helps. > > > -Jackson > > -Original Message- > From: Bas Jobsen > [mailto:[EMAIL PROTECTED]] > Sent: Saturday, March 16, 2002 &g

[PHP] where is http_cookie ?

2002-03-16 Thread Bas Jobsen
Hello, I have installed php 4.1.2. as a cgi module. But http_cookie isn't set. I don' know whats wrong. You can find the output of phpinfo() at http://www.tgp2stats.com/test.php Tnx, Bas Jobsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://w

Re: [PHP] write to specific place in file

2002-03-15 Thread Bas Jobsen
First read it, then split and then write it. $fp=fopen($file,"r"); $content=fread($fp,filesize($file)); fclose($file); $parts=explode($splitsign,$content); $fp=fopen($file,"w"); fwrite($fp,$parts[0].$insert.$splitsign.$parts[1]); fclose($file); Op vrijdag 15 maart 2002 19:09, schreef John P. Do

Re: [PHP] Real world regex

2002-03-04 Thread Bas Jobsen
> For another I need to get the 3rd opening table row tag after the 7th > opening tag. not tested: "(]+>.*){6}(]+>)([ ]*)(]*>)(.*){2}(]*>)(.*)" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Probably basic but seems advanced to me, PHP/SQL genera tion.

2002-02-28 Thread Bas Jobsen
e should be a seperate table per record. > > Each table containing the field name on the left and then the data on the > right. > > Is that clear to you ? > > Matt. > > > > -Original Message- > From: Bas Jobsen [mailto:[EMAIL PROTECTED]] > Sent: Thursday

Re: [PHP] excluding files

2002-02-28 Thread Bas Jobsen
if (($file_name != ".") && ($file_name != "..") && !eregi("[a-z0-9]+pv\.html",$file)) Op donderdag 28 februari 2002 16:32, schreef Craig Westerman: > while ($file_name = readdir($dir)) > > if (($file_name != ".") && ($file_name != "..")) > >$file_list .= "$file_name"; > } > > > This exclud

Re: [PHP] Probably basic but seems advanced to me, PHP/SQL generation.

2002-02-28 Thread Bas Jobsen
while ($row=mysql_fetch_row($result)) { echo "1 $row[0]" for($x=1; $x Hello PHP'ers. > > First of all - scince joining this list I have got some great help and it > is really helping my build me site so a BIG thank you to all. > > Now back to the help.. > > I have a table with cols, and sa

[PHP] fsockopen and HTTP Authorization

2002-02-27 Thread Bas Jobsen
Hello, I try to do a HTTP Authorization with a fsockopen, but it doesn't seem to work. Who can help? $user and $passwd are set well, my code: -- $auth=base64_encode($user.":".$passwd); $header="GET /pa2/ HTTP/1.0\r\n\r\n"; $header.="Accept: text/html\r\n"; $header.="Authorization: Basic $auth\r\

Re: [PHP] CGI

2002-02-26 Thread Bas Jobsen
Well, okay. It was an example. Then do: if (action=="cgi" && file_exists($script)) Op dinsdag 26 februari 2002 16:00, schreef bvr: > Please note that plain this: > >or > > >if (action=="cgi") echo `./cgi-bin/cgiscripts/${scripts} 2&>1`; > >?> > > is not a good idea, because it allows a visitor

Re: [PHP] CGI

2002-02-26 Thread Bas Jobsen
in index.php, you can do: or 1`; ?> Op dinsdag 26 februari 2002 15:30, schreef u: > Hey > > I have some cgi files who are in the /usr/lib/xxx/cgi-bin/ directory > How can i make them a part of my php meaning that in the current situation > the url is something like this > http://x.x.xx

Re: [PHP] INT function?

2002-02-20 Thread Bas Jobsen
$z = intval($x / $y); Op donderdag 21 februari 2002 02:06, schreef James Taylor: > Just curious what the function is to convert x into an integer if it's a > float Say for example I have something like this > > > $x = 7; > $y = 3; > > $z = $x / $y; > > I want $z to equal 2. In perl it would

[PHP] test for cookies, without reloading

2002-02-17 Thread Bas Jobsen
Hello, Is there a way to test for cookies enabled/disabled, without reload the page and test for the preset cookie? echo setcookies("test"); seems to be 1 always. Tnx, Bas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] arrays with form data?

2002-02-13 Thread Bas Jobsen
> Op woensdag 13 februari 2002 23:04, schreef Police Trainee: > good evening gentlemen. I am attempting (with my oh so > limited php writing abilities) to write a script that > will take the second "part" of a form item's data and > process it separately. To elaborate: > > > > > > When pr

Re: [PHP] Help with query

2002-02-09 Thread Bas Jobsen
$number=mysql_num_rows(mysql_query("SELECT DISTINCT date FROM $table")); Op zaterdag 09 februari 2002 13:41, schreef Daniel Alsén: > Hi, > > i can´t seem to get my head to wake up... > > How would i do to count how many different values that exists in a mysql > field? Ie i have a date-field and ne

Re: [PHP] Regex function needed

2002-02-07 Thread Bas Jobsen
Op donderdag 07 februari 2002 23:58, schreef Michael Kimsal: > Looking for a regex (preg or ereg) to remove > all 1, 2 and 3 character words. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] add value to serialized array?

2002-02-05 Thread Bas Jobsen
Hello, OKay, when i replace the last rows with: $fp=fopen("test.txt","r"); flock($fp,1); $array=array_merge($array,unserialize(fread($fp,filesize("test.txt"; flock($fp,3); fclose($fp); it works. But now i want to place this in a class, and it goes wrong again. Hope you can help, thanks,

[PHP] add value to serialized array?

2002-02-05 Thread Bas Jobsen
Hi, At start test.txt contains a serialized array with value "one" and "two". a:2:{i:0;s:3:"one";i:1;s:3:"two";} after one run this is: a:3:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:4:"tree";} But the last row prints nothing. Why? Tnx, Bas -- PHP General Mailing List (http://www.php.net/) To uns

Re: [PHP] COS function

2002-01-31 Thread Bas Jobsen
Cause there is no exact representation of PI, you get a floatingpoint representation of nearly zero. Try: echo intval(cos(0.5*pi())); echo printf("%.1f",cos(0.5*pi())); Op donderdag 31 januari 2002 13:39, schreef michael Rabbitte: > I was wondering about the cos fuction in PHP when I try to get

Re: [PHP] variable function call (Re: [PHP] unset a function?)

2002-01-31 Thread Bas Jobsen
c($this); > > bvr. > > On Thu, 31 Jan 2002 11:55:12 +0100, Bas Jobsen wrote: > >Hello, > > > >> Thanks all. I will rename the second function. > > > >Now if have: > > > >if($wat=="naam")$temp=make_naam($this); > >else if($

[PHP] variable function call (Re: [PHP] unset a function?)

2002-01-31 Thread Bas Jobsen
Hello, > Thanks all. I will rename the second function. Now if have: if($wat=="naam")$temp=make_naam($this); else if($wat=="anderenaam")$temp=make_anderenaam($this); //etc.. But i would prefer something like $temp=make_$wat($this); How can i do this? Tnx, Bas -- PHP General Mailing List (

Re: [PHP] unset a function?

2002-01-30 Thread Bas Jobsen
Hi, Thanks all. I will rename the second function. Bas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] unset a function?

2002-01-30 Thread Bas Jobsen
Hi, output: parse error, expecting `T_VARIABLE' or `'$'' Op woensdag 30 januari 2002 21:51, schreef Rick Emery: > what happened when you tried unset()? > > -Original Message- > From: Bas Jobsen [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, Janu

[PHP] unset a function?

2002-01-30 Thread Bas Jobsen
Hello, I have this: file1 and contain a function definition, but the function in both files had the same name. This will give "Cannot redeclare ". So can i unset the function before the second include? Tnx, Bas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail:

Re: [PHP] strange problem

2002-01-18 Thread Bas Jobsen
> No idea, but a fella on this list told me [] had been deprecated in > favour of {} Maybe that has something to do with it? Maybe: $a[${'%coding'}] = 'red'; this works: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-m

Re: [PHP] phpmyadmin blob blues

2001-12-28 Thread Bas Jobsen
In config.inc.php: -- // In browse mode... $cfgShowBlob = FALSE; // display blob field contents -- Maybe put it on TRUE? Op vrijdag 28 december 2001 16:52, schreef Paul S.: > I had been using "blob" for a lot of mysql text fields, even email > address as well as other data. all of a

[PHP] find the fake users

2001-12-28 Thread Bas Jobsen
Hello, On this list yesterday: "As long as these tools are out there, it should keep all of us on our toes, and programming with security constantly on our minds." Today i have tested, Smart HitBot (http://www.hitbot.f2s.com/). Bad stuff for stats, toplist, searchengines etc. Now i want fille

Re: [PHP] Counting "Views" on records in DB!

2001-12-21 Thread Bas Jobsen
UPDATE $table views=views+1 Op vrijdag 21 december 2001 21:38, schreef Thomas Edison Jr.: > Hi, > I was just going through some Message Board system and > noticed that there is a "Views" column which gives how > many times the Message has been viewed. > > I created a similar message board, where

[PHP] ZendOptimizer.so apache

2001-11-30 Thread Bas Jobsen
Hello, I want start ZendOptimizer with a .htaccess this is in my .htaccess: -- php_value zend_optimizer.optimization_level 15 php_value zend_extension "ZendOptimizer.so" -- ZendOptimizer.so is in the same directory. It does'nt seem to word. Do i someythnig wrong? Tnx, Bas -- PHP General M

[PHP] call php with javascript

2001-11-27 Thread Bas Jobsen
Hi, i have test.php: to call this in the html, i use this works fine for IE, but is there an alternative for Netscape to do this? Tnx, Bas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To cont

Re: [PHP] What does &var mean ?

2001-11-22 Thread Bas Jobsen
> What does the "&" (ampersand) before the variable name mean ? a pointer to the address (mem) of the variable -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators,

Re: [PHP] Safe mode and dir permissions

2001-11-16 Thread Bas Jobsen
Hello, You can't change permissions in safe_mode. >and for every new people > inserted the system creates a Directorie and will upload things Maybe you give the new people something like a autonumbered userid. So you can created the dirs /userid0/, /userid1/ etc. already by hand. - Origi

Re: [PHP] PHP Redirect / header("location: ")

2001-11-09 Thread Bas Jobsen
> Am I doing something wrong? Thank you. You may print nothing before the redirect header! ?> - Original Message - From: "phantom" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 09, 2001 10:01 AM Subject: [PHP] PHP Redirect / header("location: ") > I am trying to