[PHP] Socket server in PHP

2005-06-23 Thread kioto
Hi all sorry for the ignorance :D.This is my first time with Socket and i have a question for you.I want create a script that run like daemon in background and listen incoming request.It's possible with socket open a stream to a directory and check any change on this directory ? I want send

Re: [PHP] passing login paramters from php web application to asp web application. help.

2005-06-23 Thread symbulos
Richard Lynch wrote: Can you get the usename/password from the other application? Yes, we have them. With it, you can then use http://php.net/curl to simulate the user logging in to the other site. Thanks. You simply have to convince the other site that your PHP script actually *IS* the

[PHP] Re: Help recognizing bots?

2005-06-23 Thread JamesBenson
http://www.funender.com/phpBB2/about18577.html Brian Dunning wrote: I'm using the following code in an effort to identify bots: $client = $_SERVER['HTTP_USER_AGENT']; if(!strpos($client, 'ooglebot') !strpos($client, 'ahoo') !strpos ($client, 'lurp') !strpos($client, 'msnbot')) {

Re: [PHP] comparing two texts

2005-06-23 Thread Jochem Maas
Robert Cummings wrote: On Wed, 2005-06-22 at 22:55, Richard Lynch wrote: ... Well some noobs might think crude works quite well for them :) Ya want me to do Jenny's work for her for free or what?! :-) No but it seemed like Jenny did *grin*. _seemed_ ??? r u kidding :-) whereas

Re: [PHP] passing login paramters from php web application to asp web application. help.

2005-06-23 Thread Jochem Maas
symbulos wrote: Richard Lynch wrote: Can you get the usename/password from the other application? Yes, we have them. With it, you can then use http://php.net/curl to simulate the user logging in to the other site. Thanks. You simply have to convince the other site that your PHP

Re: [PHP] passing login paramters from php web application to asp web application. help.

2005-06-23 Thread Rory Browne
Just out of curiousity, does your PHP/MySQL site share a domain name? By that I mean can your site be accessed by php.commondomain.com, and theirs asp.commondomain.com, where the commondomain.com part is the same on your side and theirs? If not, then your site will not be able to set cookies for

Re: [PHP] passing login paramters from php web application to asp web application. help.

2005-06-23 Thread symbulos
Rory Browne wrote: Just out of curiousity, does your PHP/MySQL site share a domain name? By that I mean can your site be accessed by php.commondomain.com, and theirs asp.commondomain.com, where the commondomain.com part is the same on your side and theirs? Unfortunately not. At the same

Re[2]: [PHP] comparing two texts

2005-06-23 Thread Tom Rogers
Hi, Thursday, June 23, 2005, 9:42:34 PM, you wrote: . . . JM whereas I'll happily spend an hour writing up and contemplating someone JM else's problem - I don't have five minutes for people who are expecting to be JM spoonfed (go learn ASP and get a support contract, thanks ;-). Perhaps I

[PHP] Accessing forms through php

2005-06-23 Thread José Miguel López-Coronado
I have seen how to use cURL to retreive results from a web site after processing a form. The problem is that I want to simulate completely the submiting of a form, I mean, I wan to enter the page in the server instead of retreive the results into my own page. I'm trying to use a php script to

Re: [PHP] passing login paramters from php web application to asp web application. help.

2005-06-23 Thread symbulos
Jochem Maas wrote: come on, you too know how to type stuff into the google search box: gorgle? what is that? http://www.google.nl/search?q=php+cURLstart=0 fourth hit: http://www.phpfreaks.com/quickcode/Curl_Abstraction_Class_v1.0/120.php I am not sure about it. I did not understand it at

[PHP] Showing tables (converting from MySQL to Oracle)

2005-06-23 Thread Shane Presley
Hello, I've recompiled PHP to use Oracle, and been able to run a quick test script that looks like... ?php if ($c=OCILogon(user, pw, server)) { echo Successfully connected to Oracle.\n; OCILogoff($c); } else { $err = OCIError(); echo Oracle Connect Error . $err[text]; } ? So now I'm

Re: [PHP] How to convert documents to PDF using PHP

2005-06-23 Thread Rory Browne
What OS are you using? If you're on Win, then you may be able to do something with COM and a PDF printer driver(pdfcreator comes to mind - check out theopencd) If you're not, then you may be able to do something similar with OOo and UNO, although Python may be a better choice than PHP, since

[PHP] setting include_path ini directive at runtime

2005-06-23 Thread blackwater dev
I am calling php from the command line and was wondering how I can set the include_path of the ini file at run time? Can I pass in an extra param to php to set this? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] passing login paramters from php web application to asp web application. help.

2005-06-23 Thread Jochem Maas
symbulos wrote: Jochem Maas wrote: come on, you too know how to type stuff into the google search box: gorgle? what is that? oh just a little search engine some of us use now and again :-) http://www.google.nl/search?q=php+cURLstart=0 fourth hit:

Re: [PHP] setting include_path ini directive at runtime

2005-06-23 Thread John Nichel
blackwater dev wrote: I am calling php from the command line and was wondering how I can set the include_path of the ini file at run time? Can I pass in an extra param to php to set this? http://us4.php.net/ini_set http://us4.php.net/manual/en/ini.php#ini.list -- John C. Nichel ÜberGeek

RE: [PHP] How to convert documents to PDF using PHP

2005-06-23 Thread Bosky, Dave
I'll be working on a Win 2003 server box. I was reading about a COM object from verypdf.com. Can you recommend any specific COM objects? Thanks.. -Original Message- From: Rory Browne [mailto:[EMAIL PROTECTED] Sent: Thursday, June 23, 2005 9:13 AM To: Bosky, Dave Cc:

[PHP] Re: text areas and line brakes

2005-06-23 Thread Al
Sunny Boy wrote: if someone writes something in a text box, how would I convert a line break in the text area to echo a br /? I think i'll have to get the \n and convert it. can anyone tell me? Thanks. sunny I use a technique similar to Lynch's $value= preg_replace(/(\r\n|\r|\n)/, \n,

Re: [PHP] Showing tables (converting from MySQL to Oracle)

2005-06-23 Thread Kristen G. Thorson
This is really a question for an Oracle list, but I happen to know of the following page which has been helpful to me in the past: https://gdsg.ngdc.noaa.gov/tiki/tiki-index.php?page=SqlNotes kgt Shane Presley wrote: Hello, I've recompiled PHP to use Oracle, and been able to run a

[PHP] Strange notation to create object

2005-06-23 Thread Michael Stepanov
Dear all, Usually, I develop on Perl. But my current task pushes me to start use PHP. Generally, it's great but sometimes I'm a little bit confused. For example, recently I've found a strange notation of creation of PHP objects: $obj = new SomeObject(); Can anyone explain me meaning of **?

Re: [PHP] Strange notation to create object

2005-06-23 Thread Rory Browne
It's in the manual. PHP4 $obj = new SomeObject() would create a SomeObject, and assign it by value to $obj. $obj would be a copy of the one created. by the new SomeObject. makes it assign by reference. PHP5 In PHP5 Objects are assigned by reference anyway so the doesn't matter. On 6/23/05,

[PHP] Sorting with french characters

2005-06-23 Thread Mathieu Dumoulin
I've got a little problem with the ksort and sort functions. When i fill this array's keys or the array's data and i sort it, i can't seem to get a correct sort order concerning accented french characters. For example: Emiss, Erick Morrison, Phillip Tatey, Peter Zachary, Martin Élement,

Re: [PHP] Strange notation to create object

2005-06-23 Thread Rory Browne
Try this ?php $a = 1; $b = $a; $c = $a; $a = 2; printf(a=%d, b=%d, c=%d\n, $a, $b, $c); $c = 3; printf(a=%d, b=%d, c=%d\n, $a, $b, $c); ? On 6/23/05, Michael Stepanov [EMAIL PROTECTED] wrote: Dear all, Usually, I develop on Perl. But my current task pushes me to start use PHP.

[PHP] Uploading and verifying word and excel files

2005-06-23 Thread Jack Jackson
Hi, I checked at http://www.php.net/manual/en/features.file-upload.php and all the user notes, and also the PEAR solution for uploading files and I still have a couple of questions. I need to create a form to allow users to upload (and later to delete) MS word, excel and jpg files. Through

Re: [PHP] Uploading and verifying word and excel files

2005-06-23 Thread John Nichel
Jack Jackson wrote: snip Also, it seems that directories must be blown wide open (777) to allow the script to copy the file over from /tmp. My ISP won't allow directories to be set to 777 under public_html/ -- but we need to access the files via web browser which is the whole point. It

Re: [PHP] Uploading and verifying word and excel files

2005-06-23 Thread Jack Jackson
John Nichel wrote: Jack Jackson wrote: snip Also, it seems that directories must be blown wide open (777) to allow the script to copy the file over from /tmp. My ISP won't allow directories to be set to 777 under public_html/ -- but we need to access the files via web browser which is the

Re: [PHP] Uploading and verifying word and excel files

2005-06-23 Thread Mathieu Dumoulin
John Nichel wrote: Jack Jackson wrote: snip Also, it seems that directories must be blown wide open (777) to allow the script to copy the file over from /tmp. My ISP won't allow directories to be set to 777 under public_html/ -- but we need to access the files via web browser which is the

Re: [PHP] Uploading and verifying word and excel files

2005-06-23 Thread John Nichel
Jack Jackson wrote: snip So my questions: 1. How do you validate Word and Excel files before upload? Before? JavaScript...if JavaScript can even do it (I haven't touched the stuff in ages). After upload, you can check the mime type, but that's not foolproof. Okay, sorry I miswrote:

[PHP] Re: Strange notation to create object

2005-06-23 Thread Matthew Weier O'Phinney
* Michael Stepanov [EMAIL PROTECTED]: Usually, I develop on Perl. But my current task pushes me to start use PHP. Generally, it's great but sometimes I'm a little bit confused. For example, recently I've found a strange notation of creation of PHP objects: $obj = new SomeObject(); Can

Re: [PHP] passing login paramters from php web application to asp web application. help.

2005-06-23 Thread symbulos
It looks like with curl you have to pass the parameters as external variables appended to the link. Is that the only way? Is it possible to simulate a POST behavior? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] passing login paramters from php web application to asp web application. help.

2005-06-23 Thread Jochem Maas
symbulos wrote: It looks like with curl you have to pass the parameters as external variables appended to the link. Is that the only way? Is it possible to simulate a POST behavior? yes. look here for an idea on how: http://curl.haxx.se/mail/curlphp-2004-09/0063.html bare in mind that POST

Re: [PHP] Uploading and verifying word and excel files

2005-06-23 Thread Jack Jackson
Tom Rogers wrote: Hi, Friday, June 24, 2005, 12:42:33 AM, you wrote: JJ Hi, JJ I checked at JJ http://www.php.net/manual/en/features.file-upload.php and JJ all the user notes, and also the PEAR solution for uploading files and I JJ still have a couple of questions. JJ I need to create a

Re: [PHP] Strange notation to create object

2005-06-23 Thread Michael Stepanov
Rory Browne wrote: It's in the manual. PHP4 $obj = new SomeObject() would create a SomeObject, and assign it by value to $obj. $obj would be a copy of the one created. by the new SomeObject. makes it assign by reference. PHP5 In PHP5 Objects are assigned by reference anyway so the doesn't

Re: [PHP] Re: Strange notation to create object

2005-06-23 Thread Robert Cummings
On Thu, 2005-06-23 at 11:32, Matthew Weier O'Phinney wrote: * Michael Stepanov [EMAIL PROTECTED]: Usually, I develop on Perl. But my current task pushes me to start use PHP. Generally, it's great but sometimes I'm a little bit confused. For example, recently I've found a strange notation of

[PHP] array_search() with preg_match?

2005-06-23 Thread René Fournier
I need to search an array for a string, with a twist. E.g.: $array = array(0 = 'this sky is blue', 1 = 'pencils are orange', 2 = 'I like green apples', 3 = 'strawberries are red'); $key = array_search('green', $array); With the above code, nothing will be returned, but I would like it to

[PHP] Re-inserting newlines

2005-06-23 Thread Philip Thompson
Hi all. I have searched for a way to figure out this problem, but nothing is popping up. Here's the scenario: I have a form which I will write to a database - so I escape the form content. I have a textarea/textarea in the form. Obviously, people can type whatever they want to in this

Re: [PHP] Re-inserting newlines

2005-06-23 Thread John Nichel
Philip Thompson wrote: Anyone know how/what to replace the \r\n in the textarea to that it shows up correctly with the actual newlines, not the \r\n??? You shouldn't need \r\n. \n should work just fine. How are you 'inserting' the newlines? Single quoted string? -- John C. Nichel ÜberGeek

Re: [PHP] Re: Strange notation to create object

2005-06-23 Thread Matthew Weier O'Phinney
* Robert Cummings [EMAIL PROTECTED] : On Thu, 2005-06-23 at 11:32, Matthew Weier O'Phinney wrote: * Michael Stepanov [EMAIL PROTECTED] : Usually, I develop on Perl. But my current task pushes me to start use PHP. Generally, it's great but sometimes I'm a little bit confused. For

[PHP] Re: array_search() with preg_match?

2005-06-23 Thread Bob Winter
René, This may not the most efficient method, but works: $array = array('this sky is blue', 'pencils are orange', 'I like green apples','strawberries are red'); $search = 'green'; $result = array(); foreach($array as $key1=$value1) { if(substr_count($value1, $search)) { $result[] =

Re: [PHP] Re: Strange notation to create object

2005-06-23 Thread Robert Cummings
On Thu, 2005-06-23 at 13:36, Matthew Weier O'Phinney wrote: * Robert Cummings [EMAIL PROTECTED] : On Thu, 2005-06-23 at 11:32, Matthew Weier O'Phinney wrote: The above notation is unnecessary when developing in PHP5, as objects in PHP5 are passed by reference by default. However, in PHP4,

Re: [PHP] Re-inserting newlines

2005-06-23 Thread Philip Thompson
On Jun 23, 2005, at 12:20 PM, John Nichel wrote: Philip Thompson wrote: Anyone know how/what to replace the \r\n in the textarea to that it shows up correctly with the actual newlines, not the \r\n??? You shouldn't need \r\n. \n should work just fine. How are you 'inserting' the

Re: [PHP] Re-inserting newlines

2005-06-23 Thread John Nichel
Philip Thompson wrote: snip That's the thing, I'm not inserting \r\n at all. When filling in the form, I hit Enter to go to the next line in the textarea. When I pull the original data I do: $textarea = mysql_real_escape_string($_POST[textarea], $connection); if ($error) { // somehow

Re: [PHP] Re: Strange notation to create object

2005-06-23 Thread Matthew Weier O'Phinney
* Robert Cummings [EMAIL PROTECTED] : On Thu, 2005-06-23 at 13:36, Matthew Weier O'Phinney wrote: * Robert Cummings [EMAIL PROTECTED] : On Thu, 2005-06-23 at 11:32, Matthew Weier O'Phinney wrote: The above notation is unnecessary when developing in PHP5, as objects in PHP5 are passed

Re: [PHP] Strange notation to create object

2005-06-23 Thread John Hinton
Michael Stepanov wrote: With a return receipt attached and I'm wondering if we all return the receipt each time someone forgets about this on various mailing lists, would the 6583 subscribers actually returned the receipt, would it break the habit? All in fun... sorry Michael.. it just

Re: [PHP] Strange notation to create object

2005-06-23 Thread John Nichel
John Hinton wrote: Michael Stepanov wrote: With a return receipt attached and I'm wondering if we all return the receipt each time someone forgets about this on various mailing lists, would the 6583 subscribers actually returned the receipt, would it break the habit? All in fun...

Re: [PHP] Re: Strange notation to create object

2005-06-23 Thread Jason Barnett
Matthew Weier O'Phinney wrote: ... This doesn't demonstrate what the OP was talking about, which is initial assignment of an object using a reference operator. The results of this make perfect sense to me -- the references are passed exactly as I would expect. But not exactly as I would

[PHP] Re: Showing tables (converting from MySQL to Oracle)

2005-06-23 Thread Catalin Trifu
Hi, the USER_TABLES view shows all tables in oracle. Take a look at adodb.sf.net for a very nice php library for database access. It takes much of the porting burden off your shoulders and is pretty fast. Catalin Shane Presley wrote: Hello, I've recompiled PHP to use Oracle,

[PHP] Re: Sorting with french characters

2005-06-23 Thread Catalin Trifu
Check the manual for sort www.php.net/sort - SORT_LOCALE_STRING You would have to pay attention to the current locale - www.php.net/setlocale before the actual sort. hope this solves it, Catalin Mathieu Dumoulin wrote: I've got a little problem with the ksort and sort functions.

[PHP] Re: Re-inserting newlines

2005-06-23 Thread JB05UK
This is the correct way to make a safe mysql query, see if it makes a difference, taken from:- http://php.net/manual/en/function.mysql-real-escape-string.php ?php // Quote variable to make safe function quote_smart($value) { // Stripslashes if (get_magic_quotes_gpc()) { $value =

Re: [PHP] Re-inserting newlines

2005-06-23 Thread Richard Lynch
On Thu, June 23, 2005 11:09 am, Philip Thompson said: On Jun 23, 2005, at 12:20 PM, John Nichel wrote: Philip Thompson wrote: Anyone know how/what to replace the \r\n in the textarea to that it shows up correctly with the actual newlines, not the \r\n??? http://php.net/stripslashes Your

Re: [PHP] Re-inserting newlines

2005-06-23 Thread Philip Thompson
On Jun 23, 2005, at 4:13 PM, Richard Lynch wrote: On Thu, June 23, 2005 11:09 am, Philip Thompson said: On Jun 23, 2005, at 12:20 PM, John Nichel wrote: Philip Thompson wrote: Anyone know how/what to replace the \r\n in the textarea to that it shows up correctly with the actual

Re: [PHP] Uploading and verifying word and excel files

2005-06-23 Thread Richard Lynch
On Thu, June 23, 2005 7:42 am, Jack Jackson said: I cannot see a way to validate or examine Word or Excel files for validity (and assume that older word files would validate differently from newer ones). If your PHP does not have the mime_type functions, you could probably use

Re: [PHP] Re: Strange notation to create object

2005-06-23 Thread Robert Cummings
On Thu, 2005-06-23 at 15:28, Matthew Weier O'Phinney wrote: * Robert Cummings [EMAIL PROTECTED] : On Thu, 2005-06-23 at 13:36, Matthew Weier O'Phinney wrote: * Robert Cummings [EMAIL PROTECTED] : On Thu, 2005-06-23 at 11:32, Matthew Weier O'Phinney wrote: The above notation is

Re: [PHP] Sorting with french characters

2005-06-23 Thread Richard Lynch
On Thu, June 23, 2005 7:37 am, Mathieu Dumoulin said: STR_REPLACE on all possible accents, i got over a thousand records from the database to parse in a fast way and there are at the very least 60 Odds are REALLY GOOD you can get the database to ORDER BY using your locale/language/charset of

Re: [PHP] Accessing forms through php

2005-06-23 Thread Richard Lynch
On Thu, June 23, 2005 3:24 am, José Miguel López-Coronado said: I have seen how to use cURL to retreive results from a web site after processing a form. The problem is that I want to simulate completely the submiting of a form, I mean, I wan to enter the page in the server instead of retreive

Re: Re[2]: [PHP] comparing two texts

2005-06-23 Thread Richard Lynch
On Thu, June 23, 2005 5:25 am, Tom Rogers said: Hi, Thursday, June 23, 2005, 9:42:34 PM, you wrote: . . . JM whereas I'll happily spend an hour writing up and contemplating someone JM else's problem - I don't have five minutes for people who are expecting to be JM spoonfed (go learn

Re: [PHP] Re: Help recognizing bots?

2005-06-23 Thread Richard Lynch
On Thu, June 23, 2005 3:37 am, JamesBenson said: http://www.funender.com/phpBB2/about18577.html Call me crazy, but... A) Doesn't robots.txt have to be in public_html? How the hell can the robots read it if it's in the root folder, as they suggest in that forum? B) Are the Bad Bots really

Re: [PHP] passing login paramters from php web application to asp web application. help.

2005-06-23 Thread Richard Lynch
On Thu, June 23, 2005 12:33 am, symbulos said: Richard Lynch wrote: You simply have to convince the other site that your PHP script actually *IS* the user logging in, which is seldom very tricky, and is always *POSSIBLE* with enough effort. How can be that done? Do you know of any tutorial,

[PHP] fopen problem

2005-06-23 Thread Ross
I have a bit of a problem when using fopen, fwrite and fclose locally I get the flowing warnings Warning: fopen(counterlog.txt) [function.fopen]: failed to open stream: Permission denied in c:\Inetpub\wwwroot\pillars\index.php on line 30 Warning: fwrite(): supplied argument is not a valid

Re: [PHP] fopen problem

2005-06-23 Thread Esteamedpw
can you show the code? did you chmod the files?

Re: [PHP] Re: Strange notation to create object

2005-06-23 Thread Matthew Weier O'Phinney
* Robert Cummings [EMAIL PROTECTED] : On Thu, 2005-06-23 at 15:28, Matthew Weier O'Phinney wrote: * Robert Cummings [EMAIL PROTECTED] : On Thu, 2005-06-23 at 13:36, Matthew Weier O'Phinney wrote: * Robert Cummings [EMAIL PROTECTED] : On Thu, 2005-06-23 at 11:32, Matthew Weier

Re: [PHP] Re: Strange notation to create object

2005-06-23 Thread Matthew Weier O'Phinney
* Jason Barnett [EMAIL PROTECTED] : Matthew Weier O'Phinney wrote: ... This doesn't demonstrate what the OP was talking about, which is initial assignment of an object using a reference operator. The results of this make perfect sense to me -- the references are passed exactly as I would

Re: [PHP] Re: Strange notation to create object

2005-06-23 Thread Robert Cummings
On Thu, 2005-06-23 at 21:44, Matthew Weier O'Phinney wrote: * Jason Barnett [EMAIL PROTECTED] : Matthew Weier O'Phinney wrote: ... This doesn't demonstrate what the OP was talking about, which is initial assignment of an object using a reference operator. The results of this make

Re: [PHP] Re: Strange notation to create object

2005-06-23 Thread Evert | Rooftop Solutions
Robert Cummings wrote: On Thu, 2005-06-23 at 13:36, Matthew Weier O'Phinney wrote: * Robert Cummings [EMAIL PROTECTED] : On Thu, 2005-06-23 at 11:32, Matthew Weier O'Phinney wrote: The above notation is unnecessary when developing in PHP5, as objects in PHP5 are passed by

Re: [PHP] Socket server in PHP

2005-06-23 Thread Richard Lynch
On Wed, June 22, 2005 11:52 pm, kioto said: Hi all sorry for the ignorance :D.This is my first time with Socket and i have a question for you.I want create a script that run like daemon in background and listen incoming request.It's possible with socket open a stream to a directory and

Re: [PHP] Help with image map problem...

2005-06-23 Thread Richard Lynch
On Wed, June 22, 2005 10:16 pm, Joey said: If I put this in the .php file, the results are as expected: Value: % echo $value; % If in the SAME file I put: map name=FPMap0 area href=display_status.php?searchby=cust_nosearch=1value=% echo $value % shape=rect coords=51, 1, 215, 34 /map I'm

RE: [PHP] Extra (persistant) tier

2005-06-23 Thread Richard Lynch
On Wed, June 22, 2005 8:35 pm, Leila Lappin said: When I worked with other OO languages, I usually designed my persistent business objects in two levels. A level (lower level) designed and implemented direct database calls. Each database table had a class abstraction at this level which

Re: [PHP] fopen problem

2005-06-23 Thread Richard Lynch
On Thu, June 23, 2005 4:33 pm, Ross said: Warning: fopen(counterlog.txt) [function.fopen]: failed to open stream: Permission denied in c:\Inetpub\wwwroot\pillars\index.php on line 30 The PHP user does *NOT* have permission to open the counterlog.txt file. Exactly *HOW* you change permissions