php-windows Digest 25 Oct 2002 02:14:22 -0000 Issue 1405

Topics (messages 16526 through 16541):

Date validation
        16526 by: John Meyer
        16527 by: Asendorf, John
        16528 by: Asendorf, John

Re: Print data
        16529 by: José Moreira

Re: Mixing include path styles. How do I do this???
        16530 by: Rod Martin

SIGN OFF
        16531 by: John  Dunn

COM advice ...
        16532 by: Michael Hazelden

enable_dl don't work with apache?
        16533 by: Hornig at NOSPAM artshock2d dot de
        16535 by: Hornig at NOSPAM artshock2d dot de

Re: picking files (server side) - need help please
        16534 by: David Elliott

google API via nuSoap
        16536 by: brendan

spam protection boxes
        16537 by: Blue Presley
        16540 by: Hornig at NOSPAM artshock2d dot de

text file parsing
        16538 by: Bryan Luisana
        16539 by: Luis Ferro

Notice: Undefined variable:
        16541 by: Richard West

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
I have a date coming in in the format (mm/dd/yyyy) that I need to insert
into a date column.  How do I modify this using regexps so that it will fit
in.

--- End Message ---
--- Begin Message ---
Actually, you could use explodo or split and reorder the pieces:

from the docs:

$date = "04/30/1973";  // Delimiters may be slash, dot, or hyphen
list ($month, $day, $year) = split ('[/.-]', $date);
echo "Month: $month; Day: $day; Year: $year<br>\n";



---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit


> -----Original Message-----
> From: John Meyer [mailto:johnmeyer_1978@;yahoo.com]
> Sent: Thursday, October 24, 2002 10:24 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Date validation
> 
> 
> I have a date coming in in the format (mm/dd/yyyy) that I 
> need to insert
> into a date column.  How do I modify this using regexps so 
> that it will fit
> in.
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
Actually... you can't use explodo... but you could use explode...

---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit


> -----Original Message-----
> From: Asendorf, John [mailto:JAsendorf@;lcounty.com]
> Sent: Thursday, October 24, 2002 10:27 AM
> To: John Meyer; Php-Windows (E-mail)
> Subject: RE: [PHP-WIN] Date validation
> 
> 
> Actually, you could use explodo or split and reorder the pieces:
> 
> from the docs:
> 
> $date = "04/30/1973";  // Delimiters may be slash, dot, or hyphen
> list ($month, $day, $year) = split ('[/.-]', $date);
> echo "Month: $month; Day: $day; Year: $year<br>\n";
> 
> 
> 
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Nullum magnum ingenium sine mixtura dementiae fuit
> 
> 
> > -----Original Message-----
> > From: John Meyer [mailto:johnmeyer_1978@;yahoo.com]
> > Sent: Thursday, October 24, 2002 10:24 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] Date validation
> > 
> > 
> > I have a date coming in in the format (mm/dd/yyyy) that I 
> > need to insert
> > into a date column.  How do I modify this using regexps so 
> > that it will fit
> > in.
> > 
> > 
> > -- 
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---

        How is it possible to create web services in Windows NT4 using open source
;) ?

        perhaps i could create a web service to print PDF files and output my
what-to-print to it in that format ...

        perhaps :

                        network/atatched        printers <- PDF <- server web service 
<- XML <- PHP /
client





-----Mensagem original-----
De: J Wynia [mailto:letterj@;Phpgeek.com]
Enviada: quinta-feira, 24 de Outubro de 2002 13:58
Para: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto: [PHP-WIN] Re: Print data


José Moreira wrote:
> hello, at my company we have several network printers and i was was
> wondering if it's possible to print directly to them using PHP, instead
> of showing on the screen or both ...
> to gain more control on what is printed, because of the nasty browsers
> header and footer ... whom i now how to remove ...
>
> i know that the printer IP is  192.192.1.100 and the port is 9005 ...
>

If you're willing to do a bit of work, you can do a workable solution.
I'm assuming that PHP is running on a Windows server.

You can use the Windows printer functions if the printer was connected
directly. If not, you can still get it to work. The Windows Scripting
Host resources give you a few ways. A kludgy way would be to configure
IE on the printer machine (since it's almost surely installed) to not
show the header and footers. You can use the WSH functions to open a
non-visible IE instance and issue the print command from there. WSH also
has functions in it's COM objects for mapping network printers, etc so
you could customize your own server's IE config and print to a mapped
printer. Lots of ways to skin this cat, but they're all messy.


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




--- End Message ---
--- Begin Message ---
That's good to know. Thanks!

Rod

On Thursday, October 24, 2002, at 03:43  AM, Brian McGarvie wrote:

if your including plain HTML with no php in it then it's quicker to use
readfile()...

"Roderick Martin" <[EMAIL PROTECTED]> wrote in message
news:45763EEA-E6A8-11D6-A0B1-0030653D8C1C@;network23.com...
My bad! Windows is definitely not a strong suit with me. I did not know
I could do the drive paths with the reverse slashes. I tried it and it
worked flawlessly! Thank you!!!

All I have to do now is add the drive path up to the web directory to
the replace.

Thanks again! Easier than I could have hoped for.

Rod

On Wednesday, October 23, 2002, at 10:13 AM, Rich Gray wrote:

Roderick

Have you tried just changing '/acc/includes/headstart.htm' to
'c:/acc/includes/headstart.htm'? i.e. leaving the unix style slashes in
place...

There is a nasty bug in the latest versions of PHP on Win32 affecting
the
include statement with absolute paths.
The above is a workaround solution - once the bug is fixed you should
be
able to remove the 'c:' stuff.

HIW!
Rich
-----Original Message-----
From: Roderick Martin [mailto:maillist@;network23.com]
Sent: 23 October 2002 15:43
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Mixing include path styles. How do I do this???


We recently switched from Netscape Enterprise to IIS and I now need to
make a lot of changes to over 600 htmls - mostly in include statements.
We're doing two things here, switching servers and switching all our
SSI's to PHP includes.

Under Enterprise, I could define a path just by putting it into the
include from the root, ie:

<!--#include virtual="/acc/includes/headstart.htm"-->

I used a global Find and Replace app to change all these (each html has
about eight includes) to:

<? include '/acc/includes/headstart.htm'; ?>

and now they don't work. If I replace the whole path with a Windows
path structure (C:\...) to the included file, it does work.

Here's the problem as I see it. I can easily do another Find and
Replace to add in the first part of the directory tree to the web
directory. What I cannot easily do is change the "/" to "\" inside the
path for the part of the path that's already there.

Is there some way to define the path to the web directory using "\",
maybe in a variable and then somehow/way switch over to "/" so I don't
have to mess with the paths I already have?

Or maybe there's a solution I'm not even aware of. Thank you.


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





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


--- End Message ---
--- Begin Message ---
 




 please stop mailing me or give me the way to get off as I've been directed to the 
unsubscribe list a few times and still get mail..  Please remove thanks...-JD

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
--- End Message ---
--- Begin Message ---

Hi there,

I thought I'd just drop a note with some advice that might be of use to you all. I am running some command line scripts which activate Cognos Impromptu via the COM interface.

We are activating these scripts via scheduled tasks on a Windows 2000 server. We found that the COM interface would work when the scripts were run by the user, but when run by scheduled tasks - the COM part of the script failed.

We checked everything we could think of - permissions on program directories ... log on settings ... local admin settings ... security fields and could find no problem.

Finally - we found the problem in the "Component Services" screen. You will find that there are two default permission settings on the "computer" object. If the user running the task (specifically when running a scheduled task) does not have permission to launch or access the com object - it will fail.

Anyway - it might save someone a bit of time in the future!

Cheers,

Michael.

Attachment: smime.p7s
Description: application/pkcs7-signature

--- End Message ---
--- Begin Message ---
hi ng

i've tried to enable the dl() function in php but it doesn't work! :(

i set enable_dl = on in the php.ini but phpinfo() always telling me, this
feature is disabled.

if i try running a script using the dl() function i get:
"Fatal error: dl() is not supported in multithreaded Web servers - use
extension statements in your php.ini [..]"

but why?

my system:
win2000 pro sp2
apache 1.3.27
php 4.2.3
mysql currently not installed


if anyone know how to solve this problem or know why i get this message
please tell me... :)

regards,
rené



--- End Message ---
--- Begin Message ---
hi ng

i've tried to enable the dl() function in php but it doesn't work! :(

i set enable_dl = on in the php.ini but phpinfo() always telling me, this
feature is disabled.

if i try running a script using the dl() function i get:
"Fatal error: dl() is not supported in multithreaded Web servers - use
extension statements in your php.ini [..]"

but why?

my system:
win2000 pro sp2
apache 1.3.27
php 4.2.3
mysql currently not installed


if anyone know how to solve this problem or know why i get this message
please tell me... :)

regards,
rené


--- End Message ---
--- Begin Message ---
Dear Aidal

On 23 October 2002 at 08:41:52 +0200 (which was 07:41 where I live) Aidal
might have written

> By the way, couldn't you see my examples

Yeeesss

> or whats with the < ... > ?

Cutting out what is not needed unlike your reply. Aggh hate top quoting as
produced by M$ OE/OL

-- 
 Best regards,             _______________________________________________
  David                   |    David  Elliott    |   Software Engineer    |
 _________________________|  [EMAIL PROTECTED] | PGP Key ID 0x650F4534  |
| Just another dull moment in S.MR                                        |


--- End Message ---
--- Begin Message --- Hello all,
Running PHP on IIS WIN2k. Have a strange situation which is confusing the heck out of me. I read a very interesting article about accessing the Google API via NuSoap http://www.devshed.com/Server_Side/PHP/GoogleAPI/page1.html . Looked simple enough, a bit of cut and paste .. at most some tweaking ... A week later and several conversations with a german developer who doesnt speak very good english and I am starting to get a tad frustrated.
My problem is (which the nuSoap developer cant seem to understand) that I am stuck inside a firewall. To send or receive http requests I need to do so through a proxy server (no control over it). This requires username/password authentication. If i just want to do a http request through CURL i would use ...

curl_setopt($ch,CURLOPT_PROXY,"http://proxy.utas.edu.au:8080";);
curl_setopt($ch,CURLOPT_PROXYUSERPWD,"MYusername,MYpassword");

HOWEVER using the nuSoap implimentation I cannot access the GOOGLE API or any other WSDL feed for that matter as it doesnt have a proxy feature. I tried tweaking the code to add my proxy settings to no avail ... Am I missing something? Is it impossible to do a WSDL request via a proxy server?
has ANYONE managed to get the google API running from a WIN2K box?
cheers
Brendan.

--- End Message ---
--- Begin Message --- Yahoo and a couple other companies use boxes to help block spam. before posting an ad on their classifieds, you see a box with word in it.. it's a graphic. and you have to type the letters or words from the box into a text box to proceed, and that ensures that a real person is at the keyboard. anyone know how this can be accomplished in PHP?

thx

blue

--- End Message ---
--- Begin Message ---
"Blue Presley" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:5.1.1.6.0.20021024202123.00b224c0@;pop-server.carolina.rr.com...
> Yahoo and a couple other companies use boxes to help block spam.  before
> posting an ad on their classifieds, you see a box with  word in it.. it's
a
> graphic.  and you have to type the letters or words from the box into a
> text box to proceed, and that ensures that a real person is at the
> keyboard.  anyone know how this can be accomplished in PHP?
>
> thx
>
> blue
>

i don't have a code for you but i think
it would work like that...

starting an randomizer with a couple of
numbers for example...

output the numbers by using the
feature, that php can print text
into images...

and than recheck if the typed
text is the same which was generated
by the randomizer...


hope it would help a little bit!? :)


--- End Message ---
--- Begin Message ---
Hello,

I have only been working with php for about 2 hours now so bare with me if I
type something stupid.

I am trying to open up a remote text file, parse the file, and output the
parsed text as html.  As of now I can open the file read characters into a
buffer and then output them as html.  My problem is with parsing the buffer
to get to the text I want to output.

Should I read the entire file into an array?  Then output the parts of the
array I want to show?  If so please post some type of example code.

Does php have functions to move through a file and choose which characters
you want to put into an array or a buffer?

Any help would be greatly appreciated.

Thanks for your time


--- End Message ---
--- Begin Message ---
Bryan Luisana wrote:

Hello,

I have only been working with php for about 2 hours now so bare with me if I
type something stupid.

I am trying to open up a remote text file, parse the file, and output the
parsed text as html. As of now I can open the file read characters into a
buffer and then output them as html. My problem is with parsing the buffer
to get to the text I want to output.

Should I read the entire file into an array? Then output the parts of the
array I want to show? If so please post some type of example code.

Read the whole file to a single variable and then use regexp (ereg for instance [there is a regexp like function in php that gives you the starting position of the text... ereg will give you the found item...) to find the piece of text that you want...

Cheers...
Luis Ferro

---
[This E-mail scanned for viruses by Declude Virus]

--- End Message ---
--- Begin Message ---
Hey, I just installed apache and php on my desktop and everything was
working great. I went to go make a form and I am getting these errors
everytime I try to access one of the variables in the form

 Notice: Undefined variable: guest_name in C:\www\book_add.php on line 18

anyone got an idea why its doing it. this is what my form looks like.
<form method=get action="book_add.php">
Your Name: <input name="guest_name" type="text"><br>
Your e-mail: <input name="address" type="text"><br>
Your comments:<br> <TextArea name="comments" cols="50" rows="5">
</textarea>
<br>
<br>
<input type=submit>
</form>
 and my out put it this
<?php $guest_name; ?>
 any ideas why I can't access my query variables??

Richard West
[EMAIL PROTECTED]


--- End Message ---

Reply via email to