[PHP] Help with system architecture and planning

2004-07-07 Thread Adrian Teasdale
Hi there Bit of a long one. Sorry about that :) Basically we have been contracted to develop an information portal which will also include free web-based email and a free sitebuilder tool, running standalone independent php-driven websites for this particular vertical market. My concern is that

Re: [PHP] custom tags

2004-07-07 Thread Jason Barnett
Eric Emminger wrote: Hi George, How about this? parse the html as xml and replace the component tags with whatever php/html code output that result to a file include the file from previous step There's actually a PEAR package which can help you with this as well:

Re: Re[2]: [PHP] Re: Form Submission

2004-07-07 Thread Torsten Roehr
Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Torsten Roehr: How do you check which button was pressed (read: which action should be performed) when not relying on this? The button is generally *not* sent by the browser if you hit enter

Re: [PHP] PHP Web Mail

2004-07-07 Thread Christophe Chisogne
raditha dissanayake a écrit : IMAP being a general file access protocol, there are inherent security problems to be aware of. On some srv, you could easily get /etc/passwd by simply knowing a single user/password. Please explain how. [sorry to be off-topic on a php list but I'll answer anyway]

Re: [PHP] parse_ini_file

2004-07-07 Thread Jason Barnett
I'd prefer the text file. It's easier to open that and change values plus they don't have to worry about PHP syntax as much. Haven't tried, but you should be able to import them as private variables for your class... Thanks for the advice John. OK, so extending this a bit: would it be better

Re: [PHP] parse_ini_file VS. constructor with many parameters

2004-07-07 Thread Jason Barnett
John W. Holmes wrote: I'd prefer the text file. It's easier to open that and change values plus they don't have to worry about PHP syntax as much. Haven't tried, but you should be able to import them as private variables for your class... Thanks for the advice John. OK, so extending this a

Re: [PHP] PHP Web Mail

2004-07-07 Thread Marek Kilimajer
Christophe Chisogne wrote: Example: badly configured server, angry user john using mozilla and knowing a single login/password on the server (that login doesnt even have a valid shell, ex /bin/false) In mozilla, john creates an IMAP account, choosing '/etc' as directory folder, then 'subscribe' to

[PHP] Using split to establish extension of file

2004-07-07 Thread Russell Curtis
I'm trying to use the split function to identify the extension of an uploaded file: $file_name = $_FILES['userfile']['name']; $pieces = explode(., $file_name); $file_extension = $pieces[1]; // piece2 Which will work, providing that the uploaded file only has one full-stop in the name

Re: [PHP] Using split to establish extension of file

2004-07-07 Thread zareef ahmed
--- Russell Curtis [EMAIL PROTECTED] wrote: I'm trying to use the split function to identify the extension of an uploaded file: $file_name = $_FILES['userfile']['name']; $pieces = explode(., $file_name); $file_extension = $pieces[1]; // piece2 Which will work, providing that

Re: [PHP] Using split to establish extension of file

2004-07-07 Thread Ewout
- Original Message - From: Russell Curtis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 07, 2004 12:24 PM Subject: [PHP] Using split to establish extension of file I'm trying to use the split function to identify the extension of an uploaded file: $file_name =

[PHP] Pocket Excel files?

2004-07-07 Thread Robert Sossomon
Anyone know how to write pocket excel files and how to write the contacts file for pocket PC? I want to let my users download files straight to their pocket PCs without having to run a conversion process in the middle. Thanks, Robert -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Using split to establish extension of file

2004-07-07 Thread Russell Curtis
Many thanks - just what I was looking for! Cheers Russell -- --- Russell Curtis M +44 (0) 7796268780 www.russellcurtis.com www.buildingdetails.co.uk Ewout [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] - Original Message - From: Russell

[PHP] sending attachments

2004-07-07 Thread Curlys
hi can some body help me to send an email attachment ( a log file ) from php ? Actaually i need a real guide plz thanx in advance curlys

Re: [PHP] sending attachments

2004-07-07 Thread zareef ahmed
Hi, You should read something about sending headers with php's email functions. BTW... PEAR and phpclasses.org has some classes to do so. You may also use this class availabel on phpclasses.org http://www.phpclasses.org/browse/package/32.html zareef ahmed --- Curlys [EMAIL PROTECTED]

Re: [PHP] sending attachments

2004-07-07 Thread Ewout
- Original Message - From: Curlys [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Wednesday, July 07, 2004 1:04 PM Subject: [PHP] sending attachments can some body help me to send an email attachment ( a log file ) from php ? Actaually i need a real guide plz I used

[PHP] php training tips

2004-07-07 Thread Jaskirat Singh
Hello, I am a PHP coder for the last 4 years doing mostly PHP MySQL stuff. Off late I have been requested by a number of programmers and students to teach PHP. I am wondering how different teaching is from coding and how to design the contents of a 1-2 week training course. I am planning to begin

Re: [PHP] PHP Web Mail

2004-07-07 Thread Christophe Chisogne
Marek Kilimajer a écrit : it's not the fault of the imap protocol. IMAP is a general file access protocol[1] (POP3 isnt) So IMAP is more dangerous, by its very nature. From a user perspective, this doesnt matters. But it's very different when you're administrator taking care of a site's security.

[PHP] PHP / Email / ActionScript

2004-07-07 Thread Josh Eastgate
Hi, I have made a shopping kart for a web site, in flash...and I have it so when the shopping kart is submitted...all the order details (variables) are sent to a PHP file that sends the order to the businesses email. My main problem is with the PHP file. I dont know how to use IF THEN ELSE

[PHP] Re: PHP / Email / ActionScript

2004-07-07 Thread Torsten Roehr
Josh eastgate [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have made a shopping kart for a web site, in flash...and I have it so when the shopping kart is submitted...all the order details (variables) are sent to a PHP file that sends the order to the businesses email.

Re: [PHP] PHP / Email / ActionScript

2004-07-07 Thread raditha dissanayake
Josh Eastgate wrote: Hi, I have made a shopping kart for a web site, in flash...and I have it so when the shopping kart is submitted...all the order details (variables) are sent to a PHP file that sends the order to the businesses email. My main problem is with the PHP file. I dont know how to use

Re: [PHP] PHP Web Mail

2004-07-07 Thread raditha dissanayake
Christophe Chisogne wrote: raditha dissanayake a écrit : IMAP being a general file access protocol, there are inherent security problems to be aware of. On some srv, you could easily get /etc/passwd by simply knowing a single user/password. Please explain how. [sorry to be off-topic on a php

[PHP] post without form

2004-07-07 Thread Josh Close
How can I post data without having it submitted from within a form? With get I can just add it to the url. Is there a php function for this? -- -Josh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] post without form

2004-07-07 Thread raditha dissanayake
Hi, POST is the technique where you send the data by adding it to the body of the message. In other words after sending the usual HTTP headers you continue to write on the same socket connection the data that you want to pass to the server. In get you do not write after the headers but append

Re: [PHP] post without form

2004-07-07 Thread Josh Close
So basically there is no easy way around this. What I'm trying to do is have a page return to a page that was a couple pages back with the same get info. On the second page I can do $return_url = $_SERVER['HTTP_REFERER']; to get the previous url. But then I need to pass it on to the next page,

Re: [PHP] sending attachments

2004-07-07 Thread Juan Pablo Herrera
Hi! The class it ok. How can I put a GIF in Base64 in the message body? Regards, Juan - Original Message - From: Curlys [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Wednesday, July 07, 2004 1:04 PM Subject: [PHP] sending attachments can some body help me to send an email

Re: [PHP] post without form

2004-07-07 Thread Michael Gale
Hello, Use a token and a database, I am using the following: 1. I setup a table called token_table with columns: 1. token_id - primary DB key -- auto incremented 2. token_name - actual token string 3. token_date - date created 4. token_userd - user id

Re: Re[2]: [PHP] Re: Form Submission

2004-07-07 Thread Curt Zirzow
* Thus wrote Torsten Roehr: Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Torsten Roehr: And if it did, which one does it send? If there are multiple buttons on a page, does it send the one closest to the focused item? or does it send the very

Re: [PHP] php training tips

2004-07-07 Thread Brent Clark
Hi Im sure there will be others out there that will completely disagree with me, but why dont you look at Sams teach your self PHP. The reason I suggest this is because its cheap, it has excerises in them, it pretty much has all the dirty for you. I bet they (Sams) have pretty much thought in

Re: Re[2]: [PHP] Re: Form Submission

2004-07-07 Thread Torsten Roehr
Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Torsten Roehr: Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Torsten Roehr: And if it did, which one does it send? If there are multiple buttons on a page, does

[PHP] HEAR OUR MESSAGES

2004-07-07 Thread Mr.EMEKA OKADIGBO, AND JUNIOR ONES
FROM Mr.EMEKA OKADIGBO, AND JUNIOR ONES FEDERAL CAPITAL TERRITORY, ABUJA. NIGERIA Email:[EMAIL PROTECTED] IT IS WITH DUE RESPECT AND HUMILITY WE SEND THIS MAIL TO YOU WHICH WE BELIEVE WILL BE OF GREAT INTEREST TO YOU AND IN VIEW OF THE FACT THAT YOU WILL BE OF A GREAT ASSISTANCE TO ME AND MY

[PHP] Malicious SQL

2004-07-07 Thread Gabe
Can someone help me understand how people are able to use SQL maliciously if you don't protect against it in PHP? For example, I've written a very simple search SQL statement that takes the value of a variable for the search criteria ( from a webpage form ). I don't understand how someone

RE: [PHP] Malicious SQL

2004-07-07 Thread Jay Blanchard
[snip] Can someone help me understand how people are able to use SQL maliciously if you don't protect against it in PHP? [/snip] This is a complex subject, but let us say that you didn't do checking at all, someone might be able to pass a delete statement in a form box like DELETE FROM `table`

Re: [PHP] Malicious SQL

2004-07-07 Thread Keith Greene
For example, if you are not quoting your criteria: sql = mysql_query(select * from users where name=.$name); if someone enters the following in the name field, you're toast: Jim; delete from users; on the contrary: sql = mysql_query(select * from users where name='.$name.'); will simply look for a

Re: [PHP] Malicious SQL

2004-07-07 Thread Matt M.
SELECT autoQuesID, fldQuesTitle, fldBody FROM tblFAQ_Question WHERE (blnHidden = FALSE AND ((fldBody LIKE '%$strCriteria%') OR (fldQuesTitle LIKE '%$strCriteria%'))); Say $strCriteria comes from one of the values in the $_REQUEST array, a user change is coming through in that variable. so

[PHP] Re: Malicious SQL

2004-07-07 Thread Gabe
Gabe wrote: Can someone help me understand how people are able to use SQL maliciously if you don't protect against it in PHP? For example, I've written a very simple search SQL statement that takes the value of a variable for the search criteria ( from a webpage form ). I don't understand

[PHP] test

2004-07-07 Thread barophobia
ok, it's been about an hour since i subscribed and i still haven't received any messages so i'm sending this one as a test. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re[2]: [PHP] Re: Form Submission

2004-07-07 Thread Justin Patrin
On Wed, 7 Jul 2004 10:06:25 +0200, Torsten Roehr [EMAIL PROTECTED] wrote: Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Torsten Roehr: How do you check which button was pressed (read: which action should be performed) when not relying on

Re: [PHP] Malicious SQL

2004-07-07 Thread Brian Dunning
I have a question about this. Here is from the documentation: The PHP directive magic_quotes_gpc is on by default, and it essentially runs addslashes() on all GET, POST, and COOKIE data. Why doesn't this automatically prevent injections, since it escapes out any single quotes they try to

Re: [PHP] Malicious SQL

2004-07-07 Thread Josh Close
It may escape a quote, but injections would still be possible in other ways. It gets passed in as \' but then used normally as ' when it's the the variable. -Josh On Wed, 7 Jul 2004 10:31:17 -0700, Brian Dunning [EMAIL PROTECTED] wrote: I have a question about this. Here is from the

Re: [PHP] Malicious SQL

2004-07-07 Thread Justin Patrin
On Wed, 7 Jul 2004 10:31:17 -0700, Brian Dunning [EMAIL PROTECTED] wrote: I have a question about this. Here is from the documentation: The PHP directive magic_quotes_gpc is on by default, and it essentially runs addslashes() on all GET, POST, and COOKIE data. Why doesn't this

Re: [PHP] call_user_func and call-time pass-by-reference

2004-07-07 Thread Andrew Nagy
Tom Rogers wrote: Sorry about that, I checked it in cli and it doesn't give a warning. This is another way: function fun($arg) { $arg++; } $var = 0; call_user_func_array(fun, array($var)); echo $var; Hmm ... this still echos 0 and not 1. I am using 4.3.7 with all warnings on.

Re: [PHP] call_user_func and call-time pass-by-reference

2004-07-07 Thread Andrew Nagy
Curt Zirzow wrote: * Thus wrote Andrew Nagy: How do you use the call_user_func function with call-time pass-by-reference deprecation? For example: function fun($arg) { $arg++; } $var = 0; call_user_func(fun, $var); echo $var; //echoes 0 instead of 1 $func_call = 'fun'; $func_call($var); Curt

Re: [PHP] Malicious SQL

2004-07-07 Thread Matthew Sims
On Wed, 7 Jul 2004 10:31:17 -0700, Brian Dunning [EMAIL PROTECTED] wrote: I have a question about this. Here is from the documentation: The PHP directive magic_quotes_gpc is on by default, and it essentially runs addslashes() on all GET, POST, and COOKIE data. Why doesn't this

Re: [PHP] call_user_func and call-time pass-by-reference

2004-07-07 Thread Justin Patrin
On Wed, 07 Jul 2004 13:44:21 -0400, Andrew Nagy [EMAIL PROTECTED] wrote: Curt Zirzow wrote: * Thus wrote Andrew Nagy: How do you use the call_user_func function with call-time pass-by-reference deprecation? For example: function fun($arg) { $arg++; } $var = 0;

[PHP] encode $searchenquiry

2004-07-07 Thread John Taylor-Johnston
I have created an .inc that allows me to click on a submit to show the next or previous 25 records found etc. The problem is that if $searchenquiry includes a quotation mark, the html looks like: input type=hidden name=searchenquiry value=atwood's -margaret\ Is there a function to encode

[PHP] Re: test

2004-07-07 Thread John Taylor-Johnston
It works. Just not busy. I prefer to use and post with my (Netscape) newsgroup reader. See: news://news.php.net/php.general If memory serves me correct, it will accept anyone's post that has a valid email address. In any case, it keeps the inbox clean. Barophobia wrote: ok, it's been about an

[PHP] Re: encode $searchenquiry

2004-07-07 Thread Torsten Roehr
John Taylor-Johnston [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have created an .inc that allows me to click on a submit to show the next or previous 25 records found etc. The problem is that if $searchenquiry includes a quotation mark, the html looks like: input type=hidden

Re: Re[2]: [PHP] Re: Form Submission

2004-07-07 Thread Torsten Roehr
Justin Patrin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Wed, 7 Jul 2004 10:06:25 +0200, Torsten Roehr [EMAIL PROTECTED] wrote: Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Torsten Roehr: How do you check which button was

[PHP] Re: encode $searchenquiry

2004-07-07 Thread John Taylor-Johnston
Or should I URLencode $searchenquiry or ... how should I approach this? Hi John, you are looking for htmlentities(): http://de3.php.net/htmlentities Regards, Torsten Roehr Torsten, Thanks. I think I'm going to start with htmlspecialchars(). htmlentities() might be over kill? Great :) John

[PHP] Re: encode $searchenquiry

2004-07-07 Thread John Taylor-Johnston
Torsten Here it is, if it is any use to you? John --- $sql = 'SELECT *,MATCH (KW,AUS) AGAINST (\''.stripslashes($searchenquiry).'\' IN BOOLEAN MODE) AS relevancy FROM '.$table.' WHERE MATCH (KW,AUS) AGAINST

Re: [PHP] sending attachments

2004-07-07 Thread Juan Pablo Herrera
Thix class http://www.phpbuilder.net/snippet/detail.php?type=snippetid=614 it's good., but i can't embed Image in message body, i used function embed_image.Who have experience in this class?. Regards, Juan Hi! The class it ok. How can I put a GIF in Base64 in the message body? Regards,

Re: [PHP] post without form

2004-07-07 Thread Lars Torben Wilson
Josh Close wrote: So basically there is no easy way around this. What I'm trying to do is have a page return to a page that was a couple pages back with the same get info. On the second page I can do $return_url = $_SERVER['HTTP_REFERER']; to get the previous url. But then I need to pass it on to

Re: [PHP] Malicious SQL

2004-07-07 Thread John W. Holmes
Brian Dunning wrote: I have a question about this. Here is from the documentation: The PHP directive magic_quotes_gpc is on by default, and it essentially runs addslashes() on all GET, POST, and COOKIE data. Why doesn't this automatically prevent injections, since it escapes out any single

Re: [PHP] Malicious SQL

2004-07-07 Thread John W. Holmes
Justin Patrin wrote: On Wed, 7 Jul 2004 10:31:17 -0700, Brian Dunning [EMAIL PROTECTED] wrote: The PHP directive magic_quotes_gpc is on by default, and it essentially runs addslashes() on all GET, POST, and COOKIE data. Why doesn't this automatically prevent injections, since it escapes out any

Re: [PHP] Malicious SQL

2004-07-07 Thread John W. Holmes
Matthew Sims wrote: I think a good programming habit it to treat it as if it were off. With regards to magic_quotes_gpc, you can't just treat it as if it were off otherwise you may end up escaping data twice if it's not really off on a server that runs your code. Detect it's value with

Re: [PHP] post without form

2004-07-07 Thread Marek Kilimajer
Lars Torben Wilson wrote: Josh Close wrote: So basically there is no easy way around this. What I'm trying to do is have a page return to a page that was a couple pages back with the same get info. On the second page I can do $return_url = $_SERVER['HTTP_REFERER']; to get the previous url. But

[PHP] Active Directory Authentification

2004-07-07 Thread Mike Tuller
I have been working on this all day, and am not getting this to work. I am creating an application where a user would authenticate against Active Directory. Yesterday I was able to get PHP to connect to the AD server and display entries using this script. ? // PHP script to connect to the

[PHP] $_SERVER[HTTP_REFERER]

2004-07-07 Thread Shaun
Hi, Can someone tell me why echo '$_SERVER[HTTP_REFERER] = '.$_SERVER[HTTP_REFERER].'br'; Produces $_SERVER[HTTP_REFERER] = Is this a problem with my server configuration, if so is there a SERVER variable I can use instead? Many thanks -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] $_SERVER[HTTP_REFERER]

2004-07-07 Thread John Nichel
Shaun wrote: Hi, Can someone tell me why echo '$_SERVER[HTTP_REFERER] = '.$_SERVER[HTTP_REFERER].'br'; Produces $_SERVER[HTTP_REFERER] = Is this a problem with my server configuration, if so is there a SERVER variable I can use instead? Many thanks My guess is you didn't come to the page with that

Re: [PHP] post without form

2004-07-07 Thread Lars Torben Wilson
Marek Kilimajer wrote: Lars Torben Wilson wrote: Josh Close wrote: So basically there is no easy way around this. What I'm trying to do is have a page return to a page that was a couple pages back with the same get info. On the second page I can do $return_url = $_SERVER['HTTP_REFERER']; to get

Re: [PHP] $_SERVER[HTTP_REFERER]

2004-07-07 Thread Justin Patrin
On Wed, 7 Jul 2004 22:43:11 +0100, Shaun [EMAIL PROTECTED] wrote: Hi, Can someone tell me why echo '$_SERVER[HTTP_REFERER] = '.$_SERVER[HTTP_REFERER].'br'; Produces $_SERVER[HTTP_REFERER] = Is this a problem with my server configuration, if so is there a SERVER variable I can use

Re: [PHP] sending attachments

2004-07-07 Thread Juan Pablo Herrera
Hi! I'm testing HTML Mime Mail Class, it's really complete. Features: - text - text + attached - html - html + attached - html + Embeds Who has experience with this class? Regards, Juan This class http://www.phpbuilder.net/snippet/detail.php?type=snippetid=614 it's good., but i can't embed

[PHP] Got error Inappropriate ioctl for device when trying ssl connection....

2004-07-07 Thread Alex Shi
Hello, I got an error message when trying following script: ? //.. if (!$handle = fsockopen (ssl://my.com, 443, $errno, $errstr, $timeout = 30)) { print $errno: $errstr\n; return -1; /* connection failed */ } /* The my.com site WAS installed with a SSL certificate, and it works

[PHP] Slideshow using PHP

2004-07-07 Thread Todd Cary
I would like to have images displayed automatically using PHP with a Database and/or an array of images. Is there any sample code available for doing that? Can that be done with Flash and PHP? Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Storing website templates in sessions

2004-07-07 Thread Joe Harman
Hey everyone... I was curious if anyone out there has some pros and cons to storing a website template that is extracted from a mysql db and stored in a session... is this an efficient way to do it? also... does anyone know what the size limitations for a session would be? Thanks, Joe -- PHP

Re: [PHP] Storing website templates in sessions

2004-07-07 Thread John W. Holmes
Joe Harman wrote: I was curious if anyone out there has some pros and cons to storing a website template that is extracted from a mysql db and stored in a session... is this an efficient way to do it? also... does anyone know what the size limitations for a session would be? There's no practical

[PHP] Client IP

2004-07-07 Thread Rosen
Hi, How can I get remote IP adress of client? I use the fillow script:: $ip=getenv('HTTP_X_FORWARDED_FOR'); if (!$ip) { $ip = getenv('REMOTE_ADDR'); } But sometime it return me unknown sa IP adress. Can someone help me ? Thanks in advance! -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Client IP

2004-07-07 Thread Matthew Sims
Hi, How can I get remote IP adress of client? I use the fillow script:: $ip=getenv('HTTP_X_FORWARDED_FOR'); if (!$ip) { $ip = getenv('REMOTE_ADDR'); } But sometime it return me unknown sa IP adress. Can someone help me ? Thanks in advance! $_SERVER[REMOTE_ADDR] --Matthew Sims

Re: [PHP] Client IP

2004-07-07 Thread John W. Holmes
Matthew Sims wrote: Hi, How can I get remote IP adress of client? I use the fillow script:: $ip=getenv('HTTP_X_FORWARDED_FOR'); if (!$ip) { $ip = getenv('REMOTE_ADDR'); } But sometime it return me unknown sa IP adress. Can someone help me ? Thanks in advance! $_SERVER[REMOTE_ADDR] Either method

Re: [PHP] Client IP

2004-07-07 Thread Rosen
IP adress not send ?!? And how server communicate with client ? John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Matthew Sims wrote: Hi, How can I get remote IP adress of client? I use the fillow script:: $ip=getenv('HTTP_X_FORWARDED_FOR'); if (!$ip) { $ip =

Re: [PHP] Client IP

2004-07-07 Thread John W. Holmes
Rosen wrote: IP adress not send ?!? And how server communicate with client ? A variety of ways. What I meant is that it's not sent in the browser's headers that it sends to the site, which is where getenv() and $_SERVER[] would snatch it from. Do not rely on IP addresses. Trust me. -- ---John

Re: [PHP] Client IP

2004-07-07 Thread Rosen
:) Ok - then how linux server communicate with client - the server must have IP adress to whitch to send data. John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rosen wrote: IP adress not send ?!? And how server communicate with client ? A variety of ways. What I

Re: [PHP] Client IP

2004-07-07 Thread Robert Sargant
I've used this function before a couple of times, but I haven't tested it fully. Give it a go if you want. /*** BEGIN CODE ***/ // Function get_ip function get_ip() { // List of possible ip sources, in order of priority $ip_sources = array ( HTTP_X_FORWARDED_FOR,

Re: [PHP] Client IP

2004-07-07 Thread Lars Torben Wilson
Rosen wrote: IP adress not send ?!? And how server communicate with client ? [snip] The httpd server might know the remote IP address, but that doesn't mean that it has to tell PHP about it. The SAPI module may or may not set the value, for instance. Even if you could rely on the IP address, in

[PHP] binary data over UDP with PHP?

2004-07-07 Thread coder_1024
I'm trying to send some binary data to a UDP server using PHP. The examples I've been able to find show sending binary data over TCP, or they show sending text over UDP. I'm constructing the messages using the below: $text_msg = Hello, World\r\n; $binary_msg =

Re: [PHP] Client IP

2004-07-07 Thread Rosen
Thanks, This for the users, thath come from one IP adress - I know about it, but, Can I get just adress of the IP, with which the server communicates ? Lars Torben Wilson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rosen wrote: IP adress not send ?!? And how server communicate

Re: [PHP] Client IP

2004-07-07 Thread John W. Holmes
Rosen wrote: Can I get just adress of the IP, with which the server communicates ? If you don't see the IP address somewhere in the $_SERVER variable, then NO. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals

Re: [PHP] Client IP

2004-07-07 Thread Rosen
Ok, I don't understand why IP adress will bi invisible for $_SERVER variable. John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rosen wrote: Can I get just adress of the IP, with which the server communicates ? If you don't see the IP address somewhere in the $_SERVER

Re[2]: [PHP] call_user_func and call-time pass-by-reference

2004-07-07 Thread Tom Rogers
Hi, Thursday, July 8, 2004, 3:38:41 AM, you wrote: AN Hmm ... this still echos 0 and not 1. I am using 4.3.7 with all AN warnings on. AN Does anyone know how to use this function or anything similiar with AN passing by refernce. Since the call-time pass by reference is AN deprecated, this

Re: [PHP] binary data over UDP with PHP?

2004-07-07 Thread Keith Greene
I use the following without problem: $fp = fsockopen(udp://www.server.com, 24250, $errno, $errstr, .2); if (!$fp) { $status = Server not available; } else { $trigger = chr(hexdec('FF')).chr(hexdec('FF')).chr(hexdec('01')).chr(hexdec('00'));

[PHP] Re: Slideshow using PHP

2004-07-07 Thread Alex Shi
Search google for javascript slideshow script. Javascript slideshow need an array of image names, this can be done by php and mysql when dynamically generate the page. Alex Shi I would like to have images displayed automatically using PHP with a Database and/or an array of images. Is there

RE: [PHP] Client IP

2004-07-07 Thread Michael Sims
John W. Holmes wrote: IP adress not send ?!? And how server communicate with client ? A variety of ways. What I meant is that it's not sent in the browser's headers that it sends to the site, which is where getenv() and $_SERVER[] would snatch it from. Correct me if I'm wrong, but shouldn't

Re: [PHP] $_SERVER[HTTP_REFERER]

2004-07-07 Thread Gerard Samuel
On Wednesday 07 July 2004 05:43 pm, Shaun wrote: Hi, Can someone tell me why echo '$_SERVER[HTTP_REFERER] = '.$_SERVER[HTTP_REFERER].'br'; Produces $_SERVER[HTTP_REFERER] = Is this a problem with my server configuration, if so is there a SERVER variable I can use instead? It could be

Re: [PHP] Client IP

2004-07-07 Thread Jason Wong
On Thursday 08 July 2004 07:17, Rosen wrote: Ok - then how linux server communicate with client - the server must have IP adress to whitch to send data. Look some form of IP *will* be set and *will* be available in $_SERVER. What you was using in your original post has been deprecated

[PHP] Double parenthesis crisis

2004-07-07 Thread Ryan Schefke
In the below code the variable $thecomments might have some quotations in it. Like: $thecomments = how you like me now I'm trying to display the value of that variable in an input box using the value= as shown below; however, the double quotations are screwing me up. Can someone please

Re: [PHP] Double parenthesis crisis

2004-07-07 Thread Justin Patrin
You want htmlentities(), not addslashes(). On Wed, 7 Jul 2004 20:35:54 -0400, Ryan Schefke [EMAIL PROTECTED] wrote: In the below code the variable $thecomments might have some quotations in it. Like: $thecomments = how you like me now I'm trying to display the value of that variable in

Re: [PHP] Double parenthesis crisis

2004-07-07 Thread John W. Holmes
Ryan Schefke wrote: I'm trying to display the value of that variable in an input box Seriously, how many times can this question be asked in a week? You just need to run htmlentities() or htmlspecialchars() on the data before you place it in the input element. -- ---John Holmes... Amazon

Re: [PHP] Malicious SQL

2004-07-07 Thread Jason Wong
On Thursday 08 July 2004 00:05, Keith Greene wrote: Here's a simple (and probably quite common) example of how not checking user input will lead to disaster: DELETE FROM users WHERE userid = $userid userid is an integer column. If you didn't check your inputs and someone injected

Re: [PHP] Client IP

2004-07-07 Thread Lars Torben Wilson
Rosen wrote: Ok, I don't understand why IP adress will bi invisible for $_SERVER variable. It should be there, but mostly because the CGI 1.1 spec requires that it be provided to the script. There is no physical requirement for it to be there. Reasons for it not being present could include: o

Re: [PHP] call_user_func and call-time pass-by-reference

2004-07-07 Thread Curt Zirzow
* Thus wrote Andrew Nagy: Curt Zirzow wrote: * Thus wrote Andrew Nagy: How do you use the call_user_func function with call-time pass-by-reference deprecation? For example: function fun($arg) { $arg++; } ... $func_call = 'fun'; $func_call($var); This does not do what I

Re: [PHP] Using split to establish extension of file

2004-07-07 Thread Curt Zirzow
* Thus wrote Russell Curtis: I'm trying to use the split function to identify the extension of an uploaded file: $file_name = $_FILES['userfile']['name']; $pieces = explode(., $file_name); $file_extension = $pieces[1]; // piece2 You could always use the built in php function

Re: [PHP] binary data over UDP with PHP?

2004-07-07 Thread coder_1024
Thanks for the feedback. As it turns out, the reason I was getting zero data bytes in my UDP packet was that I had declared the packet variable outside the function in which I was using it. $packet = chr(0x01).chr(0x1d) etc function doSomething($x) { // using $packet in here gives you

[PHP] ssl key and crt generation

2004-07-07 Thread Hugh Beaumont
Hello List, I'm trying to get the following code to work : ? $dn = array(countryName = US, stateOrProvinceName = state, localityName = town, organizationName = foo, organizationalUnitName = foo, commonName = www.domain.com,

Re: [PHP] Want to save png to file

2004-07-07 Thread Wudi
int imagepng ( resource image [, string filename]) On Tue, 6 Jul 2004 13:48:44 +0200 Victor Sp?g Arthursson [EMAIL PROTECTED] wrote: 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