(0 replies, posted in Programming)

Har lite problem med regexp parsning.
Använder PHP och PCRE (preg_match osv.)
Så här ser det ut nu:

$raw_urltime = implode (' ', file ('http://www.aftonbladet.se/telegram/nyhetsbevakaren/0,1195,___,00.html'));
preg_match_all ("'(  (.*?)<\/b><\/font>.*?){0,1}p.gif\" alt=\"\" /><a href=\"(.*?)\".*?\>(.*?)<.*?([0-9]{2}:[0-9]{2})'is", $raw_urltime, $urltime);

Det funkar, för det mesta. Men ibland
är det någon av kategorierna som inte har några artiklar, då
fungerar det inte som de ska längre.

I det fall då det inte fungerar kan det se ut så här:

I det fallet matchar den "Sport" eftersom det kommer först men jag
vill att den ska ta "Ekonomi" istället eftersom det är dit nyheterna hör.

Detta resultat får jag nu:
och det kommer från denna:
http://www.aftonbladet.se/telegram/nyhe … __,00.html

För det mesta är det artiklar under "Sportresultat som saknas, därav får
alla artiklar under "Ekonomi" istället "Sportresultat" som kategori.

Måste ju finnas någon lösning så jag kan plocka allt detta direkt :)


(4 replies, posted in Programming)

Well, look at that, it really works =)
Danke danke


(4 replies, posted in Programming)

CodeDuck wrote:

How about:

SELECT table1.*
FROM table1
WHERE NOT table1.id IN (SELECT table2.id FROM table2)

Yes but there is one little problem, this host runs MySQL 3.23.46 witch does not support subselects =/


(4 replies, posted in Programming)

I have a small problem here, im not sure if its just because its monday or if it really is tricky but i shouldnt be to hard?

I have 2 tables, the first table has alot of rows and got a uniqe id-number.
the other tables contains one column with some numbers matching table1´s idnumber.

Now i want to select all rows in table 1 that does not have a matching number in table 2.

Like this:

Table 1:

Table 2:

What i want out of this is:

Table 2 can also be completly empty.


(0 replies, posted in Programming)

i have some strings with norwegian charters, like ?
how do i decode these in a nice way? do i need some special charterset?
any help is welcome =)


(4 replies, posted in General discussion)

thats about everything that i needed to know :)


(4 replies, posted in General discussion)

i´ve already downloaded it but im unsure if i have to uninstall 0.6 first or if i just can install it over, do not wanna loose any settings or mails :)


(6 replies, posted in Programming)

Nemas problemas :)


(6 replies, posted in Programming)

i think this should work then:

screen -dmS muu program


(6 replies, posted in Programming)

Not sure about what you wanna do, you want to start a program with screen and detach it directly after that?


(5 replies, posted in Feature requests)

hehe, your right about that but it´s this site i frequently hold my eye on =)

Edit: btw, it almost looks even better in links than in firefox (no really but you clearly sees the little posted-here-dot better, in by point of view that is)



(5 replies, posted in Feature requests)

Well, thats works, but when i switch to my graphical browser, i want to see those images (and all others) again, so it would be nice with a alt attribut, i guess i have to wait :)

Edit: hm, i kind of like the non-image look (except for avatars which i want), maybe i´ll go for this anyway :)


(5 replies, posted in Feature requests)

This is by far the best forum to view in links (textmode browser), vbb for example looks lite a mess but this one looks perfectly.
But i cant se any letter or something instead of the [!] icon in front of new threds, this would be
nice, othervise it works perfectly.

I´m not sure but i think you maybe can use ini_set to change upload_tmp_dir to something inside your allowed path.

Edit: you can´t use ini_set, must be defined in php.ini or httpd.conf (PHP_INI_SYSTEM)

Edit2: maybe i should read everything in your post before i answer, ignore me :)


(11 replies, posted in PunBB 1.2 troubleshooting)

Could not resolv that domain.


(42 replies, posted in General discussion)

s/fix/develop/ ? smile


(42 replies, posted in General discussion)

Rickard wrote:
Gribber wrote:

Rickard: Just a wonder about your sign, why fix() when not broken? smile

Why write a discussion board when there are already hundreds? big_smile

Good point smile


(4 replies, posted in PunBB 1.2 troubleshooting)

Datebase name should be whatever your database is called, same thing with username and password.
You can choose table prefix to something you whan, like forum_ or punbb etc. this prefix will be added to each of the tables punbb uses in the database.

Give us your errormessages to so that we can tell you whats wrong smile


(42 replies, posted in General discussion)

Rickard: Just a wonder about your sign, why fix() when not broken? smile

Topics with most posts/views maybe?


(10 replies, posted in Archive)

Zoneedit skulle funka ja.

Rickard: Men det inträffar ju självklart när man är bortrest i en månad utan tillgång till dator och har glömt att ge rättigheter till någon annan användare så denna kan ändra åt en smile Smidigt att de sker automatiskt då.

Edit: om det är din kompis som har dns:erna som du använder, be honom att peka domänen mot ditt ip eller dyndns domän då?

Edit2: de var ju inte kennel du hette längre smile


(10 replies, posted in Archive)

Peka din domän som ett CNAME mot din dyndns adress.


(3 replies, posted in PunBB 1.2 discussion)

Directly from the sourceaddress

Well, at least we can post our posts quicker smile


(32 replies, posted in General discussion)

Name: Linus Nordin
Age: 22
Location: Sundsvall and Junsele, Sweden
Interests: Programming, *nix, Networks, New technique, Home cinema, Party
Occupation: System development at MKC, Server administrator at CreateIT, Coding, consultant, security at ETECH, technical consultant for SVAR ITK
Interesting fact: I moved 4 times in one month last year (new jobs)