[PHP] create keywords meta tag dynamically
hi, Does someone have solution how to index page and dynamically create keywords for "keywords" meta tag ? Based on full page content, not only on title. Thanks ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include() in included file
Hi Hubert, Check if there display_errors in your php.ini is set to Yes, and also take a look at your apache error log when you execute this page, probably you will see an error there. Best regards, Veniamin Goldin Interlogics, Inc. Вы писали 15 марта 2003 г., 12:34:35: HK> Hello all! HK> In index.php I include a file template.php using HK> // this is index.php file HK> include('template.php'); ?>> HK> Works fine. In template.php I'm using include function too HK> // this is template.php file HK> echo 'before include'; HK> include('header.php'); HK> echo 'after include'; ?>> HK> Works fine on all machines I installed it till now: Windows (NT, 98), Linux HK> (some of them). But I installed it on FreeBSD and... surprise. When I call HK> index.php, all I get is "before include". No header.php content, no "after HK> include" phrase. And there is no warning or error message. Has anybody got HK> an idea what is wrong? Cheers, HK> Hubi -- С уважением, Veniamin [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SHA-1 + RSA + base64
Hi all, I need some help, I have a request to encode string with SHA-1, then with RSA and at the end with base64, There no problems with SHA-1 and base64, but i can't find any functions to encode using RSA. md5 seems to be not what I'm looking for. I heard also, that there should be special function, that makes SHA-1 + RSA at once. Help please. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] SHA-1 + RSA + base64
See, that encoding method was not produced by me, it was request from bank to do such crazy encryption to use their gateway. That told exactly: first to SHA-1, then RSA (with results of SHA-1) and after all encode it with base64 :( Could you help me with this ? Вы писали 27 марта 2003 г., 15:42:40: JS> I'm not sure why you would want to encrypt a hash of a string, a hash JS> (sha1) is already non reversible and you also do not need to JS> base64_encode a sha1 hash (try ).. JS> If you want to do RSA public key encryption you will need to use an JS> external application such as gpg or pgp. JS> Also please note if you are intending to encode the plain text three JS> different ways you are exposing yourself with base64, base64 is not an JS> encryption technique. JS> The way I understand your question is data -> sha1 -> rsa -> JS> base64_encode but it could also be data ->> sha1 data ->> rsa data ->> base64 JS> The latter is not secure because you are using base64 which is not even JS> trivial to decode. JS> Jason JS> Veniamin Goldin wrote: >>Hi all, >> >> >>I need some help, >> >>I have a request to encode string with SHA-1, then with RSA and at the >>end with base64, >> >>There no problems with SHA-1 and base64, but i can't find any >>functions to encode using RSA. >> >>md5 seems to be not what I'm looking for. >> >> >>I heard also, that there should be special function, that makes SHA-1 >>+ RSA at once. >> >> >> >>Help please. >> >> >> >> -- С уважением, Veniamin [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] TABLE COLUMNS
probably something like: echo ""; $rs=mysql_query("select * from blabla;",$conn); while($row=mysql_fetch_row($rs)) { echo ""; echo "".$row[0].""; echo "".$row[1].""; echo "".$row[2].""; echo "".$row[3].""; echo ""; } echo ""; R> I'm querying a database then printing the results in a . What I R> want to do is format the results in a with 4 columns per row. R> Any suggestions? R> Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] captcha WAS Please visit my php program
Do somebody has any snipet for this stuff ? - Original Message - From: "Ryan A" <[EMAIL PROTECTED]> To: "Chris W. Parker" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, September 30, 2003 1:46 AM Subject: Re: [PHP] captcha WAS Please visit my php program > Hey, > > /* > Exactly what is the purpose of this? Let me clarify. I know that it's > supposed to prevent computers from submitting forms automatically > because they cannot read the graphic, but what I don't understand is in > what cases this is useful? > */ > Its more of a hassle and requires the entity who is submitting the form to > be human as computers cant 100% be sure of whats in the picture, they cant > "see" it 100% of the time even with todays OCR technoligy while humans can > make it out in a fraction of a second...mostly. > > /* > And specifically Ryan, where will you be using this? > */ > Am using this on a voteing form at bestwebhosters.com which will be opened > in 2-5 days. > This idea was suggested to me by a few guys on this very list...the first > names that come to mind are john & chris. > > /* > I'm trying to gauge whether or not this would be worthwhile for a > project I'm working on right now. > */ > Ok, i like it coz it adds a bit of the "fancy" element to the same old > boring forms but it has much more serious uses of course. > > /* > Thanks, > Chris. > */ > > No problem, tell me if you have any more q's although my replies may be a > little long in the coming. > > HTH. > > Cheers, > -Ryan > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session control query
Hi, session_start(); must be a very first line of script. Before any html output. Regards, Veniamin SS> Hi there, SS> I'm currently working on a user login script. I'm using session SS> variables. Everything seems to be working fine but I continually get the SS> following warning message when I run the programs: SS> Warning: Cannot send session cache limiter - headers already sent SS> (output started at c:\phpdev\www\staffdb2\side_menu.php:3) in SS> c:\phpdev\www\staffdb2\side_menu.php on line 4 SS> The side_menu.php routine is below: SS> SS> SS> session_start(); SS> //require_once('user_auth_fns.php'); SS> //check_valid_user(); SS> if (isset($HTTP_SESSION_VARS['valid_user'])) SS> { SS> echo 'Log out'; SS> } SS> else SS> { SS> echo 'You are not logged in'; SS> } ?>> SS> The session variable 'valid_user' is set in the following routine: SS> require_once('staffdb_fns.php'); SS> session_start(); SS> $username=$HTTP_POST_VARS['username']; SS> $passwrd=$HTTP_POST_VARS['passwrd']; SS> if ($username && $passwrd) SS> { SS> if (login($username,$passwrd)) SS> { SS> $HTTP_SESSION_VARS['valid_user']=$username; SS> display_page_layout(); SS> } SS> else SS> { SS> echo 'login failed'; SS> display_login_form(); SS> exit; SS> } SS> } SS> else SS> { SS> display_login_form(); SS> } SS> //check_valid_user(); ?>> SS> Any ideas. SS> PS : I am rather new to php so be kind please. SS> Regards, SS> Steve. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dynamic -> static
Dear All, Does anybody have any solutions, which makes possible to produce static pages of all dynamic cms once a day and can be easily integrated into already made site? Thank you.
Re: [PHP] dynamic -> static
The problem is actually that search engines poorly indexes dynamic content sites, so I looking for solution to produce static pages with static links from all dynamic content being formed on the fly. - Original Message - From: "Ryan Thompson" <[EMAIL PROTECTED]> To: "Veniamin Goldin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, October 08, 2003 7:46 AM Subject: Re: [PHP] dynamic -> static Do you mean something like taking a snapshot of the CMS every 24 hours or so?? If I understand you right you might want to look at a different language like perl or shell scripting. I would think they'd be more useful for that sort of thing. On Wednesday 08 October 2003 03:56, Veniamin Goldin wrote: > Dear All, > > Does anybody have any solutions, which makes possible to produce static > pages of all dynamic cms once a day and can be easily integrated into > already made site? > > > Thank you. -- Ryan Thompson [EMAIL PROTECTED] http://osgw.sourceforge.net == "A computer scientist is someone who fixes things that aren't broken" --Unknown -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] convert "\" to "/"
"\" - is an escape symbol, so you should write it twice in order to escape it self. str_replace ("\\","/",$var) "Diana Castillo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am receiving some data in which the sender has mistakenly sent urls with > "\" instead of "/" to separate directories. e.g. > http://www.anysite.com\page.htm > > I need to convert this string to > http://www.anysite.com/page.htm but str replace ("\","/",$var) doesnt work. > any ideas as to how to convert it. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] dynamic -> static
Hello Mike, Thank you for your help, As I wrote already this issue is mainly because of search engines incompatibility with dynamic content sites (to be more exact - with urls containing get parameters, in my case ex. index.shtml?lang=en&menu_id=23) Which of your described solution would you suggest for my situation ? Turck MMCache already installed. Now I need to do something with my urls. There are also problem emulating search engine friendly urls using "/" instead of "&" because I use SSI, so I can not use post method in forms, while using GET it will be a bit difficult to handle all params correctly, or I'm wrong ? Thanks again. >>Dear All, >> >>Does anybody have any solutions, which makes possible to produce static >>pages of all dynamic cms once a day and can be easily integrated into >>already made site? MM> Why do you need to do this? Is it because of hosting restrictions, MM> performance concerns, or portability/mirroring (which is a form of hoting MM> restriction I suppose)? MM> There are a number of ways to approach this problem... MM> If your sole concern is performance, judicious use of caching could be MM> your answer. You can cache your code using PHP Accelerator or Turck MM> MMCache, which helps with load times, or you can cache your data by MM> implementing a caching layer between your application and your database. I MM> believe PEAR has some classes designed for this. They basically all boil MM> down to memoizing function return values with the serialize/unserialize MM> functions, and storing those results in files. I have used this method in MM> applications to great effect - a cascading cache that stores database MM> results, page components like navigation areas, and entire pages is a MM> great performance enhancer, but you need to know how to mark and remove MM> stale data dynamically. MM> If you need a static version of your site due to hosting restrictions, you MM> can used a spider such as wget (I think has been mentioned in this thread) MM> to crawl your site and generate a local copy for you. Wget is an excellent MM> one, because it has options like --page-requisites and --convert-links MM> which make it easy to generate a self contained site mirror. This approach MM> requires that your dynamic links all have a slash-syntax, like MM> index.php/foo/bar/etc/. It's very easily implementable in a series of Make MM> rules - I use this method for www.stamen.com, where rolling out a new MM> version of the site is a simple matter of 'make clean; make live'. MM> You can also use the 'page fault' method, which is my personal favorite. MM> Let Apache's mod_rewrite handle your caching and URL-rewriting: MM> 1) user requests page foo/index.html MM> 2) if foo/index.html does not exist in filesystem, Apache knows to MM>redirect this request to bar.php MM> 3) bar.php performs actions needed to generate contents of MM>foo/index.html, and also creates the file MM> 4) bar.php returns contents of foo/index.html MM> 5) subsequent requests for foo/index.html just return that file, MM>bypassing PHP entirely. MM> This one's sort of a balancing act though. It has been suggested here that MM> you can use Apache's ErrorDocument directive to direct the request to MM> bar.php, but this has the unfortunate side-effect of returning a 404 MM> status code with the response. Not really a problem with a normal browser, MM> but when those responses are (for example) XML files used by flash, the MM> 404 causes it to error out regardless of the content of the response. A MM> better method is to use a string of RewriteCond's, like so: MM> RewriteCond %{REQUEST_FILENAME} !-f [OR] MM> RewriteCond %{REQUEST_FILENAME} -d MM> RewriteCond %{REQUEST_FILENAME}/index.html !-f MM> RewriteRule ^.*$bar.php MM> Obviously, this method is totally incompatible with any form of actual MM> dynamic content, but you're asking for ways to generate static output, so MM> I assume that's not an issue. The difficulty with this one is the same as MM> with any caching system as above - finding and flushing stale data. I do MM> this by rolling the cache deletion code into the editing functions, but MM> you can also use a cronjob to find and flush files older than some cutoff MM> time period. MM> - MM> michal migurski- contact info and pgp key: MM> sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Split array
hello ! Please help me. How do I split array so, that I'll get string variable with "," delimeter of each array value ? Thank you! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] function into string
Sorry for the dummies question, but how do I insert into string like: echo "balalala" how to insert function in the midle like : echo "balalala [trim(odbc_result($result_id,3))] aasasasas" Thank you. > - Original Message - > From: "René Moonen" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, August 07, 2001 2:02 PM > Subject: [Re: [PHP] user's ip] > > > > The problem is that REMOTE_ADDR returns the IP address of the proxy (if > > the user > > accesses the web-page via a proxy. This will allways return the IP > > address of > > the user's machine: > > > > if(getenv(HTTP_X_FORWARDED_FOR)) > > { > > $ip=getenv(HTTP_X_FORWARDED_FOR); > > } > > else > > { > > $ip=getenv(REMOTE_ADDR); > > } > > $host = gethostbyaddr($ip); > > > > > > Renze Munnik wrote: > > > > > On Tue, Aug 07, 2001 at 03:55:25PM +0530, Adrian D'Costa wrote: > > > > Hi, > > > > > > > > I am trying to get the ip address of any user browsing a particular > page. > > > > > > > > I tried $REMOTE_ADDR but that give me only the remote address. What > would > > > > be the best way? > > > > > > > > Adrian > > > > > > Okay... Help me out here... > > > You want to know someones IP-address and using $REMOTE_ADDR you get > > > the IP-address of the user. What's the problem man?!?!?! > > > > > > -- > > > > > > * R&zE: > > > > > > -- > > > -- Renze Munnik > > > -- DataLink BV > > > -- > > > -- E: [EMAIL PROTECTED] > > > -- W: +31 23 5326162 > > > -- F: +31 23 5322144 > > > -- M: +31 6 21811143 > > > -- H: +31 23 5516190 > > > -- > > > -- Stationsplein 82 > > > -- 2011 LM HAARLEM > > > -- > > > -- http://www.datalink.nl > > > -- > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Include
help me please ! I try to use include() and require() an that what i get: The path is 100% good. Warning: Failed opening '../inc/menu.inc' for inclusion (include_path='') in -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Move recordset to first record problems...
Please help me ! How to move recordset to the first record (i use to connect to database using ODBC). Thank you ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Locale Month Name
Hello ! Please help me, How to get Month name according to server's locale setings ? I tryed to use: setlocale("LC_ALL", "LT"); $month = strftime("%B", mktime(0,0,0,$m,1,$y)); But I get message: Warning: Passing locale category name as string is deprecated. Use the LC_* -constants instead. in (My PHP runes on Windows Server) Thank You. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Sybase Result Paging
Hi all ! Does anybody has a solution of paging result for Sybase + PHP ? Like <> Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]