[PHP] Moodle: Add field to user listing

2007-10-07 Thread RalfGesellensetter
Dear list,

is there any approach to patch any PHP files within moodle in order to 
gain further columns for the user list?

Reference: http://docs.moodle.org/en/Browse_list_of_users

Objective: I wish to add a (sortable) user field in order to find users 
by additional aspects.

Thanks
Ralf

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] keep SESSION using wget?

2007-02-09 Thread RalfGesellensetter
Am Donnerstag 08 Februar 2007 20:36 schrieb Robert Cummings:
 Or...

 wget --save-cookies cookies.txt --load-cookies cookies.txt
 --keep-session-cookies http://my.domain/tracker.php

 You only need one cumulative call.


Dear Rob, thanks again. However, my server uses Debian Sarge with wget 
1.9.1-12. In this version, the option --keep-session-cookies is not 
implemented :(

I also realised that the wget calls push up the PID ids  32,000. Is 
this going to be a problem? Or can I use a kill - SIGUSR1 to revive 
some background process any few minutes?

I feel that this is going off-topic, so thanks for your understanding ;)

To get back to PHP issues: No, constants are not what I was looking for, 
as I need to change the IP with the next call. But a variable that 
keeps its value and is global for all sessions.

Regards
Ralf

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] keep SESSION using wget?

2007-02-08 Thread RalfGesellensetter
Dear list,

I wrote a php script to keep track of a remote server. This script is 
called every 10 minutes via http by a cronjob using wget. The cronjob 
calls (from the remote server) open a new session each time. 

This way I cannot use session variables to limit mail notifications to 
cases where the IP of the remote server has changed.

Is there any way to 
- either make wget to stay within its session
- or store the IP in a static variable that is persistent?

Thanks
Ralf

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] keep SESSION using wget?

2007-02-08 Thread RalfGesellensetter
Hi Rob, thanks for your quick reply!

Am Donnerstag 08 Februar 2007 19:22 schrieb Robert Cummings:
 I don't suppose you checked the man page for wget did you?

shame on me: I didn't RTFM ;)

Now having done so, I wonder if I can store the cookie file with every 
call or if I should store it once manually and use the file with every 
cronjob call?

Something like:

getcookie_once:
 wget --save-cookies cookies.txt \
   --keep-session-cookies http://my.domain/tracker.php

refresh_hourly:
 wget --load-cookies cookies.txt  http://my.domain/tracker.php

?

Thanks again
Ralf

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] strip urls

2006-09-11 Thread RalfGesellensetter
Am Montag 11 September 2006 15:36 schrieb Merlin:
 I am trying to strip URL's out of a text. There is a function for
 this in php, but I can't find it anywhere. Can sombody help?

hi, it's strip_tags and only removes the tags (a href ...) but keeps 
the plain text that would be displayed in a text browser.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] S: function to remove break URLs

2006-08-28 Thread RalfGesellensetter
Dear Jon,

cheers for your lines ...

Am Montag 28 August 2006 02:31 schrieb Jon Anderson:
 Guestbook spam (and comment spam) is something I'd like to try to
 eliminate altogether myself. I don't think there are any
 one-size-fits all solutions out there yet for detection/elimination.
 I'd personally like to hear any effective solutions people have found
 in PHP to combat this stuff.

My approach here is to make a fuzzy decision if an entry is shown by 
default or needs a further check by myself before being published.

 In reference to the detection part; In my case, 95%+ of the spam
 entries have links that contain one of about 5 words (casino, pharm,
 drug, stock, or invest), so I could eliminate most spam by
 automatically trashing all entries that contains a link with one of
 those key words. I don't know if you're lucky enough to have spammers
 as predictable as mine, so that may not be an effective solution for
 anyone but me.

Okay, these words occur also very often - but not exclusively - I could 
regards occurances of those words an criteria.

 In terms of destroying URLs, what happens when a real guest wants to
   put a URL in their entry? Seems to me that you might be
 overshooting...

Well, my application is not exactly a Guestbook, and the field in 
question is not meant to display any URLs. There is a separate field to 
state an URL that is not displayed by default.

 You might be better off finding some way of preventing the data from
 even entering the system, for example, a captcha type system. They
 have accessibility problems, but I've read about solutions that use
 simple JavaScript to automatically enter the captcha code into the
 correct field and hide the captcha and the field so that the whole
 process is transparent to the user (including users with screen
 readers), whereas if JS is disabled, the captcha is shown and the
 code must be entered. This is based on the assumption that current
 spam robots that don't incorporate a JavaScript execution engine. Not
 sure how effective it is, but it's an interesting idea.

You are speaking of those skewed letters one has to retype before the 
action is taken? I'd like to see some code for it - however in my case 
I have the impression that it is real persons who enter the spam. Can 
I, by the way, collect the IP of the visitor in a PHP form? You might 
have realized: I am an absolute beginner with PHP.

 Anyone want to share some spam-fighting success stories?

Yes, pleaze ;)

Regards
Ralf

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] S: function to remove break URLs

2006-08-27 Thread RalfGesellensetter
Dear list,

does anybody of you know these spammers filling up your guestbook with 
URLs? With strip_tags, I managed to remove the html tags. But what I 
want is this:

1. Detect such entries (to hide them by default)
2. Destroy URLs 

As for 2. I am thinking of adding spaces after at least every 12 
characters (or even after every dot) - what do you recommend?
Just removing http://; still leaves the domain behind.

A good start could be to replace . by .  and / by  / .

Any code to share?

Cheers
Ralf.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php