Re: [PHP] php and java appletsf
On Fri, May 21, 2004 at 08:16:30AM -0700, jon wrote: Nah... Maybe we're both confused. Is this a java app you wrote or one that you found somewhere? If you know how to control the camera from java and you know how to work in java, you could build yourself a quick and dirty command-line java application, then feed it commands from php using exec or something similar. Well the whole point of the java applet was to provide a nice, drag and drop interface to move the camera around. I already have a pure php version, it just doesn't look that nice and you can't drag things around. I don't think I explained myself very well. You can see the applet here: http://tom.playford.net/control/control.html It does very little at the moment. Tom Tom Playford wrote: jon wrote: Can you just send a command line java app commands from php? I'm not sure what you're getting at. Do you mean writing the Java code in the php page? I didn't know php could compile the code on the fly, can it? Or do you mean something else? Tom -- jon Tom Playford wrote: Dear all knowing list, I am trying to control the movement of a camera in real time from the web. But I also need to make sure that only the user I specify can have control. What I though I could do was this: launch a java applet from a php page parsing the session id. Then when the user adjusts the controls on the applet, a php page is loaded by the applet, sets the user session with the session id, then sends the control details back to the server and on to the camera. I've given this a go with no luck. When I try to set the session id on the php script that the Java applet loads I get a permissions error (the perms on /tmp are fine). I'm not 100% sure I understand sessions, is my method utterly implausible? Does anyone have any better suggestions? Thanks, Tom Playford . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php and java applets
Am I? I thought that applets were allowed to connect to the same host they were loaded from. Which is what I'm trying to do. Nice site BTW, useful for a few other things I'm working on, thanks. Tom On Sat, May 22, 2004 at 07:46:21AM +0600, raditha dissanayake wrote: Tom Playford wrote: That was my original plan. The problem is that if someone works out the commands needed to communicate with the php control page, they will be able to bypass the Java access control systems. I suppose I could use https, but does that encrypt the url and post data? I think you have found yourself trapped in the java applet sandbox. You need to create a signed applet. see http://www.radinks.com/java/sandbox/ for a brief guide. all the best -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: DOM XML output whitespace
[EMAIL PROTECTED] (Dan Phiffer) writes: I'm using PHP 5 these days, so I guess I'm looking for some way to tell a DomDocument to prettify its save() output. I don't remember any more where I found this, but with ?php $dom = new DomDocument(); $dom-formatOutput = true; ? you get what you ask for: formatted output. -- Martin Geisler My GnuPG Key: 0xF7F6B57B PHP EXIF Library | PhpWeather | PhpShell http://pel.sf.net/| http://phpweather.net/ | http://gimpster.com/ Read/write EXIF data | Show current weather| A shell in a browser -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Is there any good examples of PHPLIB?
Hi Dsx, If you're unable to use classes from PHPLIB, I suggest you learn PHP first. Using objects for the first time is very confusing, but there are some excellent guides on the internet. I suggest you spend a couple of days just experimenting, writing your own classes to do menial tasks, etc. Whatever task you're trying to achieve, be it communicate with an IRC server or query a game server, pear.php.net has the objects you need. Dsx [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there any good examples of PHPLIB?I can only write very simple programs of PHPLIB,but when the functions and classes added, I cannot hold it.So I'd like to learn some code examples of it,who can provide me some or a website about it? Thank you in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] best way to do this with arrays...
Hello, I have a table in a database that holds begin and end dates...I would like to select all the begin and end dates for a certain id, then add those dates, plus the dates between them to an array...example. Begin date 2004-07-04 End date 2004-07-09 I want the array to hold, 2004-07-04,2004-07-05,2004-07-06,2004-07-07,2004-07-08,2004-07-09 I would then loop to the next row in the db and continue to add to the array. I can't simply add one to the last two characters. What's the best way? I ask becuase I am using a nice php calender script and I want to change the background color of the day's cell if it falls between the begin and end dates of the calender. I thought I could just add the dates to an array, then use the in array function on each date. Thanks, Eddie WARNING: The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed. This message may contain information that is privileged, confidential and exempt from disclosure under applicable law. It may also contain trade secrets and other proprietary information for which you and your employer may be held liable for disclosing. You are hereby notified that any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify [EMAIL PROTECTED] by E-Mail and then destroy this communication in a manner appropriate for privileged information. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: best way to do this with arrays...
Edward Peloke [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I have a table in a database that holds begin and end dates...I would like to select all the begin and end dates for a certain id, then add those dates, plus the dates between them to an array...example. Begin date 2004-07-04 End date 2004-07-09 I want the array to hold, 2004-07-04,2004-07-05,2004-07-06,2004-07-07,2004-07-08,2004-07-09 I would then loop to the next row in the db and continue to add to the array. I can't simply add one to the last two characters. What's the best way? I ask becuase I am using a nice php calender script and I want to change the background color of the day's cell if it falls between the begin and end dates of the calender. I thought I could just add the dates to an array, then use the in array function on each date. As you only want to check if a certain date falls within the specified time period, this could be done easier by converting the dates to timestamps: $start = '2004-07-04'; $end = '2004-07-09'; $check = '2004-07-06'; // the date you want to check $timestampStart = mktime(0,0,0,substr($start,5,2),substr($start,8,2),substr($start,0,4)); $timestampEnd = mktime(0,0,0,substr($end,5,2),substr($end,8,2),substr($end,0,4)); $timestampCheck = mktime(0,0,0,substr($check,5,2),substr($check,8,2),substr($check,0,4)); if ($timestampCheck = $timestampStart $timestampCheck = $timestampEnd) { // do what you want } Haven't tested it. Hope it works for you. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: best way to do this with arrays...
$start = '2004-07-04'; $end = '2004-07-09'; $check = '2004-07-06'; // the date you want to check $timestampStart = mktime(0,0,0,substr($start,5,2),substr($start,8,2),substr($start,0,4)); $timestampEnd = mktime(0,0,0,substr($end,5,2),substr($end,8,2),substr($end,0,4)); $timestampCheck = mktime(0,0,0,substr($check,5,2),substr($check,8,2),substr($check,0,4)); FYI, the above can be shortened to: $timestampStart = strtotime($start); $timestampEnd = strtotime($end); $timestampCheck = strtotime($check); - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Free zip code database
In case anyone cares, here is a site that gives away a free zip code database that's complete and current, and includes latitude and longitude so you can do distance calculations: http://www.zipwise.com/free-zip-database.php Hope it's useful to someone, - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Re robi: Re:[PHP] Is there any good examples of PHPLIB?
[EMAIL PROTECTED] wrote: Hi~robi! Thank you,troby,my friend! With your guidance I found first time that PEAR is a very good coding tool which I'd like to learn later.But my server provider do not have it;fortunately,I overcomed the difficultys of PHPLIB by debugging and testing yesterday. To respond your kindness,I provide a good website to you which you probably not knowed before,that is http://www.phpclasses.org .How many PHP codes,classes and examples free shared here!I like the site very much.I'm from China,I'd like to make friends with you and any other PHP users:-) You can install PEAR yourself in your user account, it's just a set of files like any other library. You just have to make sure you set up your paths correctly. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] xml - xslt - xsl:fo - pdf
Hi, I am trying to transform a xsl:fo file to pdf. I generate xml files from mysql and I can convert them to xsl:fo using xslt but I can't find information for the last step (XSL:FO to PDF) I just know that a formatter is needed but all what I found where java, jade or .net based solutions. is there any 100% php solution for this problem?. Environment: Apache 2.0.47, PHP 4.3.2, mysql 4.0.13 running on WXP Thanks a lot in advance for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Quick encoding question:
I have a form and the people who submit are likely to include a bunch of ¶ characters. (That's a paragraph symbol in case it doesn't come through the list correctly.) However when I read it out of MySQL it comes back as ¶. What can I do about this? Thanks! - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Quick encoding question:
I have a form and the people who submit are likely to include a bunch of ¶ characters. (That's a paragraph symbol in case it doesn't come through the list correctly.) However when I read it out of MySQL it comes back as ¶. What can I do about this? Thanks! Looks like UTF-8. Make sure your output character encoding matches the database encoding, and use htmlentities() and the mb_* (multibyte string) functions where necessary. Debugging this stuff is a pain. :P - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Finding Pre-Made Solutions/Templates
Can somebody tell me the best place to look for free or purchase pre-made solutions/templates in PHP/mySQL ... (that can be fully modified and editable)? I am looking for solutions/templates that do the following: - full robust shopping cart - membership database - various content galleries: pictures - videos - audio etc. - these may be three separate solutions if need be ... That I can combine later... -- Thanks - RevDave [EMAIL PROTECTED] [db-lists] Check out some great Domain Names at: http://www.domains4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Finding Pre-Made Solutions/Templates
Domains4Days wrote: Can somebody tell me the best place to look for free or purchase pre-made solutions/templates in PHP/mySQL ... (that can be fully modified and editable)? I am looking for solutions/templates that do the following: - full robust shopping cart - membership database - various content galleries: pictures - videos - audio etc. - these may be three separate solutions if need be ... That I can combine later... php.resourceindex.com -- John C. Nichel KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Finding Pre-Made Solutions/Templates
I would recommend http://www.hotscripts.com/PHP/Scripts_and_Programs/index.html Warren Vail -Original Message- From: Domains4Days [mailto:[EMAIL PROTECTED] Sent: Monday, May 24, 2004 11:33 AM To: [EMAIL PROTECTED] Subject: [PHP] Finding Pre-Made Solutions/Templates Can somebody tell me the best place to look for free or purchase pre-made solutions/templates in PHP/mySQL ... (that can be fully modified and editable)? I am looking for solutions/templates that do the following: - full robust shopping cart - membership database - various content galleries: pictures - videos - audio etc. - these may be three separate solutions if need be ... That I can combine later... -- Thanks - RevDave [EMAIL PROTECTED] [db-lists] Check out some great Domain Names at: http://www.domains4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] list explode and undefined references
I came across an interesting problem today which I have found a work around but was wondering if anyone on the list had a better way to solve this problem. Been writing some php scripts on a Linux system using PHP 4.2.2. Basic script works just fine there and does what is needed. Moved this script over to a system running PHP 4.3.6 (and subsequently to one running PHP 4.3.4) and found the script dumping a tremendous number of warning messages. Tracked this down to my use of arrays and the list and explode functions. working example code follows: ?php $arrayvalues = array(alpha = 1, beta = 2, gamma = 3); $data = array(alpha=first, junk, beta=last); $numvalues = count($data); for($i=0;$i $numvalues;$i++) { @list($parameter, $value) = explode(=,$data[$i]); if(isset($arrayvalues[$parameter])) { switch($arrayvalues[$parameter]) { case $arrayvalues[alpha]: // something useful echotest 1\n; break; case $arrayvalues[beta]: // do something else echotest 2\n; break; case $arrayvalues[gamma]: // do more stuff echotest 3\n; break; default: // should never get here echotest 4\n; break; } } } ? The code above works as needed. The problems I had to sort out however was how to suppress error messages from the list() function since in one case there is no second parameter to store in the list variables. The behavior between php 4.2.2 and php 4.3.x was different in this, 4.2.2 does not issue any warnings on that statement (without the @). Similarly I had to add a test [the if(isset())] before letting the switch statement evaluate the array value. Without that check there is an error issued and the default statement in the switch is executed. Which is kind of what I expected (except for the error). Again 4.2.2 does not issue any kind of warnings or errors on this. The errors being reported under PHP 4.3.x are: if the @ is removed: PHP Notice: Undefined offset: 1 in /home/scot/work/testing/testone.php on line 11 offset 1 has a value but in the one instance there is no offset 1 created by the explode function. and if the isset test is removed: PHP Notice: Undefined index: junk in /home/scot/work/testing/testone.php on line 15 There is no junk index into the arrayvalues array. I understand why these warnings are being issued, in both cases I attempted to reference an element that does not exist or has not been declared previously. I was wondering if there is a better way to handle the error message from the list() function other than just ignoring it. Or going overboard and creating my own error handling functions. -- Scot L. Harris [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] list explode and undefined references
Scot L. Harris wrote: I came across an interesting problem today which I have found a work around but was wondering if anyone on the list had a better way to solve this problem. Been writing some php scripts on a Linux system using PHP 4.2.2. Basic script works just fine there and does what is needed. Oh shucks, if the script works the way you want it to edit your php.ini file and disable warning. I go by the old adage if it aint broken don't fix it. -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml - xslt - xsl:fo - pdf
On Mon, 2004-05-24 at 10:53, juan vazquez wrote: Hi, I am trying to transform a xsl:fo file to pdf. I generate xml files from mysql and I can convert them to xsl:fo using xslt but I can't find information for the last step (XSL:FO to PDF) I just know that a formatter is needed but all what I found where java, jade or .net based solutions. Not sure if there is a php functionality for the fo transform...you might need to run it through like java and call a fop object on it. -- Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] list explode and undefined references
From: Scot L. Harris [EMAIL PROTECTED] I came across an interesting problem today which I have found a work around but was wondering if anyone on the list had a better way to solve this problem. Been writing some php scripts on a Linux system using PHP 4.2.2. Basic script works just fine there and does what is needed. Moved this script over to a system running PHP 4.3.6 (and subsequently to one running PHP 4.3.4) and found the script dumping a tremendous number of warning messages. Tracked this down to my use of arrays and the list and explode functions. working example code follows: ?php $arrayvalues = array(alpha = 1, beta = 2, gamma = 3); $data = array(alpha=first, junk, beta=last); $numvalues = count($data); for($i=0;$i $numvalues;$i++) { @list($parameter, $value) = explode(=,$data[$i]); When explode() hit's the junk entry, a one element array is going to be returned when list() is looking for two. So that'll be causing your warnings. Why use list? foreach($data as $value) { $part = explode('=',$value); if(count($part) != 2) { echo array value did not have = sign; } else { if(isset($arrayvalues[$part[0]])) ... } } I was wondering if there is a better way to handle the error message from the list() function other than just ignoring it. Or going overboard and creating my own error handling functions. You could always just resort to error_reporting(E_ALL ^ E_NOTICE) at the beginning of your script and be done with this. :) But that's cheating. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: best way to do this with arrays...
the tricky part is I could have fifteen rows in the db all with different start and end dates that I need to check each day against. -Original Message- From: Michal Migurski [mailto:[EMAIL PROTECTED] Sent: Monday, May 24, 2004 10:18 AM To: Torsten Roehr Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: best way to do this with arrays... $start = '2004-07-04'; $end = '2004-07-09'; $check = '2004-07-06'; // the date you want to check $timestampStart = mktime(0,0,0,substr($start,5,2),substr($start,8,2),substr($start,0,4)); $timestampEnd = mktime(0,0,0,substr($end,5,2),substr($end,8,2),substr($end,0,4)); $timestampCheck = mktime(0,0,0,substr($check,5,2),substr($check,8,2),substr($check,0,4)); FYI, the above can be shortened to: $timestampStart = strtotime($start); $timestampEnd = strtotime($end); $timestampCheck = strtotime($check); - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] phpmyadmin
I am using phpmyadmin to backup my mysql database. I have it setup to backup all databases and at the bottom there is this foot note . . . * Use __DB__ for database name, __TABLE__ for table name and any strftime http://www.php.net/manual/function.strftime.php options for time specification, extension will be automagically added. Any other text will be preserved. It sounds like this is for adding the date and time to file name for the backup but I can't figure out how it works. Chris W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imagettftext() question
I've written a script that displays a graph of some data from a text file. Beneath each bar in the graph is a text label. I read the php.net documentation and it seemed that imagettftext() was the easiest function to get text in an image with, so I used that. Here is the text-display code (syntax is all correct): imagettftext($im, 10, 0, $i * 100 + 10, 190, $black, arial, str_pad($candidates[$i][0], 12, , STR_PAD_BOTH)); This code works perfectly well on both windows machines I've tried it on, but causes an error in the image on both non-windows (Unix variants) machines I've tried it on. Does anyone have -any idea why its breaking? -a solution to get it to work on *nix machines? -a different way to display text in an image? Thanks a lot. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] phpmyadmin
On Monday 24 May 2004 04:04 pm, Chris W wrote: It sounds like this is for adding the date and time to file name for the backup but I can't figure out how it works. Maybe an email to the phpMyAdmin list will get you an answer faster than in here? James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Multiple substring replacement
What's the best way of replacing every ocurrence of a substring in a LARGE string by another (longer) substring? Specifically, I have read the contents of a file into a tring with fread, and now I want to replace all \n with br Thanks in advance Nicolas Sanguinetti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] phpmyadmin
From: Chris W [EMAIL PROTECTED] I am using phpmyadmin to backup my mysql database. I have it setup to backup all databases and at the bottom there is this foot note . . . * Use __DB__ for database name, __TABLE__ for table name and any strftime http://www.php.net/manual/function.strftime.php options for time specification, extension will be automagically added. Any other text will be preserved. It sounds like this is for adding the date and time to file name for the backup but I can't figure out how it works. Using a filename such as dbdump.__DB__.__TABLE__.%B.sql would result in a filename of dbdump.mydatabasename.mytablename.may.sql for example. I assume all of this, actually, as I've never used this system/feature. That's how it should work, though. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple substring replacement
Normally, I would say str_replace(), but for converting \n to br, use the nl2br() function. On May 24, 2004, at 4:28 PM, GodFoca wrote: What's the best way of replacing every ocurrence of a substring in a LARGE string by another (longer) substring? Specifically, I have read the contents of a file into a tring with fread, and now I want to replace all \n with br Thanks in advance Nicolas Sanguinetti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple substring replacement
In this special case you would even use 'file' to read the content of the file into an array and use 'implode' to replace every \n with br $content = implode( br , file ( './my_file.txt' ) ); -- red Brent Baisley wrote: Normally, I would say str_replace(), but for converting \n to br, use the nl2br() function. On May 24, 2004, at 4:28 PM, GodFoca wrote: What's the best way of replacing every ocurrence of a substring in a LARGE string by another (longer) substring? Specifically, I have read the contents of a file into a tring with fread, and now I want to replace all \n with br Thanks in advance Nicolas Sanguinetti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: best way to do this with arrays...
the tricky part is I could have fifteen rows in the db all with different start and end dates that I need to check each day against. Then do the data comparison in the DB -- SELECT * FROM your_table WHERE {$check_time} = start_time AND {$check_time} = end_time; (Adjust as appropriate for date formatting, SQL injection, etc.) If you're using MySQL, this page is informative: http://dev.mysql.com/doc/mysql/en/Date_and_time_types.html -mike. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] find out ip address [beginner]
hi, i need some code to find out the ip address of a server. just a simple dns query. how do i do that? i'm a beginner, please help. thanks in advance tobes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Finding Pre-Made Solutions/Templates
Thanks for the tips... Has anyone had any experience with: http://www.oscommerce.com/ - can you recommend anything better for php/mysql shopping cart solutions...? I want to end up with a modifiable Robust / PRO solution that can grow with my needs... -- Thanks - RevDave [EMAIL PROTECTED] [db-lists] Check out some great Domain Names at: http://www.domains4days.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] find out ip address [beginner]
Tobes mailto:[EMAIL PROTECTED] on Monday, May 24, 2004 2:09 PM said: hi, i need some code to find out the ip address of a server. just a simple dns query. how do i do that? i'm a beginner, please help. are you saying you already have the FQDN (Fully Qualified Domain Name)? or are you trying to get the ip address of the client system requesting your page? chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: find out ip address [beginner]
On Mon, 24 May 2004 23:09:04 +0200, Tobes hath writ: hi, i need some code to find out the ip address of a server. just a simple dns query. WFM: |$ ping ibm.com |PING ibm.com (129.42.18.99) 56(84) bytes of data. : Jonesy -- | Marvin L Jones | jonz | W3DHJ | OS/2 | Gunnison, Colorado | @ | Jonesy | linux __ | 7,703' -- 2,345m | config.com | DM68mn SK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] multi array wildcard
Is there a shortcut way to turn an subelement in a multi-dimensioned array into a regular array. For example, here's my array: // print_r($users) Array ( [1] = Array ( [name] = John [email] = [EMAIL PROTECTED] ) [2] = Array ( [name] = Chuck [email] = [EMAIL PROTECTED] ) ) I'd like a quick conversion for the names to Array ( [1] = John [2] = Chuck ) Something like $users[*]['name'] Thanks, John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: find out ip address [beginner]
Jonesy mailto:[EMAIL PROTECTED] on Monday, May 24, 2004 2:21 PM said: WFM: |$ ping ibm.com |PING ibm.com (129.42.18.99) 56(84) bytes of data. : wow. that's the weirdest looking php i've ever seen. is that a beta or something? chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] find out ip address [beginner]
hi, i need some code to find out the ip address of a server. just a simple dns query. how do i do that? i'm a beginner, please help. $ip = gethostbyname( www.php.net ); http://www.php.net/manual/en/function.gethostbyname.php --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions simply do not work?
In my continuing efforts to actually get sessions to work, I upgraded to PHP 4.3.6 and apache 1.3.31. This did not make the slighest difference. So, does ANYone have ideas of how to debug this? Or is PHP simply broken and no longer able to maintain sessions? /\/\ \/\/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: multi array wildcard
I went ahead and just wrote a quick function. If there is an easier way, please let me know. Thanks. function multi_pick($multi_array, $return_key) { $ret_array = array(); foreach ($multi_array as $key=$sub_array) { if (isset($sub_array[$return_key])) { $ret_array[$key] = $sub_array[$return_key]; } } return $ret_array; } On 5/24/2004 4:32 PM, John Kaspar wrote: Something like $users[*]['name'] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: sessions
On Sun, May 23, 2004 at 09:00:41PM +0200, Maarten Weyn wrote: It worked for 5 minutes after a reboot, but now i get the same problem what happens is that on every session_start(); a new sessid is created how comes it doesn't use the old one I am starting to believe that session support is badly broken in PHP. I've been trying to solve a similar situation (sessions never work for me, even after an apache restart) and the list seems baffled. /\/\ \/\/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: find out ip address [beginner]
LOL :-) Jonesy mailto:[EMAIL PROTECTED] on Monday, May 24, 2004 2:21 PM said: WFM: |$ ping ibm.com |PING ibm.com (129.42.18.99) 56(84) bytes of data. : wow. that's the weirdest looking php i've ever seen. is that a beta or something? chris.
Re: [PHP] Re: find out ip address [beginner]
* Thus wrote Chris W. Parker ([EMAIL PROTECTED]): Jonesy mailto:[EMAIL PROTECTED] on Monday, May 24, 2004 2:21 PM said: WFM: |$ ping ibm.com |PING ibm.com (129.42.18.99) 56(84) bytes of data. : wow. that's the weirdest looking php i've ever seen. is that a beta or something? what ya talking about? $ cat ping #!/usr/local/bin/php ?php $hostname = $argv[1]; $ip = gethostbyname($hostname); echo PING $hostname ($ip) 56(84) bytes of data\n; Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml - xslt - xsl:fo - pdf
You need the pear packadge XML_fo2PDF http://pear.php.net/package/XML_fo2pdf Yann On Mon, 2004-05-24 at 15:22, Ray Hunter wrote: On Mon, 2004-05-24 at 10:53, juan vazquez wrote: Hi, I am trying to transform a xsl:fo file to pdf. I generate xml files from mysql and I can convert them to xsl:fo using xslt but I can't find information for the last step (XSL:FO to PDF) I just know that a formatter is needed but all what I found where java, jade or .net based solutions. Not sure if there is a php functionality for the fo transform...you might need to run it through like java and call a fop object on it. -- Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] other eyes
I can't see it. Maybe other eyes will help. :-) Why does search_username.1 show the data that was posted with the form but search_username.2 is empty? $search_usename = $_REQUEST[search_username]; echo search_username.1='$_REQUEST[search_username]'; echo search_username.2='$search_username'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: other eyes
$search_usename $search_username you're missing an r On 5/24/2004 5:55 PM, Bob Lockie wrote: I can't see it. Maybe other eyes will help. :-) Why does search_username.1 show the data that was posted with the form but search_username.2 is empty? $search_usename = $_REQUEST[search_username]; echo search_username.1='$_REQUEST[search_username]'; echo search_username.2='$search_username'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] other eyes
On Mon, 2004-05-24 at 16:55, Bob Lockie wrote: I can't see it. Maybe other eyes will help. :-) Why does search_username.1 show the data that was posted with the form but search_username.2 is empty? $search_usename = $_REQUEST[search_username]; --^ need an r echo search_username.1='$_REQUEST[search_username]'; echo search_username.2='$search_username'; - Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: find out ip address [beginner]
Curt Zirzow mailto:[EMAIL PROTECTED] on Monday, May 24, 2004 3:55 PM said: wow. that's the weirdest looking php i've ever seen. is that a beta or something? what ya talking about? i was pointing out that the user explained he was a beginner and that he was looking for code. so for the person to post some output from ping on the command line didn't seem to be too useful. although we haven't heard back from the op yet so what do i know? chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Error building PHP with PostgreSQL support
I am getting the following problem with trying to install from source PHP 4.3.6 with PG support on FreeBSD 5.2.1. I have PostgreSQL 7.4.2 recently upgraded from 7.3.x and it is up and running fine. I also have Heimdal 0.6 installed and PostgreSQL was built with that support. Is the error below from something missing on the Heimdal side of things or PostgreSQL? And what does anyone suggest to resolve the issue? Maybe I need to rebuild Heimdal since upgrading PostgreSQL with krb5 support? /usr/local/lib/libc-client4.so: warning: tmpnam() possibly used unsafely; consider using mkstemp() /usr/local/lib/libpq.so: undefined reference to `krb5_cc_get_principal' /usr/local/lib/libpq.so: undefined reference to `krb5_sname_to_principal' /usr/local/lib/libpq.so: undefined reference to `krb5_cc_default' /usr/local/lib/libpq.so: undefined reference to `krb5_cc_close' /usr/local/lib/libpq.so: undefined reference to `error_message' /usr/local/lib/libpq.so: undefined reference to `krb5_free_error' /usr/local/lib/libpq.so: undefined reference to `krb5_sendauth' /usr/local/lib/libpq.so: undefined reference to `krb5_free_principal' /usr/local/lib/libpq.so: undefined reference to `krb5_unparse_name' /usr/local/lib/libpq.so: undefined reference to `krb5_free_context' /usr/local/lib/libpq.so: undefined reference to `krb5_init_context' *** Error code 1 -- Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] other eyes
Thanks to all who responded. Doh to me. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple substring replacement
why not use nl2br() ? At 01:28 PM 5/24/2004, GodFoca wrote: What's the best way of replacing every ocurrence of a substring in a LARGE string by another (longer) substring? Specifically, I have read the contents of a file into a tring with fread, and now I want to replace all \n with br Thanks in advance Nicolas Sanguinetti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] meet problem while use imap_close
hello everybody, I need help for using imap functions in php I refer the imap functions from the book Professional PHP4 it introduces the imap server from telnet it to writing a brief scripts it teach me that type telnet localhost 143 behind prompts and I got the right response from my imap server I can fetch my email by command line and watch the correct content but when I processed to the next step, writing a test PHP script for connecting to my imap serverI got error Warning: Couldn't open stream {127.0.0.1:143)INBOX in /var/www/html/imap_test.php on line 2 I installed the imap module for php by rpm, this error seens but for module include error, but it just can't connect to my imap server I searched imap in php maillist, someone discuss that the first parameter should expressed as {127.0.0.1:143/imap/notls} etc... but i tried a lot of different ways..It still couldn't work I didn't know to much about my imap server ..I just confirm that I can use any mailing software to connect to my imap server for recesiving mail correctly query my rpms I got this: [EMAIL PROTECTED] yhvh]$ rpm -qa|grep imap php-imap-4.2.2-17 imap-2001a-18 is there anyone could give me a hand?..I really confused... thanx a lot~! PS: I looking for imap functions in squirrelmail..I found that he connect to imap server by fsockopen?! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Newbie Guide] For the benefit of new members
=== This message is for the benefit of new subscribers and those new to PHP. Please feel free to add more points and send to the list. === 1. If you have any queries/problems about PHP try http://www.php.net/manual/en first. You can download a copy and use it offline also. Please also try http://www.php.net/manual/faq.php for answers to frequently answered questions about PHP (added by Christophe Chisogne). 2. Try http://www.google.com next. Searching for php YOUR QUERY may fetch you relevant information within the first 10 results. 3. There is a searchable archive of the mailing list discussion at http://phparch.com/mailinglists. Many of the common topics are discussed repeatedly, and you may get answer to your query from the earlier discussions. For example: One of the repeatedly discussed question in the list is Best PHP editor. Everyone has his/her favourite editor. You can get all the opinions by going through the list archives. If you want a chosen list try this link : http://phpeditors.linuxbackup.co.uk/ (contributed by Christophe Chisogne). 4. Not sure if PHP is working or you want find out what extensions are available to you? Just put the following code into a file with a .php extension and access it through your webserver: ?php phpinfo(); ? If PHP is installed you will see a page with a lot of information on it. If PHP is not installed (or not working correctly) your browser will try to download the file. (contributed by Teren and reworded by Chris W Parker) 5. If you are stuck with a script and do not understand what is wrong, instead of posting the whole script, try doing some research yourself. One useful trick is to print the variable/sql query using print or echo command and check whether you get what you expected. After diagnosing the problem, send the details of your efforts (following steps 1, 2 3) and ask for help. 6. PHP is a server side scripting language. Whatever processing PHP does takes place BEFORE the output reaches the client. Therefore, it is not possible to access users' computer related information (OS, screen size etc) using PHP. Nor can you modify any the user side settings. You need to go for JavaScript and ask the question in a JavaScript list. On the other hand, you can access the information that is SENT by the user's browser when a client requests a page from your server. You can find details about browser, OS etc as reported by this request. - contributed by Wouter van Vliet and reworded by Chris W Parker. 7. Provide a clear descriptive subject line. Avoid general subjects like Help!!, A Question etc. Especially avoid blank subjects. 8. When you want to start a new topic, open a new mail composer and enter the mailing list address [EMAIL PROTECTED] instead of replying to an existing thread and replacing the subject and body with your message. 9. It's always a good idea to post back to the list once you've solved your problem. People usually add [SOLVED] to the subject line of their email when posting solutions. By posting your solution you're helping the next person with the same question. [contribued by Chris W Parker] 10. Ask smart questions http://catb.org/~esr/faqs/smart-questions.html [contributed by Jay Blanchard) 11. Do not send your email to the list with attachments. If you don't have a place to upload your code, try the many pastebin websites (such as www.pastebin.com). [contributed by Burhan Khalid] -- Integrated Management Tools for leather industry -- http://www.leatherlink.net Ma Siva Kumar, BSG LeatherLink (P) Ltd, Chennai - 600106 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php Alias instead of redirect
Hello, Is it possible to have an alias so that bots will index the page instead of a redirect. -- Thanks, Jake Johnson [EMAIL PROTECTED] __ Plutoid - http://www.plutoid.com - Shop Plutoid for the best prices on rings, earrings, necklaces, diamonds and other fine jewelry. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Newbie Guide] For the benefit of new members
LINK TO THE LIST OF EDITORS CORRECTED === Please feel free to add more points and send to the list. === 1. If you have any queries/problems about PHP try http://www.php.net/manual/en first. You can download a copy and use it offline also. Please also try http://www.php.net/manual/faq.php for answers to frequently answered questions about PHP (added by Christophe Chisogne). 2. Try http://www.google.com next. Searching for php YOUR QUERY may fetch you relevant information within the first 10 results. 3. There is a searchable archive of the mailing list discussion at http://phparch.com/mailinglists. Many of the common topics are discussed repeatedly, and you may get answer to your query from the earlier discussions. For example: One of the repeatedly discussed question in the list is Best PHP editor. Everyone has his/her favourite editor. You can get all the opinions by going through the list archives. If you want a chosen list try this link : http://www.thelinuxconsultancy.co.uk/phpeditors/ (contributed by Christophe Chisogne). 4. Not sure if PHP is working or you want find out what extensions are available to you? Just put the following code into a file with a .php extension and access it through your webserver: ?php phpinfo(); ? If PHP is installed you will see a page with a lot of information on it. If PHP is not installed (or not working correctly) your browser will try to download the file. (contributed by Teren and reworded by Chris W Parker) 5. If you are stuck with a script and do not understand what is wrong, instead of posting the whole script, try doing some research yourself. One useful trick is to print the variable/sql query using print or echo command and check whether you get what you expected. After diagnosing the problem, send the details of your efforts (following steps 1, 2 3) and ask for help. 6. PHP is a server side scripting language. Whatever processing PHP does takes place BEFORE the output reaches the client. Therefore, it is not possible to access users' computer related information (OS, screen size etc) using PHP. Nor can you modify any the user side settings. You need to go for JavaScript and ask the question in a JavaScript list. On the other hand, you can access the information that is SENT by the user's browser when a client requests a page from your server. You can find details about browser, OS etc as reported by this request. - contributed by Wouter van Vliet and reworded by Chris W Parker. 7. Provide a clear descriptive subject line. Avoid general subjects like Help!!, A Question etc. Especially avoid blank subjects. 8. When you want to start a new topic, open a new mail composer and enter the mailing list address [EMAIL PROTECTED] instead of replying to an existing thread and replacing the subject and body with your message. 9. It's always a good idea to post back to the list once you've solved your problem. People usually add [SOLVED] to the subject line of their email when posting solutions. By posting your solution you're helping the next person with the same question. [contribued by Chris W Parker] 10. Ask smart questions http://catb.org/~esr/faqs/smart-questions.html [contributed by Jay Blanchard) 11. Do not send your email to the list with attachments. If you don't have a place to upload your code, try the many pastebin websites (such as www.pastebin.com). [contributed by Burhan Khalid] -- Integrated Management Tools for leather industry -- http://www.leatherlink.net Ma Siva Kumar, BSG LeatherLink (P) Ltd, Chennai - 600106 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php