[PHP] Re: date format from a database date field

2007-05-23 Thread Johan Holst Nielsen

Mike Ryan wrote:

Sorry I am a bit of a newbie with php and hope this has not been aswered a
million times, but here it goes

I have a date base with a couple of date fields when I pull up and display
the fields it show 2007-05-21. the question I have is how to convert the
field to 05-21-2007?

Currently the command I have is

print $row['open'];


Well the easiest thing is to let MySQL do the work

use following SELECT

SELECT DATE_FORMAT(your_date_field,'%m-%d-%Y') as date_field FROM yourtable

That should do the work...

--
Johan Holst Nielsen
Freelance PHP Developer - http://phpgeek.dk

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



[PHP] Re: ftp root dir?

2007-05-22 Thread Johan Holst Nielsen

Al wrote:
Can I assume that all ftp_connect()s will make the current dir the 
DOC_ROOT?


First of all - what do you mean with DOC_ROOT? If it is the document 
root (of what?!).



If not, how can I insure the ftp root dir is the same as DOC_ROOT?


Define DOC_ROOT :)


if you ftp_chdir() and it's already on the root, it posts an error.


Well if you tries to go back to the root - try to use ftp_cdup - but it 
shouldn't be needed if you combine ftp_pwd and ftp_chdir


ftp_pwd() simply returns /, which simply says it's on its root, where 
ever that is.


If is (logical) the root of the ftp server. It can be whereever on the 
server. It depends on the configuration of the FTP server ;)


--
Johan Holst Nielsen
Freelance PHP Developer - http://phpgeek.dk

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



[PHP] Re: PHP Data Mining/Data Scraping

2007-05-20 Thread Johan Holst Nielsen

Shannon Whitty wrote:

Hi,

I'm looking for a piece of software or coding that will let me post a form 
to another URL, accept the response, search it for a specific success 
string and then let me continue processing the rest of my program.


I want to accept queries on behalf of my supplier, forward it to them behind 
the scenes, accept their response and display it within my website.


Has anyone had any experience with this?  Is there a simple, basic utility 
to let me do this?


I was kind of hoping I could avoid developing it myself.


cURL should be able to help you with that :)

www.php.net/curl

--
Johan Holst Nielsen
Freelance PHP Developer - http://phpgeek.dk

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



[PHP] Problem with _one_ CE chars - GD library

2004-06-10 Thread Johan Holst Nielsen
Hi,
Im doing some dynamic image creation with GD library - and I really 
wonder why I can't get the last character printed out on the image :(

I use this file to encode the font:
http://phpgeek.dk/ng/88592.enc.txt
And the font I use is Frutiger CE 45 Light...
I wonder if it is the font that are buggy - I can write out all other 
characters - but not the last one I need :(

The character I can't write out is:
 (html: #273;)
I works fine with the upper character:  (html: #272;)
(HTML codes added, if the newsserver removes these characters...).
When I tries to write the character on the image, I just make white space...
Any one tried such problems? Any solution for that? And is it the font, 
the encoding file - or something else that are wrong?

I don't think it is my source - cause all other Central European 
characters I tried works fine :( (Or maybe this should a happy smiley :D)

I hope someone can help me :)
With best regards,
Johan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Problem with _one_ CE chars - GD library

2004-06-10 Thread Johan Holst Nielsen
Johan Holst Nielsen wrote:
Any one tried such problems? Any solution for that? And is it the font, 
the encoding file - or something else that are wrong?
Okay, I found the solution :)
I was the encoding file that was wrong...
The /dbar should be replaced with /dcroat
Now everything works :)
Is this a bug in the encoding file, or?
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Getting Server time

2004-06-10 Thread Johan Holst Nielsen
Alex Hogan wrote:
When I'm using the time() function am I getting the time on the server?
If not how can I get the time from the server regardless of whether or
not its in the same time zone as the client.
Use the gmdate() function.
http://php.net/manual/en/function.gmdate.php
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: installing php4 in windows 2000

2004-05-31 Thread Johan Holst Nielsen
Rohit Mohta wrote:
i have configured apache 2.0.49 in my system and included the following lines of code 
in my http:conf file
LoadModule php4_module c:/php/sapi/php4apache2.dll
AddType application/x-httpd-php .php
i have also configured the  php.ini file and created a test script(phpinfo.php,placed 
it in my htdocs directory) to check whether php has been properly installed or not
but when i run the testscript by entering the follwoing line in the address bar of 
internet explorer
localhost/phpinfo.php
i get the following error message
HTTP 404 - File not found
Internet Explorer 
Check if the DocumentRoot is right in your httpd.conf - it should be
the same as the location where phpinfo.php is located.
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: including an html file!!

2004-05-30 Thread Johan Holst Nielsen
Little Boy wrote:
when i include a html file i alwas do it with:
echo(include('htmlfile.html')); everythings works fine except the fact, that
after the included file the is a '1' printed out, anybody, an idea why???
Because you dont need echo - include output the html :)
just
?php
include('htmfile.html');
?
Check the documentation http://php.net/include - include returns 1 - 
thats why it is printed out when you do echo :)

--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: including an html file!!

2004-05-30 Thread Johan Holst Nielsen
Godfoca wrote:
echo returns 1 on success, so the interpreter first evaluates the expression
inside the echo() call, and thus includes the html file, and then, as the
evaluation returned 1, it echoes 1 to the final file.
Just to clear it out... include does not always return 1.
An example
File: includeFile.php
?php
$foo = Test with return;
return $foo;
?
?php
$bar = include(includeFile.php);
echo $bar; //Output Test with return
?
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Data reading and writing for a chat

2004-05-30 Thread Johan Holst Nielsen
Stephen Lake wrote:
I got a question for you all.
What would be more effiecient for datastoring that is going to be constantly
extracted like in a chat application?
a MySQL database? or a Flat text file?
Well, the most effiecient would be the memory :) With some socket 
programming it should be possible to create a connection to each client 
- and a server show sent out the incoming messages to the clients.

But flat file vs. mysql. I would prefer MySQL - it is fast, it can 
handle a lot of request. If you use flatfile, you need to do some 
checking for the if the file is open already - so only one client at the 
time can write to the file - if can be very slow if a lot of users is on 
the chat at the same time and write a lot of messages - cause the whole 
file need to be locked every time a single user write a message.

So in my opinion, you should do some socket client and a server - or use 
a database :)

--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Associative array question

2004-05-30 Thread Johan Holst Nielsen
[EMAIL PROTECTED] wrote:
Hello,
If I have an associative array like:
$myFriendsAges['Tom']=25;
$myFriendsAges['Bill']=35;
$myFriendsAges['Al']=45;
$myFriendsAges['Mark']=55;
Is there a way to index name into a string.  I would like to be able to 
echo something like:

My friend Bill is 35 years of age.
Is there a way to do this?
No sure what you mean... but it is possible this way:
?php
foreach($myFriendsAges as $name=$age) {
  echo My friend .$name. is .$age. years of age.br\n;
}
?
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Query Query

2004-05-30 Thread Johan Holst Nielsen
The Digital E wrote:
$query=UPDATE $table_name SET company_name='$company', 
first_name='$first_name', last_name='$last_name', address='$address', 
city='$city', state_province='$state', postal_code='$postal', 
office_phone='$office', fax_phone='$fax', email='$email' WHERE 
company_name='$mod_dataset';
What does mysql_error() says?
Tried to print out the query and execute it directly in the mysql prompt 
or phpmyadmin? What happens then?

--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] CVS web front end

2004-05-29 Thread Johan Holst Nielsen
Lists wrote:
tortoise is nice
http://www.tortoisecvs.org/
As far as I can see, it have nothing to do with an web frontend?
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] CVS web front end

2004-05-29 Thread Johan Holst Nielsen
Lists wrote:
As far as I can see, it have nothing to do with an web frontend?
you're so right. I meant to send the link for horde
http://www.horde.org/chora/
Are you able to check out files? check in etc.?
As far as I can see - it is just a web cvs viewer?
The request was Not just a file/project
browser...
Anyway - thanks for the link to tcvs :D I have downloaded it and I like 
it :D

--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Using '/' instead of '?' in url querystring

2002-10-07 Thread Johan Holst Nielsen

 When sending variables this is the normal way to do it:
 /foo.php?id=12
 
 But I have read that the following URL should work:
 /foo.php/12/
 
 and then fetch the id in this way:
 $id = ereg_replace('[^0-9]', '', $PATH_INFO);
 
 I have even seen it in function but the problem is that I can't get it to
 work on my local apache server.
 When I try to write /foo.php/12/ I get a '500 Internal Server Error' and in
 the apache error-log I can read that 'Premature end of script headers:
 c:/php/php.exe'. Does anyone know what could cause this error and why the
 url isn't working??

Try mod_rewrite to apache...
http://httpd.apache.org/docs/mod/mod_rewrite.html
Else try http://www.phpbuilder.com/columns/tim2526.php3

Regards,
Johan


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




[PHP] Find DPI ing image?

2002-09-12 Thread Johan Holst Nielsen

Hi people...

Anyone know a class or a solution so I can find the DPI (dot per inch) 
of an image?

getImageSize do not help me? Any other solutions?

Regards,

Johan


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




Re: [PHP] Newbie needs help

2002-07-24 Thread Johan Holst Nielsen



Neil Freeman wrote:
 mysql_db_query has been depreciated since PHP 4.0.6
 

Yep.. but thats not the only different...

mysql_db_query() have an extra parameter that is what Database you want 
to execute your query in...

mysql_query() just use the database you have selected with f.ex. 
mysql_select_db()

But do NOT use mysql_db_query...

Regards,

Johan


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




[PHP] Re: How to Detect File in a Specifc Directory on Window Env?

2002-07-19 Thread Johan Holst Nielsen

 ?php
 //DATEFORMAT MMDD
 if($dir=@opendir(/yourdirwithpdf)) {
   echo Found following files:
   while(($file=readdir($dir))!==false) {
 if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf)) {
   echo 'a href='.$file.''.$file.'\n';
 }
   }
 }
 ?

UPS

if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf, $file))

The ereg line should look like this :)

Regards,
Johan


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




[PHP] Re: How to Detect File in a Specifc Directory on Window Env?

2002-07-19 Thread Johan Holst Nielsen



Johan Holst Nielsen wrote:
 ?php
 //DATEFORMAT MMDD
 if($dir=@opendir(/yourdirwithpdf)) {
   echo Found following files:
   while(($file=readdir($dir))!==false) {
 if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf)) {
   echo 'a href='.$file.''.$file.'\n';
 }
   }
 }
 ?
 
 
 UPS
 
 if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf, $file))
 
 The ereg line should look like this :)
 

Wow, I also forgot to close the dir handle!
Well I will let you do that :)

Regards,
Johan


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




[PHP] Re: How to Detect File in a Specifc Directory on Window Env?

2002-07-19 Thread Johan Holst Nielsen



Jack wrote:
 Dear all
 I had a folder which contains a lot of pdf file, the name format of the pdf
 files are : x.dateformat.pdf (eg : abcdefg.20020718.pdf).
 Now i want to use the php script to detect what files it got in a specific
 folder.
 i want to make a user input form which will let user to input the date and
 then i will look for the pdf report from this specific folder base on the
 Date given!
 
 I think one of the quickest way is to ask php to check the filename from
 Right to Left which is the Date format!
 
 But i don't know which php function will perform this task (Check filename
 from Right to Left).
 
 If you have any other suggestion, pls help me!

I think I would do something like this:

?php
//DATEFORMAT MMDD
if($dir=@opendir(/yourdirwithpdf)) {
   echo Found following files:
   while(($file=readdir($dir))!==false) {
 if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf)) {
   echo 'a href='.$file.''.$file.'\n';
 }
   }
}
?

Regards,
Johan


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




Re: [PHP] mysql error or PHP

2002-07-15 Thread Johan Holst Nielsen



Justin French wrote:
 try add_slashes($string) before inserting into the database, or turn on
 magic quotes in php.ini

Or
Mysql_Escape_String()
http://www.php.net/manual/en/function.mysql-escape-string.php

Or
Mysql_Real_Escape_String()
http://www.php.net/manual/en/function.mysql-real-escape-string.php

Regards,
Johan


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





[PHP] Re: 1 Form, 2 Submit-Buttons

2002-07-12 Thread Johan Holst Nielsen

 Hello! I want to make a form (a wizard) which has 2 Submit-Buttons (Back
  Next). The buttons should be images. How can I make php see, which
 button has been pressed?


?php
if(isset($_POST[submit_back])) {
//go back
}
else {
//go forward
}
?
form action=?=$_SERVER[PHP_SELF]? method=post
input type=submit name=submit_back value=Back
input type=submit name=submit_next value=Next
/form


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




[PHP] Re: 1 Form, 2 Submit-Buttons

2002-07-12 Thread Johan Holst Nielsen



Johan Holst Nielsen wrote:
 Hello! I want to make a form (a wizard) which has 2 Submit-Buttons (Back
  Next). The buttons should be images. How can I make php see, which
 button has been pressed?
 
 
 
 ?php
 if(isset($_POST[submit_back])) {
 //go back
 }
 else {
 //go forward
 }
 ?
 form action=?=$_SERVER[PHP_SELF]? method=post
 input type=submit name=submit_back value=Back
 input type=submit name=submit_next value=Next
 /form
 

Oooh sorry... offcouse
input type=image src=image.png name=submit_back...



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




[PHP] Re: Newbie Logical opertaor question

2002-07-11 Thread Johan Holst Nielsen



Rw wrote:
 I have been trying this to no avail.
 
 Tryng to say the equivalent of:
 
 IF  (var1 = 1 AND var2 = a or b or c)
 
 i.e. yield true if 1 and a
 OR
 1 and b
 OR 1 and c

I would do something like this:

$CheckArr = array(a, b, c);
if($var1 == 1  in_array($CheckArr, $var2)) {
  .
}

Regards,
Johan


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




[PHP] PHP and Apache2?

2002-07-10 Thread Johan Holst Nielsen

Hi,

Anyone know how long the developers is from a finale release that 
support Apache 2?

Please advice!

Regards,

Johan


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




[PHP] Re: cookie ?

2002-07-10 Thread Johan Holst Nielsen

 (yes it's me again)
 i've got an other problem.
 i've got an login system, and it has to put an cookie, but it seems he 
 doesn't do it.
 is it an php.ini problem ??

Dont think it a php.ini file.

First of all. Remember to set the cookie before any other headers is 
sent to the browser.

Do you remember to reload the page after the cookie is sent? (some 
browser cant see the cookie at the page it sent but first after it have 
been reloaded!).

Else? Please post an URL to your source, or post some sources here!

Are your sure about your browser settings? Do your denied websites to 
set cookies?

mvh
Johan



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




[PHP] Re: cookie ?

2002-07-10 Thread Johan Holst Nielsen

  it's not the browser or what so ever,
  i installed php 4.2.1. with apache 1.3.24 on a Redhat 7.1 server.
 
  but becuas for some kind a reason it wont work :(
 
  any body got an idea ??

try to get the cookie witgh

$_COOKIE[cookiename];

if you have register_globals = off!

Regards,
Johan


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




Re: [PHP] Re: cookie ?

2002-07-10 Thread Johan Holst Nielsen

 Do you remember to reload the page after the cookie is sent? (some 
 browser cant see the cookie at the page it sent but first after it 
 have been reloaded!).
 
 
 Actualy this is not browser issue but PHP issue

Aah, sorry... but it doesn't matter in this case, it could be one of the 
errors? :)

mvh
Johan


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




[PHP] Re: cookie ( still not working )

2002-07-10 Thread Johan Holst Nielsen

 my cookie problem is still not solved :(
 my browser settings are correct, and the script has worked.
 but sins i now installed php 4.2.1 with apache 1.3.24 it doesn't work :(
 does any one have an solution ??
 thnx in advance,


Sure about your register_globals = off?

please show us the source, or a link to at phps file...
And a link to a phpinfo() file?

I cant help you without further information!

Regards,
Johan


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




[PHP] Re: array question--help

2002-04-28 Thread Johan Holst Nielsen



Mark Pelillo wrote:

 I am a Newbie at PHP

 I am sure I am missing something small but...

 I am trying to create a form selection box which an alphabetically sort
 list of a unix group file.

 The group file has the format groupname::groupnumber:

 I have tried to create an array using the array=fgetcsv($fp, 30, :)
 which does read each line of the file.  I have used this line in a while
 loop and also a for loop, but everytime I exit the loop, the array now
 has no information.

 I found if the change the line to be array[]=fgetcsv($fp, 30, :) then
 I can exit the loops but now how do extract only the group names from
 the array and be able to sort them.

 Ideally what I would like to do is create an array where the keys =
 group number and value = groupname. I need to be able to natsort the
 values and display in the selection form box.

Well lets try
?php
$OutputArray = array(); //Create an array to the output
$fp = fopen (yourgroupfile,r);  //Open the groupfile
while ($d = fgetcsv ($fp, 1000, :)) { //While loop as long there is some
data
$OutputArray[$d[2]] = $d[0];  //Set groupid as key, and groupname as
value
} //end of while
fclose ($fp); //close file
print_r($OutputArray); //Print out the array, to check the values!
?

Please reply if this doesn't work?
By the way... if you got further problems, please tell us which version of
PHP you use.

Regards,

Johan Holst Nielsen
www.weknowthewayout.com


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




Re: [PHP] Won't save session ids?

2002-04-26 Thread Johan Holst Nielsen



Kirk Johnson wrote:

 The coding style needs to match the register_globals setting in php.ini.

 register_globals on:

 $accountsession = $session;
 $accountemail = $email;
 session_register(accountsession);
 session_register(accountemail);

Oh, sorry... I have just tried so many ways... but this works!

Thank you very much :o)

Regards,
Johan


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




[PHP] Won't save session ids?

2002-04-25 Thread Johan Holst Nielsen

Hi people,

I have a problem with my PHP scripts. I hope someone can help me?
I run PHP 4.0.6, Redhat 7.1

When i tries to set a session and then redirect to the next page, the
sessions is empty? Someone know how to solve this problem?

The script looks like this:

session_start();
session_register(accountsession);
session_register(accountemail);
$HTTP_SESSION_VARS[accountsession] = $session;
$HTTP_SESSION_VARS[accountemail] = $email;
header(Location: ./main.php);

 //The session and email variabel is from a output from a mysql query!!
And this works fine!

The mainpage tries to get the sessions.

session_start();
echo
Email:.$HTTP_SESSION_VARS[accountemail].br.$HTTP_SESSION_VARS[accountsession];

But i just get a Email: without any content?

Please help me? Someone know whats wrong?

Best Regards,

Johan Holst Nielsen


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




Re: [PHP] Looping?

2001-12-14 Thread Johan Holst Nielsen




How can I make the following work:

function start($times)
{
for...loop starts here...
{  -- notice only one bracket.
}

function end()
{
} -- the ending bracket.
}

start('10');
html-code... I want this to be repeated 10 times.
end();



Try instead:

function MakeLoop($loops, $htmlcode) {
for($i=0; $i$loops; $i++) {
echo $htmlcode;
}
}

MakeLoop(10);

Dont know if you can use this? Else, try to tell a bit more about what 
solution you want?

/Johan


-- 
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]




[PHP] Generating PDF...

2001-12-11 Thread Johan Holst Nielsen

Hi,

I just have some few question. I hope you can help me, with some links 
or some information :o)

I've to create some pdf files, but the problem is that it have to be 
printed later. So it have to be in i quality about 304 dpi.

I dont know a lot about PDF. Can anyone help me please? Send me some 
links about how PDF works etc..

I prefer to work in PHP... but if Perl/C/C++ etc. is a better language 
to this, please post the link anyway.

Hope someone can help me :o)

Looking forward to hear from ya! :o)

Regards,

Johan


-- 
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] Generating PDF...

2001-12-11 Thread Johan Holst Nielsen

ok, i need to include some images in the PDF. But I just make them in 
the right dpi then.

What about fonts? No problem if the font is Postscript or?

-Johan

Rasmus Lerdorf wrote:

dpi doesn't really apply to a PDF file unless your PDF file has embedded 
images in which case the dpi of these images would affect your output.  
And PHP is fine for generating PDF with.  See http://php.net/pdf

-Rasmus

On Tue, 11 Dec 2001, Johan Holst Nielsen wrote:

Hi,

I just have some few question. I hope you can help me, with some links 
or some information :o)

I've to create some pdf files, but the problem is that it have to be 
printed later. So it have to be in i quality about 304 dpi.

I dont know a lot about PDF. Can anyone help me please? Send me some 
links about how PDF works etc..

I prefer to work in PHP... but if Perl/C/C++ etc. is a better language 
to this, please post the link anyway.

Hope someone can help me :o)

Looking forward to hear from ya! :o)

Regards,

Johan









[PHP] [ Re: [PHP] Re: Image problem]

2001-12-07 Thread Johan Holst Nielsen



 Original Message 
From: - Fri Dec 07 14:52:01 2001
X-Mozilla-Status: 0001
X-Mozilla-Status2: 
Message-ID: [EMAIL PROTECTED]
Date: Fri, 07 Dec 2001 14:51:56 +0100
From: Johan Holst Nielsen [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Organization: 1WAY2PRINT A/S
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) 
Gecko/20010726 Netscape6/6.1
X-Accept-Language: en-us
MIME-Version: 1.0
To: Peter Lalka [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Image problem
References: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit



Peter Lalka wrote:

Thanks, in phpinfo list really isn't support for GIF:(
How can I manipulate jpeg images? Which functions are for this img. format?
P.

The same, only one difference. You have to open a file with 
CreateImageFromJPEG etc. and ImageJPEG instead of etc. GIF

Regards,

Johan





[PHP] Statistic analyze for Apache log

2001-12-04 Thread Johan Holst Nielsen

Hi

Anyone know a good PHP application that generate statistic from apachelog?

Please send me an URL.

Regards,
Johan


-- 
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] Statistic analyze for Apache log

2001-12-04 Thread Johan Holst Nielsen

Yes, I have already seen it. But I would prefer a PHP written 
application. AWSTATS are written in Perl :o(.

Do you know anything like this, in PHP? :o)

Regards,

Johan

Manu Verhaegen wrote:

You can use AWSTATS, it will working and it is very nice.


Greetings,
Manu


- Original Message -
From: Johan Holst Nielsen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 04, 2001 10:51 AM
Subject: [PHP] Statistic analyze for Apache log


Hi

Anyone know a good PHP application that generate statistic from apachelog?

Please send me an URL.

Regards,
Johan


--
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] Statistic analyze for Apache log

2001-12-04 Thread Johan Holst Nielsen



If you find this out off list could you let me know as well.  I can only find C++ and 
Perl
scripts.

Ok, thinking about programming if it don't exists.
So I let you know when it's ready :o)

Regards,

Johan


-- 
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] problem with ImageCreateJPEG ...

2001-12-04 Thread Johan Holst Nielsen



sorry for taking your time, but I still dont understand why I got errors with
pjeg...
I use the following code on other machine with jpeg support to , and it works,
while in my machine I got an empty jpeg file
?
 Header(Content-type: image/jpeg);
 $im=ImageCreate(400,200);
 $bcg  = ImageColorAllocate($im,240,240,240);
 $prt  = ImageColorAllocate($im,0,0,0);
 $rd   = ImageColorAllocate($im,255,0,0);
 ImageFill($im,400,200,$bcg);
 ImageLine($im,110,85,280,85,$rd);
 ImageString($im,5,130,90,--- OK ---,$prt);
 ImageLine($im,110,110,280,110,$rd);
 ImageJPEG($im,a.jpg);
?
html
body
img src=a.jpg
/body
/html

Try to remove all html, and instead make a ImageJPEG($img);

You should then only get the JPEG file?

You set a header, and the browser doesn't understand the HTML...

regards
Johan


-- 
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] URGENT-HELP !!!!!!

2001-11-30 Thread Johan Holst Nielsen




   Want to send mail through PHP script such that

the receiver of that mail should not contain FROM

header.

I used mail() function with empty FROM header and

even without FROM header, but the receiver is still

getting FROM address as [EMAIL PROTECTED]


You can't. The mail specification have to get a FROM header, but to make 
a solution you can make a FROM header like this: FROM: Do Not Reply 
[EMAIL PROTECTED]

regards,

Johan


-- 
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] URGENT-HELP !!!!!!

2001-11-30 Thread Johan Holst Nielsen

hmm, youre right.

You can use this header maybe FROM: Do Not Reply nonexists@localhost

The SMTP should be able to resolve localhost?

Regards,

Johan



Jon Farmer wrote:

Problem with that solution is some SMTP hosts will reject messages from
domains that do not resolve to the sending SMTP host. I would recommend
setting up a alias on sendmail and pipe all email to that address to
/dev/null

You would need to stress to your recipients that all replies to that email
are ignored.

Regards

Jon
--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07763 620378
PGP Key available, send email with subject: Send PGP Key


- Original Message -
From: Chamarty Prasanna Kumar [EMAIL PROTECTED]
To: Johan Holst Nielsen [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, November 30, 2001 10:54 AM
Subject: Re: Re: [PHP] URGENT-HELP !!





Thanks very much !! Smart solution !!

yes, I don't want to get reply from that mail.

Just looking for any solution..if u finds one

please let me know.

Regards,

Kumar.




On Fri, 30 Nov 2001 Johan Holst Nielsen wrote :



  Want to send mail through PHP script such that

the receiver of that mail should not contain FROM

header.

I used mail() function with empty FROM header and

even without FROM header, but the receiver is still

getting FROM address as [EMAIL PROTECTED]

You can't. The mail specification have to get a FROM
header, but to make
a solution you can make a FROM header like this: FROM:
Do Not Reply
[EMAIL PROTECTED]

regards,

Johan


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
p.net
For additional commands, e-mail:
[EMAIL PROTECTED]
To contact the list administrators, e-mail:
[EMAIL PROTECTED]



--
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] URGENT-HELP !!!!!!

2001-11-30 Thread Johan Holst Nielsen




I am talking about the final SMTP host.. it will do a reverse lookup on the
From: domain and if it dont resolve to the IP of the sending STMP host it
will reject it.

yes I know. But it the final SMTP tries to resolve the host (localhost) 
it will get a response from it self? I haven't tried it, but I think it 
would work.

By the way... the most of the SMTP doesn't check at the FROM header, but 
from the sender SMTP.
So if you got a nonexisting e-mail it would accept it too, but it the 
sender host isn't valid it will reject it.

Regards,

Johan


-- 
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] Going blind?

2001-11-21 Thread Johan Holst Nielsen



$result=@mysql_query($qry,$connection);

Try make a line after this:

echo mysql_errno().: .mysql_error();

What is the output?

Regards,
Johan


-- 
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] words in a string

2001-11-17 Thread Johan Holst Nielsen

 i want php to do an IF, when he founds a special word in a string (ex:
 text_-_write_-_text ) .. i m not able to manage it ..

?php
function doThis($x) {
   //something?
   $result = $x. phplover;
   return $result;
}

$string = Hi whats your name? Hi whats your name?;
$string_arr = explode( , $string);
$newstring = 
for($i=0; $isizeof($string_arr); $i++) {
if($string_arr[$i] == Hi) { //Or ereg if the word only have to contain
   $string_arr[$i] = doThis($string_arr[$i]);
}
$newstring .=  .$string_arr[$i];
}
//Return Hi phplover whats your name? Hi phplover whats your name?
echo $newstring;
?

Could you use this example?

Regards,
Johan

-- 
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]




[PHP] Re: Sending mail without using mail()

2001-11-16 Thread Johan Holst Nielsen

 Ok, where can I find a tutorial about sending mail using fsockopen ?
 
 ***

http://www.phpbuilder.com/columns/tim19990221.php3

Regards,
Johan

-- 
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] Re: I suck at regular expressions!

2001-11-15 Thread Johan Holst Nielsen

Richard S. Crawford wrote:

 Not quite.  I have the same problem.

I tried at test on my localhost. Following works for me:

$string = htmlheadtitleSometime i dont wanna 
know/title/headbody/body/html;
if(eregi(title(.+)/title, $string, $arr)) {
   echo Title: .$arr[1];
}
else {
   echo unknown title;
}

This works for me?

Regards,

Johan

-- 
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]




[PHP] Re: how can I get the post content in php

2001-11-15 Thread Johan Holst Nielsen

the program just can let me get the post string like my example
 I want post the xml file content to a php file, then I want get the post
 string that it's xml content.
 
 hehe, thanks for your help

Did you solve your problem?
I dont think i understand you, but i tries to give a little summary what I 
think you mean.

1. A page make a post request with XML data to a PHP file.
2. The PHP file get the post request, and get the XML data.
3. An then what?

Regards,
Johan

-- 
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]




[PHP] Re: how can I get the post content in php

2001-11-15 Thread Johan Holst Nielsen

 I think you understand my problem.
 
 I will use a client program to POST the XML data to a php file on the
 server base HTTP
 in php file will get the post request,
 
 the question is, how can i get the xml data in post request

Hmm, I dont think I understand? Where do you want to do with the XML? Cant 
you just make a echo() in a xml document? please explain?
?xml version='1.0'?
...
...

?php
echo $xmldatavar;
?
...
...
...

Regards,
Johan

-- 
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]




[PHP] Re: Fatal error: Call to undefined function: imagecreate()

2001-11-15 Thread Johan Holst Nielsen

 I know it's probabally overkill but in the configure messages, it says
 yes for everything gd, jpeg, png, and zlib.  Any suggestions? If anybody
 wants to see the configure messages let me know.

What do PHP tells you about the GD lib extension.
Try making a phpinfo() file and send the output in the GD lib section.

Regards,
Johan

-- 
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]




[PHP] Re: JPG Images from database to filename.jpg

2001-11-15 Thread Johan Holst Nielsen

 Header(Content-type: image/jpeg);
 echo $Images;
 
 I can't figure out how to create the header.  There's lots of examples
 of how to do the above, but I have yet to stumble across an example
 which allows you to write the header into a file

You could make a PHP script that generate the picture?

Like this:

?php
/* Picture file need an ID!! */
$connection = mysql_connect(host, user, pwd);
mysql_select_db(dbname);
$query = 'SELECT imagefiled FROM imagetabel WHERE id = '.$id;
$result = mysql_query($query);
if(mysql_num_rows($result)  0) {
   //You got the image
   header(Content-type: image/jpeg);
   $row = mysql_fetch_row($result);
   echo $row[0];
}
else {
   //No image with that id!
}
mysql_close($connection);
?

HTML file where the image is:

html
body
img src=phpfile.php?id=23 border=0 alt=
/body
/html

Dont know if you misunderstand you?

Regards,
Johan

-- 
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]




[PHP] Re: Controlling length of table data

2001-11-14 Thread Johan Holst Nielsen

 This is really a combination html/php question, I believe.  The problem is
 that I have a table that displays a field of text that can be several
 hundred bytes long.  If, however, someone holds down a key and produces
 500
 letter 'x' the table data then distorts the table!  Since the length of
 the data needs to be several hundred bytes, is there someway to either
 control the table data width so that the length of a non breaking string
 of characters will not distort the table, or is there a php string
 function to break the sentence into words and then I'd have to build some
 logic to test the length?

Use wordwrap() ?

Regards,

Johan

-- 
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]




[PHP] Re: Session help

2001-11-14 Thread Johan Holst Nielsen

 Start at index.html. It goes to postcard.php. When I click on submit in
 postcard.php, if I change any of the values in the form, the session
 values received in send_mail.php do not change. Anyone have an idea what
 I have done wrong now?
 

Try to make a session_unregister(), and make session_register() again with 
the new values.

Think it will help you :o)

Regards,

Johan


-- 
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]




[PHP] Re: mail() function

2001-11-14 Thread Johan Holst Nielsen

 $mailheaders = From: \Do Not Reply\\r\nReply-To: Do Not Reply@Do Not
 Reply\n;
  
 If I use the above headers it says from Do Not [EMAIL PROTECTED]
  
 Does anyone know how to make it just say Do Not Reply?

You cant... but try making it like this:

$mailheaders = FROM: Do Not Reply DoNotReply@localhost\nREPLY-TO: 
DoNotReply@localhost;

regards,

Johan

-- 
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]




[PHP] Re: PHP + apache .htaccess

2001-11-14 Thread Johan Holst Nielsen

 After I research security issue from the web, I had found apache
 .htaccess which can solve
 my problem. What my problem is that, can .htaccess perform like a database
 system which
 can store users loginID and password, and also set those users have a
 expired time each ??

If you want to use .htaccess can you make some links like this, to the 
customers who is logged in:
http://username:[EMAIL PROTECTED]/secretfolder/

Regards,
Johan

-- 
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]




[PHP] Re: PHP + apache .htaccess

2001-11-14 Thread Johan Holst Nielsen

 then, can .htaccess store the user expried date ?
 like Peter is not allowed to login after 2Feb 2001, Sam is expired after
 11Nov 2002..

Yes and no. You just have to make a change in the .htaccess file.

 and also, is it possible to maintain the .htaccess automatically ?
 like I write a shell script and run it schedully to delete those expired
 entry ?

Yes it a possibility. Think you can make it with a simply fopen() fwrite(), 
with the cron daemon.

The other possibility is to make a folder outside webscope.
Then you can make a loginscript in mysql like:

?php
$connection = mysql_connect(host, user, pwd);
mysql_select_db(db);
$query = SELECT id FROM users WHERE user = '$user' AND pwd = '$pwd':
$result = mysql_query($query);
if(mysql_num_rows($result)  0) {
header(Content-type: you choose);
header(Content-length: filesize('/home/filename'));
header(Content-Disposotion: inline; filename=filename.tar.gz);
readfile(/home/filename);
}
else {
   echo you are not allowed to download this file!:
}
?
Regards,
Johan

-- 
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]




[PHP] Re: I suck at regular expressions!

2001-11-14 Thread Johan Holst Nielsen

Richard S. Crawford wrote:

 I am trying to get the title of an html file... you know, the string
 between the  title  and  /title  tags...
 
 Here is the function I've got so far:
 
 function fileTitle($fileName) {
  $myFile = fopen($fileName, r);
  $myText=;
  while (!feof($myFile)) {
  $myText .= fgets($myFile,255);
  }
  fclose($myFile);
  if (eregi(TITLE(.+)/TITLE,$myText,$theTitle)) return
 $theTitle[0];
  else return (No Title);
 }

Try:
function getTitle($filename) {
   $fp = fopen($filename, r);
$filecontent = fread($fp, filesize($filename));
if(eregi(title(.+)/title, $content, $title_arr)) {
return 
addslashes(htmlspecialchars(trim(strip_tags($title_arr[1];
}
else {
return (No Title);
}
}


Regards,
Johan

-- 
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]




[PHP] Re: how can I get the post content in php

2001-11-14 Thread Johan Holst Nielsen

 I mean post content string not a lot of variables
 
 etc:
 
 aaa.html post a=1b=2 to bbb.php
 
 I want use php to read the string a=1b=2 not $a and $b

I not sure I understand you, but are you looking for
$HTTP_SERVER_VARS['QUERY_STRING'] ??

Regards,

Johan

-- 
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]




[PHP] Re: how can I get the post content in php

2001-11-14 Thread Johan Holst Nielsen

 $HTTP_SERVER_VARS['QUERY_STRING']  -- it just can read the content by GET
 method.
 
 I want POST content

Ah okay. Try this:

$post_query = ;
$keys_arr = array_keys($HTTP_POST_VARS);
$keys_size = sizeof($key_arr);
for($i=0; $i$keys_size; $i++) {
if($i == 0) {
$post_query .= $keys_arr[$i].=.$HTTP_POST_VARS[$keys_arr[$i]];
}
else {
$post_query .= .$keys_arr[$i].=.$HTTP_POST_VARS[$keys_arr[$i]];
}
}

Regards,
Johan

-- 
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]




[PHP] Question about PDF lib.

2001-08-27 Thread Johan Holst Nielsen

Hi

Do anyone know, how i define the width, height etc. parameters in PDFlib 
functions in PHP? Is it in cm, pixels, inch? Or?

Anyone know?

I need to generate printingfiles, so I hope I can use cm or sometime like 
that :o)

Regards,

Johan

-- 
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] running php scripts

2001-07-17 Thread Johan Holst Nielsen

 We're running suse 7.1 and apache on the server
  containing the information, and the problem is I don't know 
how to make
  linux run the php script, or how to set up crobtab with the php
 script in
  mind. anyone have any ideas?

 You can use this Tutorial
 http://www.faqts.com/knowledge_base/view.phtml/aid/1005

 I think it can help you :o)

If your problem was how to execute the script you can etc. use Lynx (or
wget)... if you use lynx use follow

/path-to-lynx/lynx http://www.domain.com/scriptname.php -source

Regards

Johan



-- 
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] php as cron

2001-06-21 Thread Johan Holst Nielsen

try etc.

00,30 * * * * lynx -dump http://path.to.php.script  /dev/null

Regards

Johan


 Hi

 I have PHP installed as Apache module but I want to run a cron job.  I
 have .php script that works OK when executed through browser but is there
 any way I could execute it through a cron job.

 Ajdin


 --
 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]




-- 
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]




[PHP] PHP conference?

2001-06-20 Thread Johan Holst Nielsen



Anyone know when and 
how you can sign upfor the conference in Franfurt (5-7 Nov 
2001)?

Can't find any 
information at there website, someone who can help me?! :o)

Regards

Johan


[PHP] PHP conference?

2001-06-20 Thread Johan Holst Nielsen




Anyone know when and 
how you can sign upfor the conference in Franfurt (5-7 Nov 
2001)?

Can't find any 
information at there website, someone who can help me?! :o)

Regards

Johan


[PHP] Problem with writing text with GD

2001-04-11 Thread Johan Holst Nielsen

Hi

I have a problem with GD library. Then I write some text with the GD library
TTF function I get a very unreadable text :o(

The problem comes then the font is in size 9 and under!

Some know how to solve this problem?

/Johan


-- 
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]




SV: [PHP] echo (test);

2001-04-04 Thread Johan Holst Nielsen

sorry if this has been covered before.  I am not sure if this makes a
difference but I see in some books echo written as:

echo ("Hello");

and in others just:

echo "Hello";

Do the brackets make a difference.

Hmmm, nope. You can also write print "Hello"; or print("Hello");

/Johan


-- 
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]




SV: [PHP] round up number

2001-03-14 Thread Johan Holst Nielsen

How do I round up a lot of decimal number like 10.232656898 to be 10.23 ?
Should I use this?
$num = 10.26564787;
$Rnum = round($num);
What would be the function I am looking for and how?


Try:
$num = 10.26564787;
$Rnum = round($num, 2);

/Johan


-- 
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]




SV: [PHP] Linking Libraries ...

2001-03-14 Thread Johan Holst Nielsen

I have a hosting account that provides PHP, but it hasn't been compiled
with
the IMAP libraries, and I really need these functions. Is there any way to
link the IMAP lib locally (ie: without root permissions)? I've used Perl
before and know that similar is possible.

No, you have to compile PHP with the IMAP library! Try to contact your
provider an ask if they could install the library!

/Johan


-- 
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]