Re: Hit counter

2003-12-25 Thread Andrew Gaffney
Charlie somerville wrote:
You don't need to get that from a database! All you havve to do is put a
lock on a file read the file, increment it write the file and take the lock
off, easy!
First of all, I guess you are WAY behind on your e-mail. I posted that question back in 
mid-November. Second, the site that this will be on is very DB-driven. In my case it just 
makes sense to use a DB.

--
Andrew Gaffney
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: php testing in my pc

2003-12-25 Thread Wiggins d'Anconia
Please bottom post

Charlie somerville wrote:
POST TO THE DAMN PHP NEWSGROUP NOT THIS ONE!
There are certainly more polite ways to indicate that a poster's 
question is off topic for a particular group...

http://danconia.org

"Daniel Hurtado Brenner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi friends:
I use activeperl for for run and testing my cgi script in my PC. It's
fine.

Well... if i want to run and testing my PHP script and my Msql in my PC...
what can i use?
Thanks
Daniel, from Peru







--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: Hit counter

2003-12-25 Thread Wiggins d'Anconia
Please bottom post...

Charlie somerville wrote:
You don't need to get that from a database! All you havve to do is put a
lock on a file read the file, increment it write the file and take the lock
off, easy!
Without knowing more about the OP's design how can you possibly 
determine whether a DB is or isn't the right implementation. Maybe the 
OP needs to generate images for 10,000 unique numbers, doing this with 
file operations would be incredibly slow compared to a DB. Or maybe the 
information is already stored in the DB to generate the numbers, so 
would you suggest pulling the info from a DB, storing it to a file, and 
then re-reading the file?  Seems a bit silly... Besides the OP's 
question wasn't about getting the numbers it was about creating gifs

http://danconia.org

"Parvez Mohamed" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Plaese use http://www.scriptarchive.com/readme/counter.html#counter

in responce to:

I want to write a CGI in perl that when called, grabs a number from a
MySQL db or a file,
increments it, writes the number back out, and then returns a GIF with
that number. I want
to have 10 separate GIFs, each one containing an image (that I have
created to match the
site design) of a number, 0-9. I need to be able to piece together any
number of these
GIFs from left to right into one large (relatively) GIF. I know how to
do everything but
actually create the GIF. Can anyone point me in the right direction?


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard






--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: Help with PPM install

2003-12-25 Thread Wiggins d'Anconia
Charlie somerville wrote:
Shouldn't you bbe posting to perl.scripts? i mean, cross posting is rude so don't do it

Shall we mention spamming the list posting about threads that are 
ancient, top posting, and in general not being terribly helpful, 
'perl.scripts'??

http://danconia.org

  "Ash Singh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
  I am trying to install Text-CSV from my dos prompt. I downloaded the ppd from 
activestate perl. I get this error, what shall I do.
   

  C:\Perl\ppds\cpan>ppm install Text-CSV.ppd

  Error: No valid repositories: Error: 501 Can't locate object method

  "new" via package "LWP::Protocol::http" Error: 501 Can't locate object

  method "new" via package "LWP::Protocol::http"

   

   

   

   

   
Developer
eMessageX.com

Tel: +27 (0)11 789 1808
Fax: +27 (0)11 326 0152
Cell: +27 (0)72 203 5989
Email:[EMAIL PROTECTED]
   

   



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: Calling JavaScript from Perl

2003-12-25 Thread Wiggins d'Anconia
Please bottom post.

Charlie somerville wrote:
Not neccisarily, javascript can be a server side for example in ASP you can
set the <%@ Language=""%> bit to <%@ Language="javascript" %>
Hence the words "in general"

http://danconia.org

"Wiggins D Anconia" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

Hi,
Does anyone know is it possible to call javascript from perl? Can
javascript be included in the same page? Can anyone provide an example
of

this?
Thanks in advance,
Mark.
How do you mean "call javascript from Perl"?  In general Javascript is a
client side language that executes within a browser (client).  Perl on
the other hand is traditionally a server side language, executed on the
server (conveniently).   So CGI is *usually* used to send some HTML like
stuff to the client, what that stuff is really doesn't matter, as long
as the client can understand what the heck to do with it.  So if you are
asking whether a Perl based CGI script can send Javascript down that
particular pipe then sure, if you want Javascript to use the values and
methods of Perl, etc. then you will have to work out how to convert
those into Javascript and then use them as if they are not linked.
Having said that, this is the general case, clients and Javascript can
be more powerful than they are often given credit for so more extreme
tasks can be accomplished, but with complexity comes learning curve...
http://danconia.org

--
Boycott the Sugar Bowl! You couldn't pay me to watch that game.






--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: Getting a users IP addy

2003-12-25 Thread Randal L. Schwartz
> "Charlie" == Charlie Somerville <[EMAIL PROTECTED]> writes:

Charlie> I'm trying to get a users IP address but when i test it, it always returns
Charlie> "192.0.0.0" which is not my IP. I can't tell you which %ENV key i'm using as
Charlie> i forgot.

Why do you want it?  I hope you're not trying to base an authentication
system around it?

A unique user is not an IP address.
A unique IP address is not a user.

For example, many millions of users use AOL's proxy servers.  On a
given "hit" from a page, the various image fetches will come from many
different machines.  (I can demonstrate it if you want).

And given that this already outnumbers any other significant userbase
for your website... I think I can safely say "logging IP addresses is
OK, but using them to define unique users will totally fail".

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Re:Hit counter

2003-12-25 Thread Charlie somerville
You don't need to get that from a database! All you havve to do is put a
lock on a file read the file, increment it write the file and take the lock
off, easy!
"Parvez Mohamed" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Plaese use http://www.scriptarchive.com/readme/counter.html#counter
>
> in responce to:
>
> I want to write a CGI in perl that when called, grabs a number from a
> MySQL db or a file,
> increments it, writes the number back out, and then returns a GIF with
> that number. I want
> to have 10 separate GIFs, each one containing an image (that I have
> created to match the
> site design) of a number, 0-9. I need to be able to piece together any
> number of these
> GIFs from left to right into one large (relatively) GIF. I know how to
> do everything but
> actually create the GIF. Can anyone point me in the right direction?
>
>
>
> -
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: php testing in my pc

2003-12-25 Thread Charlie somerville
POST TO THE DAMN PHP NEWSGROUP NOT THIS ONE!
"Daniel Hurtado Brenner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi friends:
> I use activeperl for for run and testing my cgi script in my PC. It's
fine.
> Well... if i want to run and testing my PHP script and my Msql in my PC...
> what can i use?
>
> Thanks
> Daniel, from Peru
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Getting a users IP addy

2003-12-25 Thread Charlie somerville
I'm trying to get a users IP address but when i test it, it always returns
"192.0.0.0" which is not my IP. I can't tell you which %ENV key i'm using as
i forgot.

Please help me.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: free site hosting that supports CGI

2003-12-25 Thread Charlie somerville
Yeah, tripod lets you, only prob is they don't have the CGI module but you
can work around that with $ENV{'QUERY_STRING'}
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 
>Does anybody knows where I can find free site hosting that supports
CGI?
>   JP, from Brazil.
> 
> you must search meny time in this place: http://www.clickherefree.com/
> I am not shuare: Me be must pay 2 $ on mount. If you have made cgi
hosting.
>
>  success ):
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Help with PPM install

2003-12-25 Thread Charlie somerville



 
Shouldn't you bbe posting to perl.scripts? i mean, 
cross posting is rude so don't do it
 

  "Ash Singh" <[EMAIL PROTECTED]> wrote in message 
  news:[EMAIL PROTECTED]...
  
  I am trying to install Text-CSV 
  from my dos prompt. I downloaded the ppd from activestate perl. I get this 
  error, what shall I do.
   
  C:\Perl\ppds\cpan>ppm install Text-CSV.ppd
  Error: No valid repositories: 
  Error: 501 Can't locate object 
  method
  "new" via 
  package "LWP::Protocol::http" Error: 501 Can't 
  locate object
  method "new" via 
  package "LWP::Protocol::http"
   
   
   
   
  


  


  
DevelopereMessageX.comTel: 
+27 (0)11 789 1808Fax: 
+27 (0)11 326 0152Cell: 
+27 (0)72 203 5989Email:[EMAIL PROTECTED]
   
<><>

Re: Bad referrer!

2003-12-25 Thread Charlie somerville
Some computers have special security settings to hide the refferer, you need
to find a way to disable the security setting.
"Sara" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> There was a script which people were using remotely, so I have to add this
> simple subroutine
> to check referrers. Currently, the site is getting approx. 20,000 hits per
> day.
>
> NO one, not even a single person claimed that they have experienced any
> problem after
> implementing this change, except for the owner of the site. I am webmaster
> for the site.
> And now she is pushing to undo this change immediately because she is
> constantly
> getting &error(bad_referrer) and unable to use this script and we both
know
> she is the only one
> experiencing this problem.
>
> Is there something wrong below? If yes, then why others are not getting
any
> bad referrer error.
> If no, what could be the possible reasons that owner is the only person
> getting bad referrer error?
>
> TIA,
> Sara.
>
> 
>
>
> @referers = ('http://www.foo.com', 'http://foo.com');
>
> sub check_url {
> local($check_referer) = 0;
>
> if ($ENV{'HTTP_REFERER'}) {
> foreach $referer (@referers) {
> if ($ENV{'HTTP_REFERER'} =~ m|$referer|i) {
> $check_referer = 1;
> last;
> }
> }
> }
> if ($check_referer != 1) { &error('bad_referer') }
> }
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Calling JavaScript from Perl

2003-12-25 Thread Charlie somerville
Not neccisarily, javascript can be a server side for example in ASP you can
set the <%@ Language=""%> bit to <%@ Language="javascript" %>


"Wiggins D Anconia" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
>
> > Hi,
> > Does anyone know is it possible to call javascript from perl? Can
> > javascript be included in the same page? Can anyone provide an example
of
> > this?
> > Thanks in advance,
> > Mark.
>
> How do you mean "call javascript from Perl"?  In general Javascript is a
> client side language that executes within a browser (client).  Perl on
> the other hand is traditionally a server side language, executed on the
> server (conveniently).   So CGI is *usually* used to send some HTML like
> stuff to the client, what that stuff is really doesn't matter, as long
> as the client can understand what the heck to do with it.  So if you are
> asking whether a Perl based CGI script can send Javascript down that
> particular pipe then sure, if you want Javascript to use the values and
> methods of Perl, etc. then you will have to work out how to convert
> those into Javascript and then use them as if they are not linked.
>
> Having said that, this is the general case, clients and Javascript can
> be more powerful than they are often given credit for so more extreme
> tasks can be accomplished, but with complexity comes learning curve...
>
> http://danconia.org
>
> --
> Boycott the Sugar Bowl! You couldn't pay me to watch that game.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]