Re: [PHP] how to parse a string parse with ereg

2004-11-18 Thread Mark-Walter
Helo, > I meant explode each *line* (at the EOL character(s)), so this: > xxx.x.x.x | 0.0.0.0 255.255.255.255 UH 0 | | | 0 | | | | 0 ppp0 > is an element of the array. And this: > 192.168.0.0 0.0.0.0 255.255.255.0 U | | 0 | | | 0 | | | | 0 eth1 > is another element, etc. > > 0.0.0.0 |

Re: [PHP] how to parse a string parse with ereg

2004-11-17 Thread Mark-Walter
Hi, > I have to admit I'm not following you. My suggestion that you use explode() > was based on the premise that you have a bunch of lines: > > ... > xxx.x.x.x   0.0.0.0 255.255.255.255 UH 0      0        0 ppp0 > 192.168.0.0 0.0.0.0 255.255.255.0 U    0      0        0 eth1 > 0.0.0.0     xxx.x

Re: [PHP] how to parse a string parse with ereg

2004-11-16 Thread Mark-Walter
Hi Jason Wong, > > > The regular expression is already working but how can I reduce the > > > string to have then only 2 lines ? > > Convert the string into an array using explode(). Thank's a lot for this information. I tried this but one thing is not suitable so far for me while using explode.

[PHP] how to parse a string parse with ereg

2004-11-11 Thread Mark-Walter
Hi, I've a string where the output of route -n is in for example. x.x.x.x 0.0.0.0 255.255.255.255 UH0 00 ppp0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 00 eth1 0.0.0.0 x.x.x.x 0.0.0.0 UG0 00 ppp0 The regular

[PHP] SQL-Injection, XSS and Hijacking

2004-11-03 Thread Mark-Walter
Hi, I read now quite a lot of articles about SQL-Injection, XSS and session hijacking in a hopefully appropriate way. As I understand the function addslashes(),quote_meta() and mysql_real_escape_string() are to avoid SQL Injection e.g. in order to use page_sliding with entered POST data over for

Re: [PHP] Protecting Commercial PHP Scripts

2004-10-28 Thread Mark-Walter
Hi Curt, > >if ($_SESSION['HTTP_USER_AGENT'] != > > md5($SERVER['HTTP_USER_AGENT'])) ^^^ $_SERVER *g* > If your using the same session for IE and netscape, the behaviour > you are experiencing demonstrates how this can prevent session > hijacking. Netscape, u

Re: [PHP] Protecting Commercial PHP Scripts

2004-10-28 Thread Mark-Walter
Hi Dirk, > I found this one very usefull: > http://shiflett.org/php-security.pdf Nice docu *g* Does someone use this code out from the docu mentioned aboved ? It work's for me only under Explorer, Netscape switch to exit. # # Verify HTTP Header # if (isset($_SESSION['HTTP_USER_AGENT'] )) {

Re: [PHP] @session_start generates a new session_id

2004-10-25 Thread Mark-Walter
Hi Sadeq, > Check your PHP config file. You may enable auto session start. I think > this is the reasone of problem. sorry for the delay and indeed your suggestion solves now my problem. Thank's a lot :-) -- Best Regards, Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] @session_start generates a new session_id

2004-10-19 Thread Mark-Walter
Hi Matt, > > @session_start(); > > session_name("userauth"); > > $_SESSION['SESS_CUS'] = $user_id; > I am not 100% sure what the problem is, but if you are trying to > change the session name to userauth, I think you need to do that > before session_start session_name() works ok so far. For ex

[PHP] @session_start generates a new session_id

2004-10-19 Thread Mark-Walter
Hi, I made an update to Apache/1.3.31 (Unix) PHP/4.3.9 and before this everythings works fine. The problem is that a following page generates a new session stored under the session.save_path and the stored variable e.g. $_SESSION['SESS_CUS'] is not valid anymore due the SID entry. On both pages