Perl Mailer
hi guys, is anybody here knows a good script - good means MIME attachments - that act as a mailer agent ? i have write some small scripts myself, but if someone can handle MIME and it is already written, then it is better to use it. thx v.much -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
shared cookies
hi guys, i have multiple domain names - etc multiple sites - that i would like to share cookies inbetween, how can i - literally - do that, and is it enough to use HTTP::Cookies !? thx 4 help -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SSL
hi guys, If someone want some interaction with the web, he might use LWP and WWW::Mechanize, thats good, but thats not good if he wants to work with SSL. how can i integrate my script with SSL? thx. -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
parsing an excel formula
hi guys, i have found that Excel::Parser and other parsing excel modules very usefull in parseing all excel data except the formula data, so how can i extract the formula from a cell ?? thx v.much -- Hytham Shehab
[OT] Sendmail for windows
hi guys, where can i find/download a free sendmail alternative for win32? thx -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fw: output pushing
R u looking 4 nph-push? #! /usr/bin/perl $|=1; # don't buffer output $BOUNDARY=--start-new-page-here--; # seperates html pages print HTTP/1.0 200 OK\n; print Pragma: no-cache\n; print Content-type: multipart/x-mixed-replace;boundary=$BOUNDARY\n\n; print $BOUNDARY\n; # tells browser to start a new page print Content-type: text/html\n\n; # tells it what kind for ($count=10; $count = 0; $count--) { print h1$count/h1\n; print Get ready. Here comes b . ($count -1) . /b!\n; sleep('1'); print $BOUNDARY\n; print Content-type: text/html\n\n; } print h1boom!/h1\n; print /html; # don't forget this! no good Zentara, i use IE 5.5, and the M$ browser doesn't support server-push, if this is the case. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: output pushing
Hello Hytham and world That is a good question. But 'pushing' means you have to be able to FORCE html code into a clients machine - not just allow them to be able to look for it themselves. Exit browsing. Logon and become lost. cheers JimmyG @CUDAL i don't get it, do u mean that if i made the user log in, i can then 'push' and 'force' html into their browser? i didn't mean by pushing to force the user to get what i want them to get, my concern is can i treat the client as a queue, that is i don't have to fill the whole que whenever new members - data to be printed - come in, but simply push them into the queue, so clients only get new data. cheers. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fw: output pushing
$|++; this won't work man u didn't get my q, i need to push data into output without the need to recall the entire script to print the whole plus the new data, i want em to print only the new data. thx -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
output pushing
hi guys, the normal way to write output to the client browser is done when the whole program is finished. is there a way to push output to the client browser in non-buffered way - say, as line by line in the IRC clients - without need to print the the whole page again, something like appending ? -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] document encoding
hi guys, i insert both lines: META HTTP-EQUIV=Content-Type CONTENT=text/html; charset=windows-1256 META HTTP-EQUIV=Content-Language CONTENT=ar into my cgi script, so that document language is predefined, and the browser - IE 5.5 - will stick with it, but: it gives me any type of characters/language except what i want, i even deselect the Auto-Select option in the IE 5.5, but no good, i have always select Arabic inorder to view it correctly, but when the cgi script generate the result, it returns - again - to be not Arabic. i hope that i made my problem some how clear. thanks guys. -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
apache::*, simple question.
hi guys, is it a must to use mod_perl to access all/some apache::* modules?, i mean, if i run normal perl and cgi scripts, i won't be able to access apache modules? thanks -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sql statement parsing
Posting your whole script, or a larger part might be helpful and get more response. sidenoteare you using strict and warnings?/sidenote My original hunch was that the where method was not being exported and therefore was not loaded by your script, upon a slight more research I was *unable* to find the where function you are using anywhere except in the documentation for SQL::Statement, which makes reference to the where method existing in the SQL::Statement::OP package which I could also not find either in the source for SQL::Statement nor elsewhere on CPAN. You might want to crack open the source for the module you have installed but I wasn't able to locate where this method is defined (other than in the docs). You might also contact the creator of the module about this specific problem. http://danconia.org well, i think that u r absolutely right about that it might be *ONLY* existed in the docs, i may contact the creator for more details regarding this issue. btw, am not using warnings nor strict. thanks. -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
sql statement parsing
hi guys, how can i parse the where clause in an SQL::Statement object instance? $statement = SQL::Statement-new(select 1,2,3 from table where x=y); now when i do this: $where = $stmt-where(); it gives me error: Can't locate object method where via package SQL::Statement (perhaps you for got to load SQL::Statement?) at blah line 34. any idea? thanks -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sql statement parsing
Hytham, Although I haven't used SQL::Statement you can certainly do something like: $condition = $1 if $statement =~ /where (.+)( order by .+){0,1}$/; I haven't tested this but I expect it to pick up the conditional part of an SQL statement which would then be up to you to parse further if needed. In your example though you have assigned the SQL statement in the code. Therefore wouldn't it make more sense if this is really how the code works to do something like: my $cond = 'x=y'; $statement = SQL::Statement-new(select 1,2,3 from table where $cond;); Then you parse upfront, so to speak. This is how I assemble queries on the fly for transactions that need that functionality. hth, Marty nice way to get the where clause, but i don't want ot get data, nor insert data, the sole purpose of my script is to type the select statement in more tree-like structure, so i don't know the values of $cond to evaluate it, besides, am using SQL::Statement for the pure purpose of parsing, no more, no less, all what i wounder is, why am getting this error message, and how to avoid it. any help or new idea? -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sql statement parsing
Is the below 'exactly' what you have? The reason I ask is: $statement = SQL::Statement-new(select 1, and $where = $stmt-where(); Should it be: $where = $statement-where(); HTH, David thanks david for telling my about my *EMAIL* typo, coz it is wriiten *CORRECTLY* in the script. again, thanks. -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Spreadsheet::ParseExcel
hi guys, am using activeperl v 5.6.1 on XP, then when i start my script: #!c:\perl\bin\perl.exe use strict; use Spreadsheet::ParseExcel; . then run it, it gave me the error(s): Can't locate IO/Scalar.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib . ) at C:/Perl/site/lib/OLE/Storage_Lite.pm line 171. BEGIN failed--compilation aborted at C:/Perl/site/lib/OLE/Storage_Lite.pm line 1 71. Compilation failed in require at C:/Perl/site/lib/Spreadsheet/ParseExcel.pm line 103. BEGIN failed--compilation aborted at C:/Perl/site/lib/Spreadsheet/ParseExcel.pm line 103. Compilation failed in require at excel.pl line 4. BEGIN failed--compilation aborted at excel.pl line 4. i have installed the module using PPM, and you can rest assure that it is there. thx. very much -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running CGIs offline
Octavian Rasnita wrote, Why? if you asking about its not a good idea anyway, i think that perl *scripts* are easy to edit/view from the CD, resulting that anyone - with some knowledge in Perl - will know the username/password, database name, table structure, and many other very risky data to be recognized by anyone. then, what is the solution?, i think make some modification to these information on the data that will be written on the CD, such as renaming tables, renaming columns, redefining username/password, adding some fields that gives some missunderstanding to the table structures, etc, etc. However, i think its really great tool, if you avoid this pitfalls. -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Finding the country
Randal L. Schwartz wrote: If you're using it to force the language of the page, no. Use the browser specification instead. thanks v. much for that Randal, but *how* ? how i can use the browser specification? -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
401
hi guys, how could i get a page - using lwp - when this is page have a credenitals lookup, it keep sends me 401 status code, but i don't know how to pass the user/pass to this page. any idea? thanks in advance. -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: www-authinticate
hello there, is any body in there? hey guys, whats the matter with you? 1 day, 24 HOURS, with only a couple of messages? hope you are just fine. -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
www-authinticate
hi guys, how can i pass the 401 Unauthorized request so a message with a username/password show up to the user? i tried out cgi::authentification and the print WWW-Authic \n\n but no good? thanks in advance -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: server push
well, Janek, my q is simple: is IE6 is server-push capable? if yes, then whats the wrong with my script? if not, ok, thanks for the information. thats it thanks -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
server push
#!c:/perl/bin/perl.exe while('[EMAIL PROTECTED]'){ if('Internet_Explorer_6' != 'server push'){ $question_r = 'how to push animated images in that browser?'; } elsif { $question_r = 'why my script didn't work?'; } else { undef('[EMAIL PROTECTED]'); die why you are here in the first place; } print i got a simple question for you, $question_r; die thanks in advance; #!c:/perl/bin/perl.exe $| = 1; $webmaster = shishir\@bu\.edu; $boundary_string = \n . --End . \n; $end_of_data = \n . --End-- . \n; $delay_time = 1; @image_list = ( image_1.png, image_2.png, image_3.png, image_4.png, image_5.png ); $browser = $ENV{'HTTP_USER_AGENT'}; print Content-type: multipart/x-mixed-replace;boundary=End, \n; for ($loop=0; $loop scalar (@image_list); $loop++) { open_and_display_png ($image_list[$loop]); print $boundary_string; sleep ($delay_time); } print $end_of_data; exit(0); sub open_and_display_png { local ($file) = @_; local ($content_length); if ( (open (FILE, . $file)) ) { $content_length = (stat (FILE))[7]; print Content-type: image/png, \n; print Content-length: , $content_length, \n\n; binmode FILE; print FILE; close (FILE); } else { #return_error (500, File Access Error, print Cannot open graphic file $file!; } } -- Hytham Shehab btw, i know, there is more perlish way to write this. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fwd: passing variables in POST
my $md5= new Digest::MD5; my $remote = $ENV{ REMOTE_ADDR } . $ENV{ REMOTE_PORT } . $self-{ _rand }; my $id = $md5-md5_base64( time, $$, $remote ); $id=~ tr|+/=|-_.|; # Make non-word characters URL-friendly The Make ... URL-friendly part is in case I need to embed the session ID in a URL. As for the _rand on the end, that's a random number that I tack onto the end to ensure unique ids are generated. thanks very much Ovid, it was very nice of you, but can you complete your favour and describe how to implement Apache::Session, i mean, whats the use of that module if i could generate a session id with md5? btw, whats the %self is? -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to include a subroutine from external file?
hi all of you, i have a multiple perl files that use the same subroutines, the only way i know to handle this - i know its not so cleaver - is to copy paste the portion of the subroutine in all perl files i want to use it, what is the more clever way? thx v. much -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to include a subroutine from external file?
i think that writing a module is not my answere, i think it is a huge complicated answere for a simple question. all what i want is simply put all my used subroutines in a seperate files, then call the subroutine from that file whenever i want to use the subroutine, am i clear now? no redundency is my only target, thats it... thx v. much, specially Lundeen and drieux -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: website keywords
hey man, of course i know that, but may i didn't made myself clear. what i want to is how do i get the keywords of web site via perl/cgi, i don't want to get the file first then search of matched meta=keywords and then use the m/blahblah/ heriglophic mystries characters to access such thing. am i clear know? thx v. much for ur concern -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mysql query statement
hi all of u, i got a simple question, why (1) is valid, however, (2) is not ?!! (1) sorting order is explicity typed in the query statement: $sth = $dbh-prepare(select student_name from students order by first_name asc); $sth-execute(); (2) sorting order is passed as a bind parameter: $sort = 'asc'; $sth = $dbh-prepare(select student_name from students order by first_name $sort); $sth-execute($sort); thx v. much -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mysql query statement
fliptop said: you're trying to substitute the value twice. try something like this instead: $sort = 'first_name asc'; $sth = $dbh-prepare(select foo from bar order by ?) $sth-execute($sort); i did it already flip, but its not yet valid, also it seems to be mentaly valid, its not for mysql. thx -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mysql query statement
hi all of u, all whatta i want is see the exact executed query b4 its execution, i mean not like this select blah from blah when x=? but not ? order by ?, i want to see as if u write it in the console of mysql, something like that select blah from blah where x=10 order by 'big' group by 'zip'. is it possible? thx -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mysql query statement
hi all of u, all whatta i want is see the exact executed query b4 its execution, i mean not like this select blah from blah when x=? but not ? order by ?, i want to see as if u write it in the console of mysql, something like that select blah from blah where x=10 order by 'big' group by 'zip'. is it possible? thx -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
website keywords
hi guys, how can i access the keyword section of any web page? thx -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
creating a session
hi guys, i got the cgi::session module, but it is a front end to Apache::Session which is not available for win32, how come the cgi::session is available but the apache::session is not??!!, so weared, but this is not the problem, the problem is how to create session in win32 without that apache::session?? thx very much Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
creating a session
hi guys, i got the cgi::session module, but it is a front end to Apache::Session which is not available for win32, how come the cgi::session is available but the apache::session is not??!!, so weared, but this is not the problem, the problem is how to create session in win32 without that apache::session?? thx very much Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
session management
hi all of you, how can i create a session using win32 system, on linux, there is a session module out there - aspn and cpan - but am searching about such one for win32 but i didn't find. can anyone tell me how to manage session through win32. thx Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
off topic - mail under win32
hi guys, when working under linux/unix systems, u can check if the script u create successfuly send the email or not, there is too many way to check this, such as switching to other user account, how can do i setup a fictious email account on win xp then check - efficiently - that the script works fine. thx Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How I can logout?
hi Luis, i think u may delete his cookie that u propably set, i think CGI wll be just fine. -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dbi module for ActivePerl
hi guys, when i list the available drivers when useing perl from perl.com, it gives me the whole drivers as well as mysql, but when i use the activeperl version, it list the whole but mysql, i search about the dbd of mysql in activeperl repository, i wasn't lucky, how can i go along with activeperl now? its really more organized than the original perl and have a good documentation also. btw, thanks a lot yahoo. -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dbi module for ActivePerl
thanks joel, but i try to see the available drivers with @x=DBI-available_drivers; it gives me Example and Proxy, with no sign of MySQL - mysql is installed and working properly with other version of perl, ie perl from perl.com - so what is the problem. thanks in advance. -- Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re:session id
hi guys, how can i do it in win32? thanks -- Hytham Shehab
session id
Hello! i see in most PHP powered sites values like SID=02304028lkbah234, which is the session id in most cases, is there any way to do the same in PERL? Thanks -- Hytham Shehab
session id
Hello! i see in most PHP powered sites values like SID=02304028lkbah234, which is the session id in most cases, is there any way to do the same in PERL? Thanks -- Hytham Shehab
how to make PMs on Win32?
hi guys, I used to make files on RH 7.2, but how i do the same on XP?? Hytham Shehab -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
multipart/x-mixed-replace and image/gif
hi gurus, well, can any body give me where to read about this topic? thx
multipart/x-mixed-replace and image/gif
Hi gurus, Am working on a script to generate a sequence of GIFs in an img tag, when i run this script from dos, it works OK and generate the appropriate headers, but when running under a web page - hosted by Apache v 1.3 on XP - it doesn't do anything, and i use CGI::Carp(fatalsToBrowser); but it give me no sign for error, can any one give me a hand on this, thanks in advance The HTML page: HTML BODY CENTER IMG SRC=/cgi-bin/anim.cgi /CENTER /BODY /HTML The CGI script: #!f:/perl/bin/MSwin32-x86/perl5.00502.exe @files=qw/logo1.gif logo2.gif logo3.gif logo4.gif/; print Content-type: multipart/x-mixed-replace\n\n; foreach $file(@files){ print $file\n\n; print Content-type: image/gif\n\n; open(LOGO,$file); print LOGO; close(LOGO); sleep(1); }
it works...
Hi - and thanks - for everyone, It works at last, but without using upload(): #!/usr/bin/perl use CGI; $q = new CGI; print $q-header, $q-start_html('title here'), $q-h1('Please fill this form'), $q-start_multipart_form, $q-filefield(-name='uploaded_file', -size=50, -maxlength=80), $q-submit, $q-end_form, $q-hr; $file=$q-param('uploaded_file'); print $file is to be uploaded; if (!$file $q-cgi_error) { print $q-header(-status=$q-cgi_error); exit 0; } open(FILE,/download/$file); while($bytesread=read($file,$buffer,1024)){ print FILE $buffer; } close(FILE); Thanks Hytham Shehab
how to upload a file through an html form, again.
hi gurus, first of all, am really gracefull about all who sends me tips of how to make this thing work, but, unfortunately, it doesn't yet. here it is: #!/usr/bin/perl use CGI; $q = new CGI; print $q-header, $q-start_html('title here'), $q-h1('Please fill this form'), $q-start_multipart_form, $q-filefield(-name='uploaded_file', -size=50, -maxlength=80), $q-submit, $q-end_form, $q-hr; $file=$q-upload('uploaded_file'); if (!$file $q-cgi_error) print $q-header(-status=$q-cgi_error); exit 0; } open(FILE, /home/eHytham/public_html/upload.it); while($bytesread=read($file,$buffer,1024)){ binmode STDOUT; binmode FILE; print FILE $buffer; } close(FILE); I use my linux mandrak 7 as my client/server, this might be the problem? Thanks Hytham Shehab