php-windows Digest 28 Oct 2002 19:05:07 -0000 Issue 1411
Topics (messages 16585 through 16596):
odbc_num_rows() function
16585 by: Raheel Hussain
16587 by: Svensson, B.A.T. (HKG)
Has anyone got PHP working with IIS5
16586 by: Neil
16596 by: Mikey
Re: spam protection boxes
16588 by: Svensson, B.A.T. (HKG)
16594 by: Dash McElroy
16595 by: Stephen Edmonds
Create file!
16589 by: Radovan Radic
16590 by: Nichols, Mark A.
16591 by: Radovan Radic
GD2 and PHP
16592 by: Stephen Edmonds
Re: google API via nuSoap
16593 by: Brian 'Bex' Huff
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 ---
hi,
I m doing a database connectivity with MS Access Database
now when i get the recordset with the following code
$rec= odbc_exec($conn,$Qry); //executes without any error
$num_records=odbc_num_rows($rec); //executes without any error
print ($num_records); //prints -1
because it is written in the documentation of this function that it returns -1 with
some drivers, so what should i do.
then i use an alternate method for it
which is
$counter= 0;
while (odbc_fetch_row($rec)) { $counter++; }
print ($counter); //prints the total records
but this alternate way is very time and resource consuming,
any suggestions ???
Raheel Hussain
House-2 , Block-8, Siddiqueabad Housing Society, Malir, Karachi, Pakistan.
Phone : (92)(021) 4505808.
Cell : (92)(021) 0320-5064609.
---------------------------------
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
--- End Message ---
--- Begin Message ---
> while (odbc_fetch_row($rec)) { $counter++; }
> print ($counter); //prints the total records
>
> but this alternate way is very time and resource consuming,
>
> any suggestions ???
$Query = "SELECT COUNT(*) FROM <some where> WHERE <condition is fubar>"
--- End Message ---
--- Begin Message ---
on win2k?
--- End Message ---
--- Begin Message ---
Yes. RTM.
> -----Original Message-----
> From: Neil [mailto:nlaker@;jbennett.co.uk]
> Sent: 28 October 2002 11:26
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Has anyone got PHP working with IIS5
>
>
> on win2k?
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
--- End Message ---
--- Begin Message ---
It will just last a matter of time before the spam devils applies
patter recognition algorithms to circumvent this things. :(
> -----Original Message-----
> From: Dash McElroy [mailto:php@;l1te.net]
> Sent: Saturday, October 26, 2002 7:49 AM
> To: Blue Presley
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] spam protection boxes
>
>
> I actually just got back from the PHPCon convention in Milbrae (South San
> Francisco), Ca. I honestly forget who suggested the idea, it may have been
> Rasmus himself (my short term memory is shot), but the idea mentioned was
> to have some random text pushed into a GD call to automatically generate
> the image. Obviously then, if you supply the data to GD, you can verify
> the input as well.
>
> Voila!
>
> -Dash
>
> Weiler's Law:
> Nothing is impossible for the man who doesn't have to do it
> himself.
>
> On Thu, 24 Oct 2002, Blue Presley wrote:
>
> > 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
> >
> >
> > --
> > 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 ---
I read an article in Wired (I think) that said that spammers are
filling out Yahoo info automatically, then when it comes to that, it spits
out the graphic to someone at a computer who looks at the graphic, then
types in the letters, then the spammer's script keeps going. Nasty.
-Dash
QUOTE OF THE DAY:
`
On Mon, 28 Oct 2002, Svensson, B.A.T. (HKG) wrote:
> It will just last a matter of time before the spam devils applies
> patter recognition algorithms to circumvent this things. :(
>
> > -----Original Message-----
> > From: Dash McElroy [mailto:php@;l1te.net]
> > Sent: Saturday, October 26, 2002 7:49 AM
> > To: Blue Presley
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] spam protection boxes
> >
> >
> > I actually just got back from the PHPCon convention in Milbrae (South San
> > Francisco), Ca. I honestly forget who suggested the idea, it may have been
> > Rasmus himself (my short term memory is shot), but the idea mentioned was
> > to have some random text pushed into a GD call to automatically generate
> > the image. Obviously then, if you supply the data to GD, you can verify
> > the input as well.
> >
> > Voila!
> >
> > -Dash
> >
> > Weiler's Law:
> > Nothing is impossible for the man who doesn't have to do it
> > himself.
> >
> > On Thu, 24 Oct 2002, Blue Presley wrote:
> >
> > > 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
> > >
> > >
> > > --
> > > 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 ---
I suggest using GD to generate the images in PHP then output them to a
browser.
http://www.php.net/manual/en/ref.image.php
I use GD 1, as I have had issues loading fonts into GD 2
Good luck
Stephen
----- Original Message -----
From: "Dash McElroy" <[EMAIL PROTECTED]>
To: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
Cc: "Dash McElroy" <[EMAIL PROTECTED]>; "Blue Presley" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 5:23 PM
Subject: RE: [PHP-WIN] spam protection boxes
> I read an article in Wired (I think) that said that spammers are
> filling out Yahoo info automatically, then when it comes to that, it spits
> out the graphic to someone at a computer who looks at the graphic, then
> types in the letters, then the spammer's script keeps going. Nasty.
>
> -Dash
>
> QUOTE OF THE DAY:
>
> `
>
>
> On Mon, 28 Oct 2002, Svensson, B.A.T. (HKG) wrote:
>
> > It will just last a matter of time before the spam devils applies
> > patter recognition algorithms to circumvent this things. :(
> >
> > > -----Original Message-----
> > > From: Dash McElroy [mailto:php@;l1te.net]
> > > Sent: Saturday, October 26, 2002 7:49 AM
> > > To: Blue Presley
> > > Cc: [EMAIL PROTECTED]
> > > Subject: Re: [PHP-WIN] spam protection boxes
> > >
> > >
> > > I actually just got back from the PHPCon convention in Milbrae (South
San
> > > Francisco), Ca. I honestly forget who suggested the idea, it may have
been
> > > Rasmus himself (my short term memory is shot), but the idea mentioned
was
> > > to have some random text pushed into a GD call to automatically
generate
> > > the image. Obviously then, if you supply the data to GD, you can
verify
> > > the input as well.
> > >
> > > Voila!
> > >
> > > -Dash
> > >
> > > Weiler's Law:
> > > Nothing is impossible for the man who doesn't have to do it
> > > himself.
> > >
> > > On Thu, 24 Oct 2002, Blue Presley wrote:
> > >
> > > > 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
> > > >
> > > >
> > > > --
> > > > 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
> > >
> >
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hi
(Win2000, PHP 4.0.6 IIS)
$filename="streets.dat";
if (file_exists($filename))
{
Read From File;
Print To Html;
}
else
{
$f=fopen($filename,"w");
read from database to file;
Print To Html;
fclose($f);
}
But fopen will not create $filename, and i get an error like:
You dont have permission to create file ...
Although the manual says:
'w' - Open for writing only; place the file pointer at the beginning of the
file and truncate the file to zero length. If the file does not exist,
attempt to create it.
How to simply create file in php?
Radovan
--- End Message ---
--- Begin Message ---
Your code works for me on Windows 2000 with IIS and Windows 2000 with Apache.
Could it be file permissions on the server.
-----Original Message-----
From: Radovan Radic [mailto:rasho@;ving.co.yu]
Sent: Monday, October 28, 2002 9:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Create file!
Hi
(Win2000, PHP 4.0.6 IIS)
$filename="streets.dat";
if (file_exists($filename))
{
Read From File;
Print To Html;
}
else
{
$f=fopen($filename,"w");
read from database to file;
Print To Html;
fclose($f);
}
But fopen will not create $filename, and i get an error like:
You dont have permission to create file ...
Although the manual says:
'w' - Open for writing only; place the file pointer at the beginning of the
file and truncate the file to zero length. If the file does not exist,
attempt to create it.
How to simply create file in php?
Radovan
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
"Mark A. Nichols" <[EMAIL PROTECTED]> wrote in message
news:7A08E8036BBBAA4FBD9071B169EDC9B6843E@;mailserver01.spicergroup.com...
Your code works for me on Windows 2000 with IIS and Windows 2000 with
Apache.
>Could it be file permissions on the server.
Yes, maybe i didnt set permissions on my server via IIS, i will check
Radovan
--- End Message ---
--- Begin Message ---
Yesterday I decided to switch my GD library from gd.dll to gd2.dll... big
mistake
Now, when I try to create text using imageTTFtext( ), I get the error
message of
Warning: Could not find/open font in
C:\server\scryt_pages\members\interface\buttons\base.php on line 53
I've tried the suggestions I found at PHP beginner, but still no luck. Any
ideas?
Ty
Stephen
Tried code:
imageTTFtext( $Button_Image, $FontSize, 0, $X_Coord, $Y_Coord,
$Colour_Button_Text, "./BERNHC", $Button_Text );
and
imageTTFtext( $Button_Image, $FontSize, 0, $X_Coord, $Y_Coord,
$Colour_Button_Text, "./BERNHC.ttf", $Button_Text );
and
imageTTFtext( $Button_Image, $FontSize, 0, $X_Coord, $Y_Coord,
$Colour_Button_Text, "C:\server\PHP\fonts\BERNHC.ttf", $Button_Text );
The font is located in C:\server\PHP\fonts, and
C:\server\scryt_pages\members\interface\buttons AND ALSO
C:\server\scryt_pages\members\interface
Bit silly really :-\
--- End Message ---
--- Begin Message ---
Check out the:
setHTTPProxy()
function for the 'soapclient' object. Its new, so be sure to download
the latest stuff:
http://dietrich.ganx4.com/nusoap/
I dont know if it supports username and passwords for the proxy server
tho... maybe you should ask the CURL people if they are doing it right.
--
Brian 'Bex' Huff
[EMAIL PROTECTED]
Phone: 952-903-2023
Fax: 952-829-5424
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 ---