Re: [PHP] DOM: browse childnodes but not recursively

2005-05-30 Thread Victor Spång Arthursson
28 maj 2005 kl. 19.32 skrev Jared Williams: childNodes contains the textnodes too, in this case the whitespace between each of . So, to put it in short words; how do I do to browse the content of the element id="5" withuot doing it recursively? I want to receive a list when I call childNod

[PHP] DOM: browse childnodes but not recursively

2005-05-27 Thread Victor Spång Arthursson
Ciao! I really hope someone can help me on this, since I have been putting in to much time in it now, and I have to show off some results ;) The problem is that I can't browse nodelists in only one dimension, that is, whitout getting the sub-nodes of the nodes. My XML reads: Still g

[PHP] Impossible to list attributes of xml-element?

2005-05-26 Thread Victor Spång Arthursson
Ciao! I'm selecting an element in the xml using xpath. I know there is only one element matching the xpath-query, but still I get the result as a list. Nevermind. This list is of the type domnodelist, on which only one action is allowed: item() Selecting [xpath-result]->item(0) gives m

[PHP] Best way to save preferences?

2004-09-26 Thread Victor Spång Arthursson
Which is the best way to save preferences (for a site) to make them easily accessable for changes? What I want is a way to save arrays and read them in again without having to use a database… Thankful for suggests, sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscrib

[PHP] Transparent png and TrueColor?

2004-07-19 Thread Victor Spång Arthursson
Seems like the problem I'm experiencing with transparent png-files are that they are in TrueColor - is it not possible to create a trueColor-file and make it transparent? Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] resize transparent png - impossible?

2004-07-19 Thread Victor Spång Arthursson
Hi everybody! Is it really impossible to resize a transparent png? I've tried everything, but can't get the transparency (in the outputted image) to work either in Photoshop or in Internet Explorer (using filter)… Does anyone have some feedback on this, or is it a known bug in GD? Sincerely Vict

Re: [PHP] Want to save png to file

2004-07-19 Thread Victor Spång Arthursson
2004-07-16 kl. 15.12 skrev Jason Wong: If you already have an image resource then calling imagepng() with a filename will create and write the file for you. Thanks! Now my only problem is that it doesn't seem possible to use imagecopyresized() with a transparent png; it doesn't become transparen

Re: [PHP] Want to save png to file

2004-07-16 Thread Victor Spång Arthursson
2004-07-08 kl. 06.25 skrev Wudi: int imagepng ( resource image [, string filename]) Back on track again! What I don't know is how to save the file - do I read the datastream from imagepng and then create a file and write the stream to it? Sincerely Victor -- PHP General Mailing List (htt

[PHP] Want to save png to file

2004-07-06 Thread Victor Spång Arthursson
Hi! Creating a transparent png using GD and PHP is (almost) no problem, but it's impossible to save… No matter what I try, the saved image wont remember that it's transparent. I suspect the reason it works "on the fly" is because I manually set the header to image/png, but if I try so save the

[PHP] Resize an image with transparency

2004-06-28 Thread Victor Spång Arthursson
all black pixels in the finished image, the one for output, become transparent as well, which is not what I want… So, please, deadline before vacation, help if you know! Sincerely Victor Spång Arthursson / Denmark-Sweden -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://w

[PHP] Alternative to freetype?

2004-06-03 Thread Victor Spång Arthursson
Hi! Since it's almost impossible to find a web server which has freetype installed, I wonder which the alternatives are to put text on an image…? Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] strange urlencode/decode problem

2004-04-21 Thread Victor Spång Arthursson
hes() or similiar functions… And they occur even if I don't urlencode at all… Why!?!?!?!? Sincerely Victor Spång Arthursson - Copenhagen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] function for backing up mysql

2004-04-14 Thread Victor Spång Arthursson
2004-04-14 kl. 11.26 skrev Burhan Khalid: Just redirect the output from mysqldump. mysqldump -u username -ppassword database > dump.sql and then send that dump.sql file. Or, you can just read the output from the mysqldump command directly, using output buffering to make sure your script doesn'

Re: [PHP] function for backing up mysql

2004-04-14 Thread Victor Spång Arthursson
2004-04-14 kl. 09.57 skrev Hawkes, Richard: PhpMyAdmin (www.phpmyadmin.net) is a great MySQL admin tool, and utilises the MySQL backup functions. Yes, and it is the same functionability I want. But I want a php-function to implement in various scripts I have, and since I probably aint t

[PHP] function for backing up mysql

2004-04-14 Thread Victor Spång Arthursson
Hi! Wonder if anyone knows if there somewhere "out there" are any good functions that streams out data from mysql as a sql-file, like phpmyadmin does? The best would be one which I told which database and which tables to dump, and which directly stared streaming the data… Sincerely Victor --

[PHP] Major problems trying to use load data local infile

2004-02-24 Thread Victor Spång Arthursson
hp"); $strSQL = "LOAD DATA LOCAL INFILE '" . addslashes(realpath("output.txt")) . "' INTO TABLE table FIELDS TERMINATED BY '" .addslashes('\t') . "' ESCAPED BY '\\' LINES TERMINATED BY '" . '\r' . &

[PHP] PDFlib, transparency and TIFF images

2004-02-04 Thread Victor Spång Arthursson
of mask to acquire transparency effects? Will this, if so, require two image files per image instead as one? Hope this is not OT, if so, i apologize… Sincerely Victor Spång Arthursson Sweden / Denmark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regexp help (simple)

2004-01-22 Thread Victor Spång Arthursson
2004-01-22 kl. 10.40 skrev Dagfinn Reiersøl: I assume you mean: $test = split_bokid("ääö12345"); Yes! I don't know. It works fine on my computer. The letters display correctly on the command line and even in Mozilla. Hmmm… try the following:

Re: [PHP] Regexp help (simple)

2004-01-21 Thread Victor Spång Arthursson
2004-01-20 kl. 10.41 skrev Dagfinn Reiersøl: [EMAIL PROTECTED] wrote: $string = 'ab12345-1'; if (preg_match('/^([a-zåäö]{2,3})([0-9]{4,5}(\-[0-9]{1,2}){0,1})$/i', $string, $m='')) { echo $m[1]; // -> ab echo $m[2]; // -> 12345-1 } g. martin luethi You can replace {0,1} with a question mark a

Re: [PHP] connecting PHP to MS Access

2004-01-20 Thread Victor Spång Arthursson
Export the data you are interested in as comma separated file. Then use the LOAD DATA INFILE - command in mysql, via the terminal or phpmyadmin. From the manual: 13.1.5 LOAD DATA INFILE Syntax LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name.txt' [REPLACE | IGNORE] INTO

[PHP] Regexp help (simple)

2004-01-20 Thread Victor Spång Arthursson
Hi! Anyone who could help me with this regexp problem? I want to verify that a string is made up of 2-3 letters, (a-z + åäö, A-Z + ÅÖÄ), directly followed by 4 or 5 digits, which could, but may not, be followed by a minus and one or two digits. Examples of valid strings: abc12345 ABC12345 abc

Re: [PHP] Re: XML, strings and foreign (swedish/danish) characters

2003-12-04 Thread Victor Spång Arthursson
Here is the error message, that the code produces: And here is a copy of the code: I really cant figure what is wrong, especially not since it works on the dev-server and the outputted xml is valid, at least as far as IE concerns

Re: [PHP] Re: XML, strings and foreign (swedish/danish) characters

2003-12-04 Thread Victor Spång Arthursson
2003-12-03 kl. 11.18 skrev Victor Spång Arthursson: Temporarely solved the problem using substring to trim the crap-chars away, but I'ld prefer to solve it in a more beautiful way, but perhaps this behaviour is a bug and therefore not possible to solve in any other way… But do we thi

Re: [PHP] Re: XML, strings and foreign (swedish/danish) characters

2003-12-03 Thread Victor Spång Arthursson
2003-12-03 kl. 10.22 skrev Victor Spång Arthursson: makes the string "" become "" Temporarely solved the problem using substring to trim the crap-chars away, but I'ld prefer to solve it in a more beautiful way, but perhaps this behaviour is a bug and therefore not

Re: [PHP] Re: XML, strings and foreign (swedish/danish) characters

2003-12-03 Thread Victor Spång Arthursson
2003-12-02 kl. 22.08 skrev Manuel Lemos: The code // Prepare the content of the xml-file to go to the xsl-parser $xml = str_replace("", $tempxml, $xml); $xml = trim($xml); $xml = utf8_encode($xml); echo $xml; makes the string "" become "" And the crap in fron of the string, which seems to come

[PHP] Re: XML, strings and foreign (swedish/danish) characters

2003-12-03 Thread Victor Spång Arthursson
2003-12-02 kl. 12.23 skrev Manuel Lemos: You just need to use the proper input/output encodings. Doesn't work at all… The code // Prepare the content of the xml-file to go to the xsl-parser $xml = str_replace("?", chr(63), $contents); $xml = str_replace("", $kurt, $xml); $xml = trim($xml); $xml

[PHP] XML, strings and foreign (swedish/danish) characters

2003-12-02 Thread Victor Spång Arthursson
I'm on the point of almost giving up trying to get XML and PHP to sing along, but I'll throw out a question here first. I'm having severe problems getting PHP and XML to work with XML-files that contains foreign characters. Doesnt matter if i type the foreign characters in by myself hardcoded i

[PHP] include-problem

2003-12-01 Thread Victor Spång Arthursson
Hi! I'm having a problem with including files. What I want to achieve is to execute a PHP-script on another server, and then to include the result (which will be XML-output) in another PHP-script (currently on my local computer). On the server I have the file http://server.com/test/echo.php wi

Re: [PHP] easy and simple way to read xml into array

2003-11-18 Thread Victor Spång Arthursson
2003-11-17 kl. 17.06 skrev Chris Hayes: Need to read a xml-file into an array, but searching around I havent found a way that's easy and simple… Arent there an easy way in PHP to accomplish this? have you been at http://se.php.net/xml ? Well, I've, and I also have to say that the XML-support in

[PHP] easy and simple way to read xml into array

2003-11-17 Thread Victor Spång Arthursson
Hi! Need to read a xml-file into an array, but searching around I havent found a way that's easy and simple… Arent there an easy way in PHP to accomplish this? Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: XML and PHP

2003-11-06 Thread Victor Spång Arthursson
2003-11-06 kl. 13.42 skrev pete M: http://www.zend.com/zend/art/parsing.php http://www.zend.com/zend/tut/tutbarlach.php in fact a google search for php,xml, expat, tutorial Well, interesting articles but not really what I was searching for. I'm rather looking for something like the parser in Flas

[PHP] XML and PHP

2003-11-06 Thread Victor Spång Arthursson
Hi! I've been looking at the XML-parserfunctions in the manual, and they seems nice enough. But I'm currently in a project where there is need to read from, write to and edit in XML-files, in some smart way. Our ISP is supporting the following: xml XML Support active XML Namespace Support ac

Re: [PHP] replace special chars

2003-11-05 Thread Victor Spång Arthursson
2003-11-05 kl. 16.07 skrev Pavel Jartsev: Try "htmlspecialchars()" and/or "htmlentities()". htmlentities() did it best! Thanks, /.v -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] replace special chars

2003-11-05 Thread Victor Spång Arthursson
Are there any good function to replace special characters, for example double qoutes, with something that are more html-safe? For example: The above is generated with PHP and fetched from a database (postgresql). I'ld like to have the double qoutes replaced with "something else" ;) There cou

[PHP] fetch entire mysql-result to an array immediately

2003-10-15 Thread Victor Spång Arthursson
Is that possible? The mysql_fetch_array fetches the result by one row each time, but I dont want to iterate through a result but only just fetch it right away… Regards Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] provide flag -X when connecting to mysql

2003-10-13 Thread Victor Spång Arthursson
2003-10-13 kl. 16.39 skrev Marek Kilimajer: No, it is not. But there are plenty of classes that can do it for you. Can you recommend any? Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] provide flag -X when connecting to mysql

2003-10-13 Thread Victor Spång Arthursson
Using the command line client when connecting to mysql makes it possible to provide the flag "-X" to get the result as XML directly from mysql. What I wonder is if its possible in some way to provide this flag via php to get the result as it appears in the command line client, that is, as xml?

Re: [PHP] Start php-script with exec()?

2003-09-22 Thread Victor Spång Arthursson
måndagen den 22 september 2003 kl 16.11 skrev Marek Kilimajer: Ask your hosting company. Are you sure they will allow you to execute commands? Check phpinfo - safe mode and disabled functions. Asked them and they told it was a mistake we had php on the server - according to them it was either ph

Re: [PHP] Start php-script with exec()?

2003-09-22 Thread Victor Spång Arthursson
Ok, it works fine on my development server with Mac OS X. But the hosting server seems to be WinNT, and on this it doesnt work. Anyone who can help me with some standard paths to php.exe? "c:\php\" Doesnt work ;) Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] Start php-script with exec()?

2003-09-22 Thread Victor Spång Arthursson
måndagen den 22 september 2003 kl 15.04 skrev Jay Blanchard: use & (not tested, but runs other processes as background processes) exec("/usr/local/php/bin/php process1.php &"); Think that works as well; my solution was "> /dev/null &"… Now the big question is if I will get it to work on a wind

Re: [PHP] Start php-script with exec()?

2003-09-22 Thread Victor Spång Arthursson
måndagen den 22 september 2003 kl 14.52 skrev Jay Blanchard: As usual for *nix type 'which php' which will return the path to the PHP executable. For portability you could then do something to the effect of (not tested) which() doesn't resolve the path, but I found out it was /usr/local/php/bin

Re: [PHP] Start php-script with exec()?

2003-09-22 Thread Victor Spång Arthursson
måndagen den 22 september 2003 kl 14.31 skrev Jay Blanchard: exec("php script.php"); will run the script. How does this look on a OSX/UNIX system? Can the path to php be found in a system variable, for convinience and portability of the script? Sincerely Victor -- PHP General Mailing List (htt

[PHP] Start php-script with exec()?

2003-09-22 Thread Victor Spång Arthursson
Is it possible? I have a file that takes 5 minutes to run, and I would like to be able to start it when loading a page. But I can't include it because it forces the browser to timeout… exec("script.php") doesn't seem to work… Sincerely Victor -- PHP General Mailing List (http://www.php.net/)

[PHP] php/GD/t1lib problem

2003-03-11 Thread Victor Spång Arthursson
God morning! I'm creating a jpg in al folder locally on my webserver. There is no problems with this at all. But now I'm about to make some updates and have therefore made a copy of the folder just next to the original which is called something like foldercopy. But in this identical folder and

[PHP] Is this possible? Group related results from mysql to one field…

2003-03-06 Thread Victor Spång Arthursson
Hi! Perhaps this is a little bit of topic, but if it's not possible to fix directly when the result is returning from mysql I need some tips on an intelligent solution... This is the problem: I'm searching the database for files and i get some results. In the sql I have a LIMIT to split the re

[PHP] Best way to create a preference-file?

2003-02-13 Thread Victor Spång Arthursson
I would like to create a file that holds the preferences for a site, for example the name of the database, the size of thumbnail pictures etc… But which is the best way to do this and to access the file? It would be nice with an xml-file, but perhaps it is an overkill… Anyway it must be possibl

Re: [PHP] Strange_session-problem_with_php-file_in_

2003-02-01 Thread Victor Spång Arthursson
Problem solved. The error came because I was calling the function inside another function, outside the latter it worked good. So I simply passed the variable with the second function - works great! Thanks anyway for all your time trying to help me! /V -- PHP General Mailing List (http://www.p

Re: [PHP] Strange_session-problem_with_php-file_in_

2003-02-01 Thread Victor Spång Arthursson
fredagen den 31 januari 2003 kl 18.08 skrev Chris Shiflett: Instead of trying to tell us what the problem is, just explain what trouble you are having. We can then tell *you* what the problem is. Could the problem have something to do with the fact that the function that returns the value of

Re: [PHP] Strange_session-problem_with_php-file_in_

2003-01-31 Thread Victor Spång Arthursson
fredagen den 31 januari 2003 kl 18.08 skrev Chris Shiflett: Instead of trying to tell us what the problem is, just explain what trouble you are having. We can then tell *you* what the problem is. Ok, first I have the function session_start(); function return_session_raettighet($session = n

[PHP] Strange session-problem with php-file in

2003-01-31 Thread Victor Spång Arthursson
Hi everyone! I'm having a severe session problem. I'm having a file called createjpg.php that creates a jpg-image and returns it as a picture, with the correct header. This file is included on another php-file like this: What I need the file createjpg.php to do is to check wether or not the

[PHP] Reg exp help

2002-08-30 Thread Victor Spång Arthursson
Hi! I need some help with a reg exp… I'm building a little viewer for my http access logs, and what i'ld like to do is to clean it from alla hits from my own ip… Take for example: 194.236.30.24 - - [30/Aug/2002:11:46:29 +0200] "GET /bildgalleri/createjpg.php?url=/v044&file=v044_27.jpg HTT

[PHP] trim away x > 1 number of spaces from a strin

2002-07-24 Thread Victor Spång Arthursson
Hi! Could someone help me with a replace that takes all occurances of " ", that is space more than one, and replaces them with ""…? Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Write EXIF - is it possible?

2002-07-12 Thread Victor Spång Arthursson
Is it possible to write to exif-headers in pictures? Wonders: Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] EXIF and thumbnails

2002-07-09 Thread Victor Spång Arthursson
Hello! I know it's possible to read thumbnails from the EXIF-headers in for example jpeg-images. But is it also possible to _write_ EXIF-data, that is, if I want to create a thumbnail where there is none? Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

[PHP] How to copy a transparent png over an existing image using GD?

2002-07-06 Thread Victor Spång Arthursson
Hi! I'm trying to copy a transparent (copyright) image over an existing using GD, but can't get it to work… The copyright image is a png, and can be found here: . Does anyone either know how to perform this, or knows a link to some tutorial who explai

[PHP] Nothing will execute after calling imagejpeg.

2002-07-04 Thread Victor Spång Arthursson
This thread has been up before, but there was never sent a reply to it, and I'm having the same problem… Anyone who knows what to do? Sincerely Victor > -Original Message- > From: Kris Johnson [mailto:[EMAIL PROTECTED]] > Sent: Saturday, June 01, 2002 11:11 PM > To: Leotta, Natalie (N

[PHP] Why can't I get imagepstext to work?

2002-07-03 Thread Victor Spång Arthursson
No matter what I try, it doesn't work… I have GD installed and my phpinfo is on this link: Please, someone, help… Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP-mysql: affected rows

2002-05-31 Thread Victor Spång Arthursson
Hi! If I use the "LIMIT 0, 9" at the end of a SQL-query, mysql will only return the first 9 records from the database... But to determine wether or not to print out the "next page", I need to know the total number of records matching the query... Is there a way of doing this without having to

[PHP] arrays and same index

2002-05-30 Thread Victor Spång Arthursson
Hi! I want to create an array that looks like follows: $array["untitled_1.jpg"][] = 0 $array["untitled_1.jpg"][] = 3 $array["untitled_1.jpg"][] = 4 $array["untitled_2.jpg"][] = 0 $array["untitled_3.jpg"][] = 1 What I'm thinking about is accessing all "untitled_1.jpg" values by doing the follow

[PHP] How to create this login page in a good way?

2002-05-29 Thread Victor Spång Arthursson
Hello! I'm sitting here trying to create a loginpage, but it doesn't look very nice. So now I'ld use some help to decide whether the following solution is possible to create... I want to create a little script which will be included on every page and do the following: 1 does the user come fr

Re: [PHP] Need some advice concerning forms (multi select pulldown) and arrays

2002-05-26 Thread Victor Spång Arthursson
[] on the processing page. If the > selects are multi-selects, you'll have a multidimensional array. The > first chosen element in the first select box can be referenced like this > > $select[0][0] > > You can get a count of how many select boxes there are by doing > > co

Re: [PHP] Need some advice concerning forms (multi select pulldown) and arrays

2002-05-26 Thread Victor Spång Arthursson
On Sunday, May 26, 2002, at 01:14 PM, John Holmes wrote: > Just give each select its own name. Can't do that, don't know from time to time how many there'll be And I've to have some case which iterates on the following page... > Or name them all the same followed > by an [] and you'll end

Re: [PHP] Need some advice concerning forms (multi select pulldown) and arrays

2002-05-26 Thread Victor Spång Arthursson
Hello and thanks for your fast answer! I'ld like to know if there is any possibility to distinguish the selects if I've multiple multiple selects, that is, more than one on the same page? What I'm loooking for is the possibility to have an unknown number of multiple selects on the same page...

[PHP] Need some advice concerning forms (multi select pulldown) and arrays

2002-05-25 Thread Victor Spång Arthursson
Hello! I know it's possible to use arrays in combination with forms, but I need some advice about where to find some information/tutorial concerning how to use arrays together with "multi-select-tags"... Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

[PHP] Redirect

2001-07-06 Thread Victor Spång Arthursson
Hi! Still new on PHP, converting from vb$cript, I wonder how I do a redirect... In vbscript: <% response.redirect("page.extension") %> In PHP??? Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

Re: [PHP] How to prevent people from downloading images

2001-07-03 Thread Victor Spång Arthursson
There is only one way to prevent people from steeling images, and that is to print a logo all over the image: If you write a javascript that disables the right mouse button, I'ld be able to steel it anyway cause I'm a Mac use

[PHP] New on PHP, need help with sessions

2001-07-02 Thread Victor Spång Arthursson
Hi! I'm converting from ASP/VBScript, and need to know how to declare a session variable. In VBScript I just type in: <% session("any") = "victor" %> Then I can print that variable on any page on the same webpage using: <% response.write session("any") %> as long as I don't close the browse