Re: [PHP] Best place to search archives
Hay guys, Where is the best place to search the general-php archives (o; first place: http://groups.google.com/groups?hl=enlr=ie=UTF-8oe=utf-8group=php.general runner up: http://marc.theaimsgroup.com/?l=php-general olinux __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Document Indexer and Database Contents Index
Checkout htdig www.htdig.org --- [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi All, I'm looking for a PHP program like mnoGoSearch but without the need to recompile it with PHP. Does such a PHP program exist? Basically, I want the program to index file types of .doc, .txt, .html, .pdf, etc. And also the contents of a database data table. Thanks, Kevin __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] searching and replacing in a file
$filename = '/path/to/file.txt'; $contents = file_get_contents($filename); $contents = str_replace($search,$replace,$contents); $handle = fopen($filename, w); if (fwrite($handle, $contents)) { echo 'file write successful'; } else { echo 'file write failed'; exit; } fclose($handle); also - there's no need to enclose the variable $file in quotes here: $fp = fopen($file, w+); olinux --- Richard Kurth [EMAIL PROTECTED] wrote: How can I read through a file and find a string and then replace it with a new string and then save the whole file. __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] restrict access to multiple pages
I like your second solution better. (seems simpler to me to leave out the nested else...). I'd just write it this way: ?php if(!loggedin()) { // redirect to login page header (Location: http://domain.com/login.php;); exit; } ? Also check out some of these articles for some different options/ideas: http://www.google.com/search?q=php+user+authentication olinux --- Chris W. Parker [EMAIL PROTECTED] wrote: Hey y'all. Ok so I am working on the admin sectin of the e-commerce app I'm writing and I'm hoping there's a better way to do what I am currently doing. In an effort to prevent circumvention of the login page I've placed a check at the beginning of each page that basically does the following: ?php if(loggedin()) { // entire page of code goes here } else { // redirect back to login page } ? By doing this people will not be able to just enter manually any URL they want and have the page load. As far as better ways go I was thinking that maybe I could employ .htaccess somehow? But then I think that might require having user accounts registered with the server instead of just using a db and I don't want to do that. I was thinking that maybe I could change it to this: ?php // define function stored in class file // (basic auth function, not at all what i'm using. // just an example.) function IsLoggedIn($input) { if(isset($input) !empty($input)) { return 1; } else { // redirect to login page } } IsLoggedIn($input); // entire page of code goes here ? Any want to share their experiences and ideas? __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] new set of eyes?
try this: $ar = array(); while ($row = mysql_fetch_assoc($sql)) { $ar[] = $row; } olinux --- Jas [EMAIL PROTECTED] wrote: I think I am loosing my mind this afternoon... could someone review this snippit and tell me why it isn't working? $sql = mysql_query(SELECT $i FROM $table WHERE $i = $i,$db)or die(mysql_error()); while($b = mysql_fetch_array($sql)) { while($ar = current($b) != 0) { $v = array(); list($v) = explode(},$ar); } print_r($v); } I am hoping to get something like array([0]=first row of data[1]=second row of data) Any help would be great... Jas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Building a query string
I like to store my where pieces in an array and then implode. I usually load my indexed columns first. $where = array(); if ($_POST['house_id'] == yes) { $where[] = 'id = '.intval($_POST['house_id']); } if ($_POST['fireplace'] == yes) { $where[] = 'fireplace = 1'; } if (isset($_POST['garage'])) { $where[] = 'garage = '.addslashes($_POST['garage']).'; } $limit_clause = ' LIMIT 0,15 '; if (count($where)) { $where_clause = ' WHERE '.implode(' AND ',$where); } $sql = 'SELECT id, address, description FROM houses '. $where_clause. $limit_clause; olinux --- Ed Curtis [EMAIL PROTECTED] wrote: To answer the question, $query_str.= AND garage = '$garage' ; BUT. If $garage is an id (numeric), then you should use $garage=abs($garage) first in order to defeat SQL injection. If it's a string, well, say so and we'll tell you what to do (a lot to explain, and not useful if it's an ID). Bogdan All values pulled from $_POST are strings such as $garage = Attached 2 Car or Detached 1 Car, etc. There are a few options that will be based on a checkbox. If the box is checked it means you want that option included in the query as well, i.e. (fireplace == yes.) If the box is not checked it means no, i.e (fireplace == no.) Thanks, Ed __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] User/Pwd Management Package?
I'm looking for this kind of stuff myself too. patUser seems to have what I want, except from one important thing - it only seems to be able to protect content, not directories or single pages. So, if anyone know about a package that also do dir/file protection, please let me know. Take a look at PEAR LiveUser http://pear.php.net/package/LiveUser It allows you to authorize against various containers (database and XML and I think LDAP is planned). It also allows complex user/group permissions. You can setup areas and rights within those areas, rights that imply other rights... really cool. Check out the feature list on the project homepage. http://projects.21st-hq.de/liveuser/ I like this class a lot, just not sure I'm a PEAR fan (unecessary overhead). It's definitely worth checking out though. olinux __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] looking for some software (helpdesk, intranet)
I came across this site recently. Look like a good resource for intranet ideas. http://www.intranetjournal.com They recently did a quick review of a couple open source content management systems. XOOPS was one that looks kinda cool. User accounts (and permissions), forums, link gallery, news, comments and i don't know what else. But you might try it (or one another portal system). http://www.xoops.org Let me know if you find anyhting. I'm setting up a trial intranet - so far i've installed: MovableType (blog) www.movabletype.org WikiTikiTavi (wiki) http://tavi.sourceforge.net/WikiTikiTavi InvisionBoard (forums) http://www.invisionboard.com Probably will try out XOOPS or something like that as well. olinux --- Chris W. Parker [EMAIL PROTECTED] wrote: Jason Wong mailto:[EMAIL PROTECTED] on Friday, November 21, 2003 8:07 PM said: 1) State what exactly you're looking for -- what features are must-have, what are nice-to-have etc. Specifically I want users to have their own accounts with their own personal data. Right now everyone sees the same information on our intranet. Our intranet is more like an informational website than an intranet (as I understand intranets to be). Most importantly I want the users to have the ability to update the content themselves. Right now people just send me emails like will you add this to the intranet? and of course I say yes but that doesn't mean I'll be able to get to it in a timely fashion. If they can just fill out a form and upload the file that would make things A LOT better. 2) State what packages you have already looked at. Give a short evaluation of each with what you like and dislike about them. Not sure about this really. I think what I don't like is that the fact that all of the intranets I've seen are more like groupware. They seem to be made to perform the same functions Outlook or ACT! do (schedules, notes, email, etc.). The problem is that I don't need those things. However, I have looked at Group Office (www.group-office.com) and you can supposedly install only the modules you want which would allow me to not install the groupware stuff. However I've been unsuccessfull in installing it! :) Any and all suggestions are welcome, just keep in mind the requirements: * php/mysql * free Thanks, Chris. -- Don't like reformatting your Outlook replies? Now there's relief! http://home.in.tum.de/~jain/software/outlook-quotefix/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] LAMP jobs
For $$$ or for the love? here's a start: For the $$$ http://www.elance.com http://www.scriptlance.com http://www.rentacoder.com For the love? sourceforge.net freshmeat.net pear.php.net olinux --- Susan Ator [EMAIL PROTECTED] wrote: It seems like this question came up before. Is there a resource for people looking for jobs working with open source products (LAMP specifically)? Thanks, susan __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need a nicer way to escape single/double quotes....
--- Scott Fletcher [EMAIL PROTECTED] wrote: Hi Fellas! I haven't found a more efficient way to better escape the quote characters for the javascript right from PHP because I only get The kid in the javascript alert message, so I'm wondering if anyone of you know of something better than that... --snip-- form name=Test_Form ? $test1 = The kid's name is \Bob!\; $test1 = addslashes($test1); echo input type='hidden' name='htmlTest1' value='.$test1.'; echo script type='text/javascript'; echo alert(document.Test_Form.htmlTest1.value);; echo /script; ? /form --snip-- I'm a fan of dropping out of PHP to output static html/js etc. This is especially good practice when you have large blocks of html/etc. i.e. form name=Test_Form ? $test1 = The kid's name is \Bob!\; $test1 = addslashes($test1); ? input type='hidden' name='htmlTest1' value='?=$test1?' script type='text/javascript' alert(document.Test_Form.htmlTest1.value); /script /form I prefer using single quotes when assign string values. PHP doesn't have to evaluate inside single quotes. It's much easier to edit/add/read html code that's not polluted with escaped quotes Syntax highlighting makes it easier to spot variables $bob_age = time() - $birthday_timestamp; $test1 = 'The kid's name is Bob!'; $test2 = 'He is '.$bob_age.' seconds old'; olinux __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] High bandwidth application tips
[snip] I fourth the thing about database access. As long as you realize that reading from disk isn't the fastest thing around either. Make sure you reduce the number of files to be read to as little as possible. And output with something like readfile() to prevent the files being loaded into memory. [/snip] A filesystem hit is a filesystem hit whether your requesting a php file or an image for a button. If you are worried about filesystem hits then shouldn't you also be worried about uneccessarily using GIF's etc. in your page layouts. Likewise cleaning up bloated HTML code and properly using CSS can cut down page filesizes dramatically, saving bandwidth for the server and clients. If users are potentially using dialup, cutting 20K off your pages will make them a lot happier than shaving a couple tenths of a second off the backend processes. (not saying you should not be performance focused on the backend as well.) olinux __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sessions within new windows
If, as Chris wrote, this is indeed a feature/bug of IE, then it must be configurable somewhere, though I'm lost as to where that might be. Does anyone have any ideas how this could be controlled via IE's settings? I've experienced a similar problem on a php based system I use. I don't know what their code looks like. I think its an IE issue though - windows update always fixes the problem for me. http://windowsupdate.microsoft.com olinux __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Code optimization: single vs. double quotes?
No special chars or vars: echo 'td bgcolor=\'#ff\'nbsp;/td/tr'; For cases with vars and special chars, I think these look terrible: echo 'td bgcolor='.$bgcolor2.'nbsp;/td/tr'; I'm a fan of this style - works great with syntax highlighting in homesite. olinux echo td bgcolor=\$bgcolor2\nbsp;/td/tr; Whereas this is clear and easy to work with: echo td bgcolor='{$bgcolor2}'nbsp;/td/tr; __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Code optimization: single vs. double quotes?
--- Chris W. Parker [EMAIL PROTECTED] wrote: I've always been a big fan of: echo td bgcolor=\$bgcolor2\nbsp;/td/tr; uggh - apparently you've never had to redesign a site/application that uses this style. This is one table cell, but when you work this style through a big app, it's a huge pain (waste of time) to make any changes. olinux __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Choosing a CMS?
Check out this site for live demos of several different cms projects http://www.opensourcecms.com. olinux --- Joel Konkle-Parker [EMAIL PROTECTED] wrote: I'm looking for an open source PHP/MySQL CMS that I can use as the backend to my website. My site consists of multiple quasi-independent sections, each with its own subdomain, that should be able to function as seperate sites. The range in style from blogs to articles to file libraries, but all share a consistent global menu system, footer text, 3-column layout, et c. I've looked at PHPNuke, just because that's the only thing that jumps to mind, but I want to make sure I'm not missing anything before I dive in with it. What are your suggestions? Is there anything better than PHPNuke for this type of thing out there? __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] hotscripts style program
here's a decent article outlining how to build a directory. including code samples: http://www.webreference.com/perl/xhoo/php1/ olinux --- Marek Kilimajer [EMAIL PROTECTED] wrote: You need to create a recursive function: // pseudo code function count_content($cat_id) { SELECT COUNT(*) FROM content WHERE cat_id='$cat_id' $count=sql_result(); SELECT cat_id FROM categories WHERE cat_id='$cat_id' while($cat_id2 = sql_result()) { $count += count_content($cat_id2); } return $count; } Ryan A wrote: Hey, Anybody have any code or links to explain how to make a program like the one running on hotscripts? eg: when you visit there you have a couple of categories like : ASP, JAVA, PHP etc (if you select php) PHP --Scripts --Books --tutorials (if you select scripts) --Scripts category1(324) category2(24) category3(54) etc the number in brackets at the side of the category says how many records I downloaded PHPlinks but have been unable to understand it. Another good place that i visited was http://www.hotscripts.com/PHP/Scripts_and_Programs/Software_Repository/index.html and even searched on google but cant find much. Any help appreciated. Thanks, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cleaning up my messy code
Try out smarty (its quite simple). You will get some ideas on how to structure. I learned that its *ok* to have some *display logic* in your templates (i.e. repeating rows). (yes, some will adamantly disagree) Another thing i learned when using smarty is I like using arrays to keep things organized. i.e. $article['id'], $article['title'], $article['publish_date'], $article['author'], $article['content'] rather than $id, $title, $publish_date, $author, $content olinux --- Chris [EMAIL PROTECTED] wrote: I am working on a fairly large scale (for myself anyway) project using PHP and MySQL. I am victim of teaching myself to program, not separating presentation from my code-- all the things that lead to masses of spaghetti code so atrocious even I can't figure out what I was doing an hour ago. I'm not looking for an IDE or code generator so much as some practical advice for organization and framework when developing a larger app. I know of PHP Fusebox, having programmed with Cold Fusion fusebox for a while, but it seems like that might be too much. Maybe I just need a sensical, practical approach to application layout. What do you all do? How can I learn to be a better PHP programmer in this regard? c __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] google style paginating
PEAR::DB_Pager is a good example of how to do this. The getData function is all you need. http://pear.php.net/DB_Pager http://cvs.php.net/co.php/pear/DB_Pager/Pager.php?login=2r=1.4 olinux --- Ted Conn [EMAIL PROTECTED] wrote: Hi I am new to this newsgroup and I plan on replying to all the posts I can for now... but Id like to start out by asking a question. I am trying to paginate my sql results in 10 by 10, which I have been able to do no problem. but what I want to do is have the pages layed out in google style with (1)(2)(3)(4) etc etc and each one is clickeable that will take you to that page. I'll show you the code I am using now for next and back buttons... __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Associative to Numeric
http://www.php.net/array_values http://www.php.net/array_keys --- Gerard Samuel [EMAIL PROTECTED] wrote: What would be the quickest, most reliable means to convert an associative array to a numeric array. Running an implode()/explode() combination comes to mind, but reliablity can be questioned when it comes to deciding a delimiter, since, the data can possibly contain any character. Any suggestions are welcome. Thanks __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] email confirmation script
Read the manual notes for mail() and find out how to send html messages. www.php.net/mail or better - just send a text message make your link shorter though so the link won't break. olinux --- Anthony Ritter [EMAIL PROTECTED] wrote: This is what I receive via e-mail after I click submit using the following code. As you can see - the html attribute a href= shows up and the whole string in linked. All I was looking for is a link to the URL and the word - Click - to be underlined showing the link. Additionally, the value (as in key/value) part of confirmation_ID is nowhere to be found in the query string. Thank you for any assistance. Tony Ritter . // This is what I get back via e-mail: - Original Message - From: Us To: [EMAIL PROTECTED] Sent: Thursday, August 14, 2003 2:04 PM Subject: Thank you for registering Thank you for registering tony a href=http://www.gonefishingguideservice.com/[EMAIL PROTECTED] efishingguideservice.comconfirmation_ID=Click/a - /*the .html form which takes a name and an e-mail address */ html body form action=process_a.php method=post p Your name:br input type=text name=namebr Your e-mail address:br input type=text name=emailbr input type=submit name=submit value=submit /body /form /html ... /*process_a.php: which receives the name and email variables. The script then tries to then send the note back to the user with a link - called CLICK. When the user hits the link to email_verify.php the email address is inserted into the database*/ ? $msg = Thank you for registering $name\n\n; $msg .= a href=\http://www.gonefishingguideservice.com/email_verify.php?email=$email; confirmation_ID=$confirmation_IDCLICK/a; $secret_variable = something_only_you_know; $confirmation_ID = md5($email.$secret_variable); $to=[EMAIL PROTECTED]; $subject=Thank you for registering; $mailheaders=From: Us; mail($to,$subject,$msg,$mailheaders); ? . // email_verify.php ? if ($_GET['confirmation_ID'] = md5($_GET['email'].$secret_variable)) { // insert the user into the database } else { // display an error message } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: classes v. functions
I'm quite new to OOP myself, but these two articles helped my understanding a lot See the sidebar - Classes and Object Oriented Programming http://webreference.com/perl/xhoo/php1/5.html Taking PHP the OO way http://phpmag.net/itr/online_artikel/psecom,id,284,nodeid,114.html olinux --- Sam Baum [EMAIL PROTECTED] wrote: Hi, am Friday 18 July 2003 23:08 schrieb Andu: This may show my ignorance or my refusal to take for granted something I don't fully understand but I have a hard time figuring out the advantage of using classes as opposed to just functions. I am certainly new to php and at first sight classes seemed to cut a lot of corners but so do functions (with which I have more experience). The more I read about classes the deeper the confusion. Anyone can enlighten me? Im programming for a few years now in PHP. After trying to use classes i dont see their point either. In most cases if i need a class-like structure i do something like this: function thing_new() { return ++$GLOBALS['thing_resource']; } function thing_put($stuff, $res=NULL) { if (is_null($res)) $res = $GLOBALS['thing_resource']; $GLOBALS['thing_stuff'][$res] = $stuff; } function thing_get($stuff, $res=NULL) { if (is_null($res)) $res = $GLOBALS['thing_resource']; return $GLOBALS['thing_stuff'][$res]; } Because there is no constraint to be more OO like in Java it doesnt makes sense. And this way you are more flexible. bg Sam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] osCommerce and modifications
you should check out http://www.x-cart.com Their pro cart looks like it will handle what you want. Not free, but you do get the source code. Plus it uses smarty (smarty.php.net). Right now I am working on an osCommerce project and while it is a great project I cannot believe it has come so far without any template system. olinux --- Edward Peloke [EMAIL PROTECTED] wrote: thanks Richard, I will take a look. osCommerce does a create job of creating an online marketplace. The problem is to add items, you need to go through the admin pages. We need to be able to allow users to add items, sort of like ebay without the auction. __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie Directory question
You can set any directory as the web root in apache's httpd.conf file. You might also want to check out the virtualhost directive. (there's an example in the default httpd.conf file) http://httpd.apache.org/docs/mod/core.html#documentroot http://httpd.apache.org/docs/mod/core.html#virtualhost olinux --- [EMAIL PROTECTED] wrote: I'm wondering if there is a way to have your php development files in another directory other than htdocs when using apache. Similar to the virtual directories IIS uses. __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Authentication system
there's a good example in this article A Complete, Secure User Login System by Tim Perdue http://www.phpbuilder.com/columns/tim2505.php3 olinux On 2 Jul 2003 at 13:00, Mike Migurski wrote: You may find it easier to include, in the e-mail, a uniquely-generated, limited-time URL that the person can visit to verify that they have received the e-mail. This will remove the burden of having to set up a system that responds to e-mail commands. Thanks, Mike. I think my brain is working undertime at the moment. Can you give me an example? (Or point me in the direction of one?) Doug __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] Compiling 4.2.3 with MySQL ... what does it look for?
try --with-mysql=/usr --- -{ Rene Brehmer }- [EMAIL PROTECTED] wrote: X-posted to PHP General, PHP DB, and MySQL Hi gang Attempting to get my Linux test-server working, but ran into a problem when making PHP... System is RedHat 8, Apache 1.3.27 (compiled myself, tested OK), MySQL 4.0.13. The Apache 2.0.40 and PHP 4.2.2 that came w. RH8 didn't work correctly, thus I've ventured into my own creation. Trying to build PHP 4.2.3 (because that's what my webhost runs, so need that version to test correctly) w. support for MySQL. Running ./configure --with-mysql=/[path to mysql] --with-apxs=/[path to apxs] Found the path to the apxs to be /usr/local/apache/bin/apxs, but for the life of me I cannot figure out what path to give it for MySQL. I installed MySQL from the the RPM files: MySQL-client-4.0.13-0.i386.rpm MySQL-devel-4.0.13-0.i386.rpm MySQL-embedded-4.0.13-0.i386.rpm MySQL-server-4.0.13-0.i386.rpm MySQL-shared-4.0.13-0.i386.rpm client and server first, the rest second ... used --force to get them in, because it complained about version issues with the one already there (even though the package manager was told not to put the Mysql in, it still put MySQL 3.something in...) When doing the configure above, I get this error: configure: error: Cannot find header files under /usr/include or whatever path I give it ... I'm having a hard time figuring out where the RPM puts everything, and an even harder time figuring out what path to stick to PHP ... Some detective work gave me these paths: MySQL (bins): /usr/bin /usr/share/mysql MySQL daemon (mysqld): /usr/libexec /usr/sbin MySQL headers (.h): /usr/include/mysql I've tried them all, but they all result in the above error. Anyone care to guess which path I should give to the configure? Or is it something else that causes this? I haven't ever used MySQL before, or any other SQL for that matter, so got 0 experience in getting the system up and running with it... TIA Rene __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.net's custom 404 scripts
here's a couple: Custom Error 404 Documents with PHP http://www.phpfreaks.com/tutorials/21/0.php Creating Custom PHP 404 Error Pages http://www.phpbeginner.com/columns/ray/404/1 depending what you are doing this might help too ... Building Dynamic Pages With Search Engines in Mind http://www.phpbuilder.com/columns/tim2526.php3 olinux --- Justin French [EMAIL PROTECTED] wrote: Hi all, I used to have a bookmark for how php.net's custom 404/redirect/search script worked, but I can't find it now, and can't see it on php.net... has anyone got a link? Not sure if it was on zend.com or php.net. TIA Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] shopping cart and login system
hi --- electroteque [EMAIL PROTECTED] wrote: hi there , i am about to build a shopping cart which will interact with a paypal payment system , the cart will use sessions to store the items and basket information before checking out and posting to the paypal form , what i'd like to know is would the cart require a login system to track users and to prevent ppl from making dodgy orders , if pure simplicity is a goal, i dont think you need a login for customers. who cares if they add items and then dont purchase. obviously they would not be able to log in again to see the previous orders or current order status but you could always implement later. if not can a session easily be hijacked at all ? easily? i dont think so can it be done? sure better still is there anyone out there who has intergrated their users with the paypal login, so say they login to your shopping cart to start making payments they are alreayd logged into paypal aswell this would be ideal :D I'm sure you already tried hotscripts.com - maybe paypal has a developer section similar to amazon? but i would guess that they dont want people routing their passwords thru other websites. __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting file contents
you could do something like this $buffer = ''; $fd = fopen($filename, 'r'); while (!feof($fd)) { $buffer .= fgets($fd, 4096); } fclose($fd); a better option would probably be to make your text file a php file and echo your value where you want them ? // php code here include 'mytemplate.php'; ? note: whatever you include will be parsed if it has php tags, regardless of the file extension olinux --- Matt Palermo [EMAIL PROTECTED] wrote: I have text a file which contains php code. I am using it as a template for some other pages. I want to take everything in that file and store it in a string or array and then output it all to an empty file (this will make both files look exactly the same). I am using the file_get_contents() function to do this, but it seems to have trouble because it looks like it is trying to execute the php code in the file I am trying to get. Anyone know of a better way to go about this? Thanks. Matt __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Administration packages
I'm sure you are already aware of PEAR, if you havent checked it out, you should olinux Hey everyone, I find myself building alot of admin control areas, or in otherwords, a group of forms that lets an end user control data and appearances of his/her site. What I am looking for is a package of classes/functions that will help me automate and modularize this process a little more. I am not looking for a complete system, just a framework from which I can build. Thanks alot, Christian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Classes vs. functions?
Here is an excellent article describing classes/objects - what they are and are not. http://phpmag.net/itr/online_artikel/psecom,id,284,nodeid,114.html olinux Can someone please explain to me when is a class useful over a set of functions? __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help about these algorithm methods
Here's an article that covers tree and stack http://www.evolt.org/article/Four_ways_to_work_with_hierarchical_data/17/4047/index.html olinux --- [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello all, I need help about to implement these methods in PHP: 1) Tree (Arbol) 2) Queue - FIFO (Cola) 3) Grafo 4) Linked lis - (Listas enlazadas o ligadas)) 5) Stack - LIFO - (Pila) If someone know about a web site that explain these in PHP, I will appreciate it, thanks for all your help :), bye. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Search Engines and Last-Modified Header (was: Variables don't pass...)
I think this is very important for dynamic site developers to understand. I'm very interested in learning more about this and I think we could all benefit from anyone with solid search engine experience. I run a site with about 18,000 news articles. They are stored in database and dynamically generated (some template elements update weekly). Since these articles are mostly static once published, I generate a last-modified header using the article publish_date (and zero's for the hour/min/sec). This last-modified header is also used by the internal search engine (ht://Dig) to make articles searchable by date. I'm finding that even though google indexes the site daily and grabs stories for their news.google.com MANY of my pages are not appearing in the google index. It appears that these are not being updated in their cache either (only a couple months of data to go on). I'm quite knowledgable on search engine optimizing etc. but this has me confused. To make sure that google re-indexes every month. I have thought of sending a last modified header using year/month/day of article and a random hour/minute/second. but if this random hour/month/second is earlier than the one already indexed it does not get indexed? olinux On Wed, 28 May 2003 09:31:11 -0500, Jay Blanchard wrote: I wouldn't go as far as using the auto_prepend_file. Neither would I in this case Jay.It was simply an example of what could be done, not necessarily what SHOULD be done. I did however, use auto_prepend_file in a .htaccess file for a somewhat similar case. I have a site with about 90 pseudo-static pages (the page is static but I use PHP to include the header and footer) and a handful of fully dynamic pages. I REALLY want this site to be regularly updated in the search engines but, unfortunately, many search engines only spider pages that are newer than what they have in their database. Since PHP is dynamic, it doesn't report a Last-Modified header so the search engine doesn't think anything has been updated. Hence stale search engine results. To force all of the pages (both pseudo-static and dynamic) to generate a Last-Modified header, I set up prepend.php script which is configured as a directory level (.htaccess) parm to auto_prepend_file. Here is the content of prepend.php. ?php header( Last-Modified: . gmdate( D, d M Y H:i:s, filemtime( $_SERVER['SCRIPT_FILENAME'] ) ) . GMT ); ? For my truly dynamic pages, I figured out that only the last call to header actually shows up in the real header that makes it to the browser (or search engine), so I can create a more unique Last-Modified header as part of the dynamic pages (like when the database is updated or whatever makes sense) and it will overwrite the automatically generated one. __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Nested select options from database.
--- Krista [EMAIL PROTECTED] wrote: Hi everyone, Is it possible, using just PHP, to pull a select menu from a DB, then when the person makes a selection have it populate a second drop down select menu, and again for a third one? Would javascript need to be involved here to keep it all on the same page? No but you could retrieve all of this information at once and use it in your javascript I'm in pretty desperate need of some code that can do this to select categories for products to go into, and I'm not sure how to make it work. There are way too many categories to have top level, second and third in the same drop down anymore - we only want people to be able to add the products to the third level. here are a several options http://www.jsexamples.com/example/?ex=290mode=2 http://www.jsexamples.com/example/?ex=728mode=2 http://www.jsexamples.com/example/?ex=536mode=2 http://www.jsexamples.com/example/?ex=458mode=2 olinux __ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] webeditor
Here's another that was posted recently. looks cool. http://www.interactivetools.com/products/htmlarea --- Miles Thompson [EMAIL PROTECTED] wrote: http://www.editworkspro.com/index.php I've not used it, and it requires IE - but the demo was impressive. Miles At 11:21 AM 3/28/2003 -0800, Daniel Guerrier wrote: Does anyone know of an open source webeditor that I can use to enter information into a text area field. I have a custom CMS and I would like to add webeditor functionality to the textarea fields __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Select email addresses from MySQL
You probably have other fields in the same table that the client can use to select these people. find out exactly what he wants. It may be something like I want to be able to send to a specific state or profession so build a form that allows him to select the approriate filter. You might also set up groups so that the client can group the contacts. something like users user_id | email | city | state | blah groups group_id | group_name | group_description users_groups user_id | group_id then your client could specify the group to send to and you would use a JOIN to grab the approriate matches. olinux --- Tim Thorburn [EMAIL PROTECTED] wrote: Hi, A few days ago I posted a question about sending mass emails through PHP - the good news is I've got my script sending an email to each address stored in my MySQL database. Now my client would like the ability to individually select the email addresses that are sent out. Has anyone done something similar to this? Any pointers to offer? Right now I'm thinking that I'll display all the email addresses stored in the database with check boxes beside them, then only those addresses which are checked will be sent ... however, I'm not sure if that's the best or most efficient way to handle this ... the more I think about it the more I think that's going to make it overly and unnecessarily complex. Any thoughts? Thanks -Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] Making tree menu
There are two ways that I know of the adjacency model and nested sets. adjacency model uses a table structure like category_id | parent_id | category_name so if i want to see all categories belonging to category 12 - SELECT * FROM cat_table WHERE parent_id=12; there are a few articles out there on this. not sure where at the moment, but you know what its called now. here are some articles about the nested set model. A little more difficult but with great benefits - http://www.dbmsmag.com/9603d06.html - http://searchdatabase.techtarget.com/tip/1,289483,sid13_gci537290,00.html - http://searchdatabase.techtarget.com/tip/1,289483,sid13_gci801943,00.html olinux --- Daniel Harik [EMAIL PROTECTED] wrote: Hello guys I make following query: mysql SELECT b.type, a.link AS parent_link, b.link AS child_link FROM bookmarks AS a, bookmarks AS b WHERE a.id = b.parentid order by parent_link; and here is result ++-++ | type | parent_link | child_link | ++-++ | link | MAIN FOLDER | http://www.ee/ | | folder | MAIN FOLDER | SUBFOLDER | | link | MAIN FOLDER | http://www.google.com/ | | link | SUBFOLDER | http://www.amazon.com/ | ++-++ I just can't figure out how can i produce tree style output with php MAIN FOLDER - - http://www.google.com/ - http://www.ee/ - SUBFOLDER - http://www.amazon.com/ Any help would be greatly apreciated. Have a nice day. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cleaning user data
You can also use basic functions like is_numeric() [to make sure the value is numeric - duh] or a custom function to do something like check for a valid email address format. I have a news site that explodes the URL to get values for the directory/article it is supposed to display. since the types of articles are limited, I just use an array of these values and check that the piece that I have matches one of them. URL example /news/php/123.htm $article_types = array(php, javascript, perl); $url_array=explode(/,$_SERVER['REQUEST_URI']); //BREAK UP THE URL PATH USING '/' as delimiter $article_type = $url_array[2]; // php $article_id = str_replace('.htm','',$url_array[3]); // 123 if ( (in_array($article_type, $article_types)) is_numeric($article_id) ) { ... query for article and display ... } else { ... display 404 error ... } rotsky wrote: I'd like to canvas opinions about what's needed to clean user input. I'm using an HTML form where users enter simple things like name and phone number, but also a couple of small text areas for address and a message (up to 50 words or so). How would people recommend cleaning this data when it's received (via $_POST) in the next page? Some fields (like email) I can check against a template using ereg(), but the text areas pose more of a problem. I assume running strip_tags() might be a wise precaution, and maybe also htmlentities(). Anything else? I'd be interested to hear what other people do. a+ Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] User Authentication
use: $_SESSION['ses_name'] = 'something'; $_SESSION['ses_pass'] = 'something'; $_SESSION['ses_level'] = 'something'; instead of: session_register(ses_name); session_register(ses_pass); session_register(ses_level); All $_SESSION entries are automatically registered. See the following for more info http://us2.php.net/manual/en/security.registerglobals.php http://us2.php.net/manual/en/function.session-register.php olinux --- shaun [EMAIL PROTECTED] wrote: Chris Shiflett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] --- shaun [EMAIL PROTECTED] wrote: Using the following code I am able to authenticate which type of user is visiting my page, however if I try to log in again with a different type of user the session variables still assume that the original user was logged in, is there a way to reset the session variables, I have tried session_destroy() and session_unset() but without success... ?php require(dbconnect.php); // Assume user is not authenticated $auth = false; // Formulate the query $query = SELECT * FROM WMS_User WHERE User_Username = '$_POST[username]' AND User_Password = '$_POST[password]'; // Execute the query and put results in $result $result = mysql_query( $query ) or die ( 'Unable to execute query.' ); // Get number of rows in $result. $num = mysql_numrows( $result ); if ( $num != 0 ) { // A matching row was found - the user is authenticated. $auth = true; //get the data for the session variables $suser_name = mysql_result($result, 0, User_Name); $suser_password = mysql_result($result, 0, User_Password); $stype_level = mysql_result($result, 0, User_Type); $ses_name = $suser_name; $ses_pass = $suser_password; $ses_level = $stype_level; session_register(ses_name); session_register(ses_pass); session_register(ses_level); This is the moment where you lose your new session data. You need to register your session variables before you use them. At this point, PHP retrieves the session data that is saved for you, and you lose all of the stuff you did above. Chris = Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ sorry but you have lost me, surely the session_register(); function is storing what I have done above this point, if not then how would I store the new values instead? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Project for a newbie (me) or for hire?
This might be helpful as well. http://www.databaseanswers.com/data_models/hotels/index.htm olinux --- Dan Sabo [EMAIL PROTECTED] wrote: Hi, I have a huge potential project and I'm fairly new to PHP. I've been managing shopping carts for years for people, Miva Merchant, doing sites, etc., but would like to try my hand at a custom PHP cart if possible. I Was wondering if for the project requirements below ... a.) Any PHP ready made scripts already exist for the something similar to the below requirements, for sale or free, that I could modify, customize, etc. Something with a GUI admin page like PHPbb would be great. Or b.) If any PHP coders reading this might be interested in quoting this job, or c.) Can anyone point me towards any books, sites, etc that would have a how to, or sample scripts, snippets of code, etc geared towards the below project that I myself could use to do this project myself? What I'm looking for is a hotel reservation system, just for a small bed and breakfast, six rooms. It would enable a potential hotel guest to rent a room on either one or a consecutive block of dates. Using a click able calendar tied to the payment system. Once the renter is ready to pay via credit card, the code would generate a price and then go into a simple shopping cart where the customer can enter in his billing info and pay by credit card. Maybe the same customer could rent more than one room with the same date ranges, or on the same order rent different rooms for different dates, and date ranges, etc., with discounts available for quantity purchases of either rooms, or extended date ranges, or both. Also with the ability (for me) to set discounts differently (in the code) depending on if a customer rents more than one room, or more than one day, and extra discounts for renting multiple rooms only, multiple days only, and also additional discounts for renting both multiple rooms and multiple days, like for a convention. With ability to set my own discounts in various ways, i e depending on length of stay, number of rooms rented, number of days, etc etc, etc. I'd like it so that a customer could place a deposit on a room or group of rooms for the reservation, with the administrator (me) able to set the required deposit depending on what the price range is for the reservation, i e, a percentage of the purchase price of the total order. This option is not absolutely necessary but it would be a very nice feature. I need a service fee for cancellations, with variable cancellation fees settable by me, which depend on both the closeness of the reserved date to the cancellation and the amount of the sale, independently. The cancellation would be automatic, so that if a customer cancels a reservation, they are auto refunded on their CC either their deposit or paid in full price, minus a pre cancellation fee which is variable, with the ability to set that cancellation fee depending on the total sale price. Is this do able by a newbie with lots of gumption and the right books, snippets? I already have Wellings PHP and MySQL web Development and Professional PHP 4 Wrox. I read on another forum that there is a book written for Dreamweaver MX and a sample project is a hotel reservation system in PHP, but I use Go Live 6 and don't want to waste the money on that one. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Do query strings get spidered by Google?
A better solution - make your pages look like static html pages: Search Engine Friendly PHP Pages http://zend.com/zend/spotlight/searchengine.php Search Engine-Friendly URLs http://www.sitepoint.com/article/485 How can I pass variables to a script in the url like /script/var1/var2? How can I pass variables in a form that won't scare off search engines? http://www.faqts.com/knowledge_base/view.phtml/aid/124 Apache ForceType Docs http://www.apache.org/docs/mod/mod_mime.html#forcetype I even add a .htm to the article id and then do a str_replace(). Remember to make sure that you are doing some type of validation of the data that is being passed via the URL. olinux --- Mike Hillyer [EMAIL PROTECTED] wrote: Hi All; I am trying to decide how to lay out a site with a lot of articles, and I am wondering if query strings get spidered by Google. I was thinking it would make for an easy search engine if I could put the articles in fulltext searchable MySQL columns, but I do not want to lose the ability of search engines to spider them. Otherwise, I believe there is a way to convert the quert string to a trailing / so it looks like directory structure, does anyone have info on that? Thanks, Mike Hillyer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Get data from 5 tables
SELECT * FROM table1, table2, table3, table4 WHERE id = 1 AND table1.id=table2.id AND table2.id=table3.id AND table3.id=table4.id AND etc. or you can use a JOIN http://www.mysql.com/doc/en/JOIN.html --- Osman Omar [EMAIL PROTECTED] wrote: Hi, How do I query to get data from 5 tables with same id. (id=1). eg, table1 id data 1 blue 2 green table2 id data 1 yellow 3 green table3 id data 1 black 4 white etc. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with Arrays
and what problem is that? how about just using the example? http://www.php.net/manual/en/function.file.php $lines = file ('http://www.example.com/'); // Loop through our array, show html source as html source; and line numbers too. foreach ($lines as $line_num = $line) { echo Line #b{$line_num}/b : . htmlspecialchars($line) . br\n; } --- Pushpinder Singh Garcha [EMAIL PROTECTED] wrote: Hello all I am having some problem with arrays THIS IS THE PHP CODE $temp = file(file.txt); if(!$temp) { echo File could not be read by array !! br; exit; } else echo Array was opened !!brbr; $x = count($temp); echo Array Count is: $xbrbr; echo $temp[0]br; //$P = str_replace(\r\n, \n , $temp); echo brFirst: $temp[0]; $P_new = explode( ,$temp); echo brNext: $P_new[0]; THIS IS THE TEXT FILE CALLLED ''file.txt'' abc111 asd123 aqw234 www234 edr234 vfr456 When I echo $temp[0] ... I get abc111 asd123 aqw234 www234 edr234 vfr456 on one straight line, which is weird. I should get it on separate lines.. Also I am unable to separate the lines of the file using the explode(). Any help will be highly appreciated --Pushpinder Pushpinder Singh Garcha _ Web Architect __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Flash interaction with PHP
never used php and flash but a quick search and you would have found these. http://www.polar-lights.com/fla/url.html http://www.phpbuilder.com/columns/hill20011214.php3 http://www.flashkit.com/tutorials/Dynamic_Content/ --- pei_world [EMAIL PROTECTED] wrote: do you know how to load the variables from php automatically when the flash start? I need to stick the loadvariable into a button click action,which is not what i want. thx -- Sincerely your; pei_world ( .::IT::. ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamic website screenshot/screen capture
right - I was thinking more along the lines that php would loop thru URL database and then trigger IE somehow (have to be on windows box but not production server) The macro idea sounds like the best bet. Thanks olinux --- Justin French [EMAIL PROTECTED] wrote: on 22/02/03 5:55 PM, olinux ([EMAIL PROTECTED]) wrote: Hi all - While I know that this is not possible with PHP alone, Does anyone know how to capture website screen shots using PHP. I have recieved many spam mails featuring a screen shot of our company website and I imagine that it would be quite possible combined with some sort of web browser. I doubt PHP will have anything to do with it... My guess is there MUST be some form of automation/macro tool available on Windows or Linux, which enables you to load a URL in a browser, and take a screen shot. I get the feeling it could also be done with AppleScript on the Mac. Afterall, PHP, Perl, etc aren't a browser. But it's possible that PHP can trigger a command-line program to do the above. Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Printer Friendly page
make your own. what could be simpler? If you have data that is generated with php, just change the output to just send very basic html page. olinux --- Sebastian [EMAIL PROTECTED] wrote: Greetings all. I am looking for a simple print page script. I tried just about all the print scripts at hotscripts.com and not one works (at least for me). Does anyone know of one that works under php v 4.2.3 with register globals off? thanks in advance. __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] user registration system
this is decent A Complete, Secure User Login System by tim perdue http://phpbuilder.com/columns/tim2505.php3 and of course - hotscripts.com --- Dennis Gearon [EMAIL PROTECTED] wrote: Anybody know of a good user registration system, using emailed web addresses for verification of email address? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dynamic website screenshot/screen capture
Hi all - While I know that this is not possible with PHP alone, Does anyone know how to capture website screen shots using PHP. I have recieved many spam mails featuring a screen shot of our company website and I imagine that it would be quite possible combined with some sort of web browser. It would be great for a couple projects I'm working on to use this in the same style as alexa.com. (featuring screenshots next to search results.). thanks for any info! olinux __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php ecommers site
OS Commerce is pretty popular and will do all you ask http://www.oscommerce.com There are lots of quality options, both open source and commercial Here's a couple links to get you started http://www.hotscripts.com/PHP/Scripts_and_Programs/E-Commerce/Shopping_Carts/ http://php.resourceindex.com/Complete_Scripts/Shopping_Carts/ olinux --- Chris Knipe [EMAIL PROTECTED] wrote: Lo all, Is there any good already developed PHP based commerce solutions out there? I'm preferably looking for something with catalogues (product pics, descriptions, ratings, buyer comments, etc), online payment options, xml support (to sell via partners for example), etc etc etc. Thanks, -- me -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with authentication 'design'
You may want to check out PEAR::LiveUser http://pear.php.net/package-info.php?pacid=126 http://projects.21st-hq.de/liveuser/ A very complete / multilevel authentication package. Get the latest source from CVS as the source on pear site is a bit outdated. olinux --- Clarkson, Nick [EMAIL PROTECTED] wrote: Hi, I've searched the archives, bit it's not helping me much purely because it's not specific PHP code I'm after, but rather help with a login system design. So far I've got a PHP_AUTH based login which checks against a MySQL database, and if the user's details are correct it updates the database with their IP and login time, then creates sessions variables for their username and security level (for admins, mods etc). However, the more I read, the more I worry about security, so I want to try and get this as good as I can possibly get it with security my main concern. What I hope to achieve is some reusable code. All the tutorials and sample code I look at say don't use this in a production environment because it's not secure. When I'm happy with what I've got I'll make the code available, hopefully this will be a joint effort and any credit will be given. So far the steps I have are; Set $auth to false Are PHP_AUTH_USER and PHP_AUTH_PW set ? Yes - Connect to database check user/pw exists in database if they do then set $auth to true Is $auth false ? Yes - Display login box with header(); No - update database with ip and time create sessions variables forward to next page I'm after two things; ideas for a better (more comprehensive) design and potential security holes. Are sessions a bad idea ? Should I store them in my database ? Is the initial HTTP authentication a bad idea (because of either security or browser compatability) and can I make the HTTP authentication more secure ? Should I stick with a regular login form ? Is checking for a username session variable on each following page enough ? Hopefully this is relevant here. Thanks, Nick This private and confidential e-mail has been sent to you by Egg. The Egg group of companies includes Egg Banking plc (registered no. 2999842), Egg Financial Products Ltd (registered no. 3319027) and Egg Investments Ltd (registered no. 3403963) which carries out investment business on behalf of Egg and is regulated by the Financial Services Authority. Registered in England and Wales. Registered offices: 1 Waterhouse Square, 138-142 Holborn, London EC1N 2NA. If you are not the intended recipient of this e-mail and have received it in error, please notify the sender by replying with 'received in error' as the subject and then delete it from your mailbox. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] internal site search
Option 2b. - there are several great open source site indexers available. I really like htdig http://www.htdig.org. mnogosearch http://www.mnogosearch.org is another often mentioned. Search Tools for Web Sites and Intranets http://www.searchtools.com Open Source Search Engines http://www.searchtools.com/tools/tools-opensource.html olinux --- David Otton [EMAIL PROTECTED] wrote: On Tue, 18 Feb 2003 13:35:14 +, you wrote: i wanna make an internal site search, i wanna search my internal html pages and php pages..and i have no clue how to do thatany help!!! Choices 1. Embed a Google search that only searches within your site. Eg http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=search+engines+site%3Ayahoo.com 2. Buy an off-the-shelf product that will spider your site locally and create an index 3. Do your own plain-text search against your database (eg http://www.mysql.com/doc/en/Fulltext_Search.html) If you have significant content outside the database, you'll have to search the HTML, too. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: date calculation
If you're using a database, it may be able to take care of this for you. If you're using mysql: 6.3.4 Date and Time Functions http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#Date_and_time_functions olinux --- Fred Merritt [EMAIL PROTECTED] wrote: Qt, The easiest way is to convert your dates into a serial day number(i.e. the number of days that have elapsed between your date, and some arbitrary date in the dim and distant past - I think PHP uses 25th November, -4714). There are some calendar functions in php that will do this for you. Once you have your dates as a numeric offset, you can subtract them to get a the number of days between the dates, or you can add or subtract a number of days to get a new offset. Once you have the new offset, there are reverse calendar functions in php, to convert your new offset back to a calendar date. Check out the functions GregorianToJD(), and JDToGregorian(), in the Calendar functions of the PHP manual. If you do not have access to the calendar functions in your version of php, there are also a couple of examples how to do one of the conversions written in PHP, in the user contributed notes of the manual. There are also many published articles describing algorithms on how to do this. I can remember implementing these functions in 1977(Not in PHP of course), from an article published in the journal of the ACM, in 1963. Hope this helps. . . Fred Qt wrote: Dear Sirs, How can I add or subtract two date easily. Is therea any lib or function about this. I can not find any easy way in the manual Best Regards __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Keeping site metrics
http://www.devshed.com/Server_Side/PHP/Logging/page1.html http://www.google.com/search?hl=enlr=ie=UTF-8oe=UTF-8q=php+logging olinux --- Daniel Guerrier [EMAIL PROTECTED] wrote: Can someone direct me to a tutorial or provide insight on how to track site vistors usage. This would include Number of visits boken down by page Average time spent per visitor Total page views and Unique visitors. Thanks __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: Login system using PHP/MySql
What is your question? What errors are you getting? Here's a couple articles that you should read. Both include code that accomplishes what you are after. A Complete, Secure User Login System http://phpbuilder.com/columns/tim2505.php3 Building a Members Area with PHP: Part 1/6 http://www.devarticles.com/art/1/241 (you can find the other 5 parts) olinux --- YC Nyon [EMAIL PROTECTED] wrote: Hi, I have looked at many examples session-based of login/password system to protect webpages but can't get it to work. Seems simple but... I have php and mysql installed in my windows server. If any kind soul can point me to a working (easy) setup of this task, i would be most grateful. Nyon --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] programming question
You could make $category_array2 global function getGrandParent($cat_id, $year_model_id, $x) { global $category_array2 ... olinux --- Thomas Moore [EMAIL PROTECTED] wrote: I am trying to return a variable from a recursive function. If the recursive function gets called, the nothing is returned. For example, below I am trying to get the category_array2 variable returned. It works if the recursive function within the IF statement does not get called, but if it does, it does not pass back the variable. Any help would be greatly appreciated. I am tearing hair at this point! -tom showMasterCategories($year, $model_id, $syear_model_id, $keyword, $make_id, $display_mode, $catid) { $category_array2[$i] = getParent($category_id, $year_model_id, $i, $catid); } function getGrandParent($cat_id, $year_model_id, $x) { // to get highest level category master category $query = SELECT distinct C2.category_id, C2.category, CC2.category_id ; $query .= FROM CATEGORY C2, CHILD_CATEGORY CC, CHILD_CATEGORY CC2; $query .= where C2.category_id = CC.category_id and CC.child_category_id = $cat_id and CC2.child_category_id = C2.category_id; //print $query; $result99 = mysql_query($query) or die(Query failed - $query); list( $ch_category_id, $category, $pcategory_id) = mysql_fetch_row($result99); if ($pcategory_id == 0) { print PARENT= $category:$pcategory_id:$year_model_id: $xbr; $category_array2[$x] = $category:$ch_category_id:$year_model_id; print just before returning: $category_array2[$x]; return $category_array2[$x]; $x = $x + 1; } else { print brcat- $category id-$ch_category_idbr; getGrandParent($ch_category_id, $year_model_id, $x); } //print $query; //$result_set = mysql_num_rows($result); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Browser displays binary data
I've been searching and not really sure what I should be searching for. I just got a note from a reader who says that they are unable to read an article on our website (from the screenshot it looks like browser is getting binary data). This article is php generated html with proper doctype, html, and header tags. The trouble is that the same script is generating articles that this person can read. I'm guessing that this has something to do with the browser getting gzipped content and not knowing it. My script does not gzip and my php setting are as follows, so I don't think this is happening on the fly. ZLib Support enabled Compiled Version 1.1.3 Linked Version 1.1.3 zlib.output_compression Off Off zlib.output_compression_level -1 -1 zlib.output_handler no value no value Any ideas? Thanks much, olinux __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Alternating Row Colors in PHP........
Pop this in your loop $bgcolor = ($i++ % 2) ? '#FF' : '#EE'; echo tr bgcolor=\$bgcolor\; olinux --- CF High [EMAIL PROTECTED] wrote: Hey all. I'm coming from Cold Fusion to PHP; in CF I could alternate rows with the following: tr bgcolor=###Iif(((CurrentRow MOD 2) is 0),de('FF'),de('EE'))# Any ideas how to do this in PHP? Thanks for clues, --Noah -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] POST_with_PHP_--_please_help_!
You can do posts with curl http://www.php.net/manual/en/ref.curl.php olinux --- arthur.chereau [EMAIL PROTECTED] wrote: I need to redirect the browser to an external website and to automatically send POST data to the site, without a form. Basically I need header(Location: ...) - that is true redirection - with POST. How can I do this with PHP ? __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dreading OOP
The most helpful intro to OOP for me is the sidebar here: http://webreference.com/perl/xhoo/php1/5.html --- Jay Paulson [EMAIL PROTECTED] wrote: The easiest way for me to explain and understand OOP was to think of it this way. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Books
PHP Fast Easy Web Development by Julie Meloni kicked things off for me (after knowing only HTML) basically walks you through the code of common things that you would want to do with PHP. (email a submitted html form - insert/retrieve and edit data in mysql database) Read through the examples and picture it in your mind. Lots of it is repetition but by the end you'll understand or at lest know where to look to find answers to solutions you want http://www.amazon.com/exec/obidos/external-search/002-6827406-7685618?tag=opera-20index=blendedkeyword=PHP+Fast+Easy+Web+Development Julie's site: www.thickbook.com Many tutorials available here as well. PHP Bible is another good reference book. There's also a lot of sample code in here if I remeber right http://www.amazon.com/exec/obidos/external-search/002-6827406-7685618?tag=opera-20index=blendedkeyword=PHP+bible The manual is really invaluable as well. It's very well organized and easy to find what you need if you know how to use it. A boring but helpful activity would be to read through the summaries of the functions. You won't remember all [or any :)] of them, but you will get an idea of what is possible and how powerful the language is. Sams Teach Yourself SQL in 10 Minutes Also ought to pick yourself up this cheapy while your at it. A great intro to SQL. It's great for a reference and an idea of what is possible (and how simple the majority of what you want to do really is) You'll probably be using MySQL at some point and this will help lots to understand how the database can help you out. http://www.amazon.com/exec/obidos/external-search/002-6827406-7685618?tag=opera-20index=blendedkeyword=Sams+Teach+Yourself+SQL+10+Minutes olinux --- Armoured [EMAIL PROTECTED] wrote: hello, i have been told that i should email you to help me with my question, and the auestion is: Can you recommend an GREAT book for someone to learn php off. The person will only have knowladge of html. Is there a really good book out there that will teach me php??? thanks __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Login scritp help needed.
Try this article - code sample available in the code library as well. http://www.phpbuilder.com/columns/tim2505.php3 Also a 6 part series on www.devarticles.com (5 are done) Here's part five - you can find the rest :) http://www.devarticles.com/art/1/323 zend.com probably has a good article on this as well. olinux --- Karl James [EMAIL PROTECTED] wrote: hey does anyone have a good login script that i can i can go buy on a tutorial sake. and also how to add the info correctly into a mysql database. Im kinda of a noobie so bare with me please. the books i have are not being very helpfull on this matter. you can see my username and password login page here. any help would be greatly appreciated. thanks Karl James http://www.ultimatefootballleague.com/index.htm under construction __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Ever complained about lousy PHP programmers?
I prefer single quotes on stuff that doesn't need to be parsed. In most cases this is more efficient, though probably not noticed except on a large scale. I also think it makes it easier to include html strings (because double quotes don't need to be escaped) and I find it easier to work my code in Homesite. echo 'p'.$something.' '.$something_else.'/p'; rather than echo p$something $something_else/p; --- Peter Hutnick [EMAIL PROTECTED] wrote: Well, here's your chance to criticize a newbie. As an exercise in learning PHP I have written a rot-13 script. It is at http://hutnick.com/rot13/index.html?show_content=1 . I'm soliciting comments on style, technique, etc. Be brutal, but don't get your feelings hurt if I don't take your comments as gospel. References will help me take comments to heart. It will be easier on me if you send or CC comments to [EMAIL PROTECTED] Thanks a million! -Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OOP for Web Programming Paradigm
I'm no OOP programmer but maybe extend your class to include methods for each situation. something like this: function countSingle($cid) function countMulti($cidArray) function countAll() HTH, olinux --- Victor [EMAIL PROTECTED] wrote: Hello. I have this question. When I program, I try to create a class for each table. Example below. Now what some complain about, and logically so, is that this might impose an overhead (I load all data even if I just need a counter and NOT description). So I say we can make a STATIC version of each Accessor with $cid as argument; But then they say what if i want to load an array of all 2000 counters, for example. I say first get all the $cid's, then in an array, load a class for each one, etc.. That however makes lots of SQL calls instead of one big one. I suppose I can get all data and then load it into classes, but that seems like a bad approach, especially for calculated values. What I am curious about is what paradigms do you guys use to address these issues? Is my paradigm good and it's worth to just provide static methods for frequently necessary fields to reduce overhead, or is there a better way of dealing with this stuff? class Counter { var $db; var $cid; var $counter; var $descr; /** * Default Constructor * @param int $cid - Counter ID */ function Counter($cid=false) { global $db; $this-db = $db; if (isset($cid) $cid) $this-load($cid); } /** * Description * @param int $cid - Counter ID * @return bool */ function load($cid=0) { if (!$cid) return false; $q = SELECT * FROM counter WHERE cid = $cid; $r = $this-db-getRow($q); // Using PEAR here. if (!DB::isError($r)) { $this-cid = $r[cid]; $this-counter = $r[counter]; $this-descr = $r[descr]; return true; } return false; } # # Accessor Methods # function getCid() { return $this-cid; } function getCounter() { return $this-counter; } function getDescr() { return $this-descr; } # # Mutator Methods # function setCid($v) { $this-iaid= $v; } function setCounter($v) { $this-counter = $v; } function setDescr($v) { $this-descr = $v; } // Many other methods, etc Static methods, etc... } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] protect downloadable files
This has been covered several times recently - check the archives. zend.com has a great article detailing how to accomplish this. olinux --- Adam Voigt [EMAIL PROTECTED] wrote: Make the download link a PHP page: download.php?fileid+AD0-199 Then check to make sure there session is valid, and what not and then use the header function to make the browser know it's supposed to give a save dialog box. I don't specifically know the code, but I know this will work. On Thu, 2002-12-12 at 10:56, Jan Grafstr+APY-m wrote: Hi, I have some zipfiles in a directory and wonder how to protect the files? I send the customer to a downloadpage with links after succsessfull login. What is best to do? chmod the files when I upload them and change chmod if I have a verifief user? Any suggestions? -- Regards Jan Grafstrom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt (adam+AEA-cryptocomm.com) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam+AF8-at+AF8-cryptocomm.asc ATTACHMENT part 2 application/pgp-signature name=signature.asc __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Smarty + css + dreamweaver
use absolute path link rel=stylesheet href=/style.css type=text/css or link rel=stylesheet href=http://www.sitename.com/style.css; type=text/css --- Daniel Masson [EMAIL PROTECTED] wrote: Hi list : This is maybe a silly question from deamweaver users, i hope you people understand what i mean. im working on a site php, smarty,css , etc. the directory structure of the site is this: -- - classes - Files of the smarty class - Templates (Directory) - template1.html - template2.html - template3.html - dw_template.dwt script1.php script2.php script3.php style.css javasc.js -- script1.php, script2.php, and script3.php look like this Require /path/to/smarty/smartyfile.class.php; $page = new Smarty; // some stuff $page-display(templateN.html); //end Im working dreamweaver Templates system so every templateN.html are attached to dw_template.dwt, dw_template.dwt calls the style sheet like this: link rel=stylesheet href=../style.css type=text/css Of course all the templatesN.html call the style shett the same way. No problem here. But ... since scriptsN.php need the TemplatesN.html ... (maybe im wrong with this) the browser doesnt know that Templates/TemplatesN.html exist, the browser calls http://site/script1.php http://site/script2.php So the browser shouldnt find the style sheet because TemplatesN.html call ../style.css and ../style.css doesnt exists relative to http://site/scriptN.php , and for my surprise the output result DOES apply the style sheet ... Am i wrong with this ??? Or what should i know about all this ?? Thanks for reading this long and silly question. Daniel. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Smarty + css + dreamweaver
because dreamweaver knows what your local root folder is, so it can find it. --- Daniel Masson [EMAIL PROTECTED] wrote: Thanks for your reply ... I know about absolute paths ... My question is why it did work ??? Cordialmente; Daniel E. Massón. Web: www.imagine.com.co Te Deseamos una Feliz Navidad y un Prospero 2,003 -Mensaje original- De: olinux [mailto:[EMAIL PROTECTED]] Enviado el: jueves, 12 de diciembre de 2002 16:14 Para: Daniel Masson; 'PHP' Asunto: Re: [PHP] Smarty + css + dreamweaver use absolute path link rel=stylesheet href=/style.css type=text/css or link rel=stylesheet href=http://www.sitename.com/style.css; type=text/css --- Daniel Masson [EMAIL PROTECTED] wrote: Hi list : This is maybe a silly question from deamweaver users, i hope you people understand what i mean. im working on a site php, smarty,css , etc. the directory structure of the site is this: -- - classes - Files of the smarty class - Templates (Directory) - template1.html - template2.html - template3.html - dw_template.dwt script1.php script2.php script3.php style.css javasc.js -- script1.php, script2.php, and script3.php look like this Require /path/to/smarty/smartyfile.class.php; $page = new Smarty; // some stuff $page-display(templateN.html); //end Im working dreamweaver Templates system so every templateN.html are attached to dw_template.dwt, dw_template.dwt calls the style sheet like this: link rel=stylesheet href=../style.css type=text/css Of course all the templatesN.html call the style shett the same way. No problem here. But ... since scriptsN.php need the TemplatesN.html ... (maybe im wrong with this) the browser doesnt know that Templates/TemplatesN.html exist, the browser calls http://site/script1.php http://site/script2.php So the browser shouldnt find the style sheet because TemplatesN.html call ../style.css and ../style.css doesnt exists relative to http://site/scriptN.php , and for my surprise the output result DOES apply the style sheet ... Am i wrong with this ??? Or what should i know about all this ?? Thanks for reading this long and silly question. Daniel. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- 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 __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] does anybody know PHPlib's source site?
--- Alexander A. Savenkov [EMAIL PROTECTED] wrote: Hi All. does anybody know PHPlib's source site? Google does __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and WebDAV
I don't know much about WebDAV, but sounds like that is not possible with PHP. You need something on the client side. I have used Groove (a collaboration software, They have a free demo as well - http://groove.net). It's not PHP based but when I open a shared document and switch back to groove I receive a popup window - 'Groove has deteceted changes to 'Document Name' Would you like to upload changes?' Something like that. So I guess maybe you could use some type of client side program that checks the document last modified on opening and then again when they switch back to the (both from the Temp files folder) web browser. olinux --- [EMAIL PROTECTED] wrote: Hi All I am currently working on a simple document management system in PHP. Metadata and revision histories and other relevant data is stored in a PostgreSQL database. I would like to set up this system so that there is NO access to any documents through the filesystem (web folders etc.) Hence, the ideal situation is the following: (much simplified) The user is sent to an URL such as: http://www.blah.com/document.php?docid=9994112 This script document.php pushes the Word Document (or whatever type of document it may be) to the user's browser which in turn loads the relevant application. Now, normally when a user clicks Save it will attempt to save the file back to the Temporary Internet Files directory or something similar. I would like to make it possible for the user to simply be able to hit Save. The request is then sent back (a webdav request) to http://www.blah.com/document.php?docid=9994112 where this script can then retrieve the body of the file saved back to the web and then store it on the server file system as it pleases. That PHP script then updates the metadata in the PostgreSQL database. So basically what I want to use of WebDAV is its facility for saving back to the web. I'm not really interested in locking or versioning etc. Will PHP and WebDAV support what I am looking for here? If not, is there anything else that will? The key point is that I must give the users a transparent way of saving back to the web without them having any access to the documents through shares etc. Thanks in advance. --- Adam Whitehead Software Developer - CSM Technology Microsoft Certified Professional (MCP) Ph: (08) 89361 455 ** Mobile (0411) 241 120 E-mail: [EMAIL PROTECTED] www.csm.com.au This e-mail, including any attachments, is intended only for the use of the individual or entity named above and may contain information that is confidential and privileged. Any information contained in this e-mail is not to be used or disclosed for any purpose other than the purpose for which you received it. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this e-mail by mistake, please delete this e-mail permanently from your system. WARNING: Although the company has taken reasonable precautions to ensure no viruses are present in this e-mail, the company can not accept responsibility for any loss or damage arising from the use of this e-mail or attachments. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] My first XML!
Here's a start for you ? /* Connect to database */ $sql = SELECT * FROM categories ORDER BY parent_id,cat_id ASC; $result = @mysql_query($sql) or die(Couldn't select categories.); $menu = array(); while ($row = mysql_fetch_array($result)) { $id = $row['cat_id']; $category = $row['category']; $pid = $row['parent_id']; $menu[$pid][$id] = $category; } function show_cats ($parent=, $indent=) { global $menu; foreach($menu as $key1 = $value1) { if ($key1 == $parent) {// if it's a top category print it foreach ($value1 as $key2 = $value2) { $catname = $value2; // $value2 same as $value1[$key2] $catID = $key2; echo str_repeat(nbsp;nbsp;, $indent); echo a href=\search/show_results.php?catID=$catID\$catname/abr; show_cats($catID, $indent+1); } } } } // end show_cats function show_cats(); ? --- Boris Kolev [EMAIL PROTECTED] wrote: Hello php-general, Hi. I want to know how i can export tree structure from Mysql table to XML mysql table structure is: ID - Group Unique Id P_ID - Parent Id Name - Name of group I want to make XML whit tree structure. Can some body help me! -- Best regards, Boris mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Streaming audio
Not PHP, but here's a solution I use for streaming WMA files on apache server. You'll need 3 files audiofile.htm audiofile.wax audiofile.wma [audiofile.htm] html headtitleAudio Player/title/head body script language=JavaScript !-- if ( navigator.appName == Netscape ) { navigator.plugins.refresh(); document.write(\x3C + applet MAYSCRIPT Code=NPDS.npDSEvtObsProxy.class) document.writeln( width=5 height=5 name=appObs\x3E \x3C/applet\x3E) } //-- /script !-- Set ShowControls, ShowDisplay, ShowStatusBar to value 0 to not display the corresponding thing under the video window -- OBJECT ID=NSPlay WIDTH=160 HEIGHT=128 classid=CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95 codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701; standby=Loading Microsoft Windows Media Player components... type=application/x-oleobject PARAM NAME=FileName VALUE=/interviews/applied/applied_interview_hi.wax PARAM NAME=ShowControls VALUE=1 PARAM NAME=ShowDisplay VALUE=1 PARAM NAME=ShowStatusBar VALUE=1 PARAM NAME=AutoSize VALUE=1 Embed type=application/x-mplayer2 pluginspage=http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/; filename=/audio/audiofile.wax src=/audio/audiofile.wax Name=NSPlay ShowControls=1 ShowDisplay=1 ShowStatusBar=1 width=290 height=320 /embed /OBJECT /body /html [audiofile.wax] ASX version = 3.0 Entry Ref href = /audio/audiofile.wma / /Entry /ASX And audiofile.wma is of course your windows media audio file. olinux At 12:55 PM 11/27/2002 -0800, Mako Shark wrote: Does anyone know how to do streaming audio with PHP? No clue if this is even possible. I've checked around a bit, looked at some script sites, but nothing seems to give a clue. I *think* it might be possible to set something like this up, but I'm not sure. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- 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 __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Online Booking System/Framework question
Lots of good ideas here: http://www.databaseanswers.com/data_models/index.htm olinux --- Steve Purkiss [EMAIL PROTECTED] wrote: Hi all, I wrote a site a while back which has a booking system for event guest lists. It was my first venture into PHP, and now that it needs some more work done on it (mainly making the site more open so people don't have to sign up until they book on the guest list) I really want to rework the back-end (making it object-oriented like I should have done in the first place, cutting down the number of database requests, getting rid of the JavaScript validation, etc.), and I want to obviously make the most use of any classes/frameworks that are already out there. I've been looking at CMS such as PostNuke, but most seem to be an overkill for what I need, and the aesthetic design is pretty specific so it has to fit into that. I've also looked at using ADODB, which seems pretty useful, and PEAR, which seems to do the same and a bit more, such as HTML templates. I can find many membership management systems, but as yet haven't found any open source booking systems - anyone know of any or should I bear this in mind and release one from the outcome of this development? Can anyone recommend frameworks/starting points/websites that could be useful to me? I seem to be going round in circles at the moment and don't want to go for one particular solution in case it's the 'wrong' one and I regret it later. Once I go for a particular solution, it's going to take a lot of learning, so I don't want to (and can't afford to) waste lots of time on the wrong one. The site is http://www.belugablues.com (there's no events on it at the moment - the content manager hasn't quite got round the concept of having to keep a site up-to-date, but will do :O) - you can log in using the username 'testing' and password '123123' Many thanks in advance for your advice and help, Steve Purkiss -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: WAP resources for PHP
Like he said - basically just send a wap header and config your server. CONFIGURING SERVER http://www.verio.com/support/view_article.cfm?doc_id=1193 http://www.verio.com/support/view_article.cfm?doc_id=766 Tip: Leave this line out - you will need to add .wml to your list of extensions to be parsed by php AddType text/vnd.wap.wml .wml and use the header() function to send the correct mime-type WAP and PHP ARTICLES http://phpbuilder.com/columns/index.php3?cat=6subcat=54 WAP PHP PORTAL http://www.hotscripts.com/Detailed/12862.html The best wap resource I know of - includes a validator http://www.w3schools.com/wap/ olinux --- [EMAIL PROTECTED] wrote: Well, PHP and WAP are fully compatible. You just need to ouput PHP in a wap format and not html. You should learn the wap tags in w3c.org. -- M.CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com Hébergement de sites internets. Research And Development [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] I need to make a site WAP ready in less than a month. What books or internet resources do you recommend for development of WAP in PHP. Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] data verification trough _POST arrays
--- Fernando M. Maresca [EMAIL PROTECTED] wrote: hello everyone, first, is there a way of reloading a FORM with the data that the user have typed, after the action=validation.php has been determined that some fields nedd to be reloaded? input type=text name=fieldname value=?=$_SESSION['fieldname'];? what is the correct method for save _POST in _SESSION variables, so the values can be preserved for later retrieval? $_SESSION['fieldname'] = $_POST['fieldname']; olinux __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Geographic IP location
Hi all, I am looking for a way to determine the geographic location based on IP address. I understand that 100% accuracy is impossible. Does anyone know of a good software or service provider that provides quality geographic detection to US state level based on IP of website visitors. I have tried several and find that they simply use whois records. This is great but seems highly inaccurate. Ideally I am looking for a utility that I can feed a list of IP's to and then use this data to update mysql records. These two services look pretty decent. http://www.geobytes.com http://www.serviceobjects.com/products/dots_ipgeo.asp Thanks for any input, olinux __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Geographic IP location
This is a great class, but NetGeo uses only whois records, I think that the more accurate solutions also use some sort of ip domain name analyisis to find city location. Thanks, olinux --- Jason Reid [EMAIL PROTECTED] wrote: http://www.phpclasses.org/netgeoclass that 'should' work for what you want... someone else suggested it a while age for another project Jason Reid [EMAIL PROTECTED] -- AC Host Canada www.achost.ca - Original Message - From: olinux [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, November 02, 2002 5:54 PM Subject: [PHP] Geographic IP location Hi all, I am looking for a way to determine the geographic location based on IP address. I understand that 100% accuracy is impossible. Does anyone know of a good software or service provider that provides quality geographic detection to US state level based on IP of website visitors. I have tried several and find that they simply use whois records. This is great but seems highly inaccurate. Ideally I am looking for a utility that I can feed a list of IP's to and then use this data to update mysql records. These two services look pretty decent. http://www.geobytes.com http://www.serviceobjects.com/products/dots_ipgeo.asp Thanks for any input, olinux __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Addresses Mailer
I've never met an ISP that would refuse bulk mailing, as long as you can proove that you've got concent from the receivers for the messages. My mail server handles all the concent things itself, and sofar my ISPs have not complained about the up to 3 digit amounts of message that go out each day, with up to 4 digits coming in... I have a site hosted on a shared server and if I try to generate an email with more than 75 BCC addresses it will not be sent. I was instructed to use the listserve software that they provide to do mailings like this. They don't disapprove high volume mailing, but they do have a problem if you use BCC. I guess that it's either harder on the server or because its most likely spam. On my dedicated servers (another company) we can do whatever we please, but I do think that a large number of filters are tipped off by a high volume of BCC's ... olinux __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Addresses Mailer
The best solution would probably be to send each email by itself or do the actual sending thru a mailing list program. BCC works great, but a lot of spam filters will catch it - plus some shared servers have a limit on the number of BCC's on a single mail piece. olinux --- Rick Emery [EMAIL PROTECTED] wrote: Put all addressees in the BCC?? - Original Message - From: Pushpinder Singh Garcha [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 30, 2002 1:47 PM Subject: [PHP] Multiple Addresses Mailer Hi All I am creating a mailing list system in which I should be able to broadcast a message to multiple recipients I am using the mail() function and putting all the recipients names in the to argument separated by commas. When I do this the mail goes to all the people but they come to know that it was sent to others as well. I want to be able to send mail so that each recipient thinks that this mail was ONLY sent to him/her. Thanks --pS Pushpinder Singh Garcha -- 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 __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sample Meeting Management System
Try these http://www.hotscripts.com/PHP/Scripts_and_Programs/Groupware_Tools/ http://www.hotscripts.com/search/?query=meetingcategory=php olinux --- Faisal Abdullah [EMAIL PROTECTED] wrote: Hi people, Do you know where I can look at a free meeting management system? Nothing too fancy, just something that does the job. Thanks. Regards, Faisal __ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Adding Content Management to live site
Depending on the size and current format, you may want to import everything into the CMS. Might work well for searching etc. I recently converted our companies static website (11,000 pages - we're a magazine publisher) to a mysql database. Tough work, but not as gruelling as it sounds. I wrote a script to parse thru the static html files and grab the title article and date. Also made use of the naming conventions to construct the date. A couple days work to get something that worked accurately for the different article formats but well worth it. Putting together index page and archives pages is pretty much cake work. A simple query will grab todays news, the past week, a month from 2000 or whatever. You can email me if you'd like some code pieces. olinux --- Maxim Maletsky [EMAIL PROTECTED] wrote: You could leave the site links the way they are by working out a good logic within apache's mod_rewtire routine. So, basically you would install CMS for the site and forward there the whole site's used links accordingly. It's the most elegant solution, but not the easiest to accomplish. I have done that once for a site with over 600Mb of static pages. It was a site for the printed magazine. -- Maxim Maletsky [EMAIL PROTECTED] www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home // my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3 Tariq Murtaza [EMAIL PROTECTED] wrote... : Try postnuke.com Ashley M. Kirchner wrote: I need to add some type of Content Management System to an already existing site. All my client wants to be able to do is adding new articles every week, and have the system update the main (index) page with those articles (adding excerpts and keep a list of published articles.) The criteria is that the current index page has to stay the way it is now, just the management has to be somewhat automated. Right now everything is being done manually, every article manually linked in the index page and the little excerpts written out by hand. Can anyone suggest a CMS program that I can feed the current page to and have it work without having to rewrite the whole site into the CMS program? -- H | I haven't lost my mind; it's backed up on tape somewhere. + Ashley M. Kirchner mailto:ashley;pcraft.com . 303.442.6410 x130 IT Director / SysAdmin / WebSmith . 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- Tariq Murtaza Assistant Web Master Business Technology Team Small Medium Enterprise Development Authority Government of Pakistan 1st Floor, Waheed Trade Complex 36-XX, Khayaban-e-Iqbal, D.H.A Lahore-54792, PAKISTAN Tel: (92 42) 111 111 456 Fax: (92 42) 5896619 Website: http://www.smeda.org.pk -- 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 __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP caching ideas?
Smarty template will allow you to cache certain pieces. http://smarty.php.net olinux --- Krzysztof Dziekiewicz [EMAIL PROTECTED] wrote: Is the general logic to slice the page into some general pieces. For example ones that have always general data and those that change. Then the ones that don't change are streamed to the user using passthrough and the rest of the page is generated dynamically with the newest relevant data. If a page has parts that change and not you can make frameset. In a frame that does not change you send caching headers. Durign generating page you can cache in memory unchangeble parts. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] CC Processing Merchants
You can find a lot of good information and comparisons here: http://www.merchantworkz.com olinux -Original Message- From: Andrew Brampton [mailto:[EMAIL PROTECTED]] Sent: Thursday, 10 October 2002 9:49 AM To: [EMAIL PROTECTED] Subject: [PHP] CC Processing Merchants Sorry for this slightly off topic question, but I beleive many of you will have delt with this kind of thing before. My client is asking for a Online Merchant that will allow him to validate and charge credit cards. He orginally suggested Pay Pals but after I read their docs I found that the Customers would have to sign up for a Pay Pals account, which my client dislikes. So can anyone recommend a good (maybe cheap) Merchant that can validate and charge credit cards online? My client is searching for some reviews online, but he asked if I could maybe get a list from progammers which have done it before. Thanks Andrew __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php code in templates... how to?
eval() should work for you http://www.php.net/eval You also may want to consider including files coded something like this: html head?=$headers;?/head title?=$title;?/title body ?=$header;? ?=$body;? ?=$footer;? /body /html Then you just set the values for the vars in your code - include the file. Josh --- Hendrik Daldrup [EMAIL PROTECTED] wrote: Hi, i am working with templates, which i put into a string ($user_screen) and in the end i make the output with echo $user_screen; where $user_screen would contain the template file data. However, if the $user_screen contains any php code it gets echo'ed as well, instead of parsed. (ok, that sounds logical), but is there a way i can make php parse the php code within this string? i thought, that maybe include would work that way, but its not possible to include a string, is it? thx Hendrik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] submitting a form to multiple places!!!
Here's what I do. We have an outsourced email newsletter management system that accepts GET method - so I just use fopen() to send the data to our list management system and then drop the information into a database on our server. $form1_submit_url = 'http://www.whatever.com/page.htm?something=123something=456'; $fp = fopen (c:\\data\\info.txt, r); - then my script continues to insert info an output confirmation message olinux --- Henry [EMAIL PROTECTED] wrote: Hi All, I have a problem that I hope you can help me with. I'm using a third party shopping cart solution which is quite frankly naff. They bundle some autoresponders with it. Unfortunately the autoresponders do not work!. I want to find a temporary solution to this. The easiest way would be to allow a form to be submitted to more than one place! Basically I would lke to have an intermediate php page that will submit the details (submitted to it) to two other pages and then follow the response of one of those other pages (the primary page). That way I can insert a different autoresponder handling system into the submission process but continue to use the shopping carts pages for the time being. Any suggestions? Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] submitting a form to multiple places!!!
If you need something more complex look into CURL as suggested earlier http://curl.haxx.se/ http://www.php.net/curl olinux --- olinux [EMAIL PROTECTED] wrote: Here's what I do. We have an outsourced email newsletter management system that accepts GET method - so I just use fopen() to send the data to our list management system and then drop the information into a database on our server. $form1_submit_url = 'http://www.whatever.com/page.htm?something=123something=456'; $fp = fopen (c:\\data\\info.txt, r); - then my script continues to insert info an output confirmation message olinux --- Henry [EMAIL PROTECTED] wrote: Hi All, I have a problem that I hope you can help me with. I'm using a third party shopping cart solution which is quite frankly naff. They bundle some autoresponders with it. Unfortunately the autoresponders do not work!. I want to find a temporary solution to this. The easiest way would be to allow a form to be submitted to more than one place! Basically I would lke to have an intermediate php page that will submit the details (submitted to it) to two other pages and then follow the response of one of those other pages (the primary page). That way I can insert a different autoresponder handling system into the submission process but continue to use the shopping carts pages for the time being. Any suggestions? Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] counting words in a string
wouldn't it be easier and more efficient to simply count the number of spaces in the string (and add 1)? using substr_count or something similar olinux --- Justin French [EMAIL PROTECTED] wrote: You need to look at a few options... one is regular expression (not my forte), or perhaps winding through the string one character at a time, writing a very simple state engine. Justin French on 28/09/02 4:47 PM, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: Hello Justin, That worked perfect but I have one more problem I need to know if one of the word is UNAVAILABLE I need to know if it is the first one or the second one. I don't know if there is any way to do this. 1st 2nd $string =UNAVAILABLE AVAILABLE More Info; 1st 2nd $string =AVAILABLE More Info UNAVAILABLE ; Friday, September 27, 2002, 11:22:42 PM, you wrote: JF if this is your SPECIFIC problem, putting a space at the beginning of $srch JF will help, eliminating XAVAILABLE... but this will cause a problem with the JF word AVAILABLE appearing at the start of the string, so temporarily put a JF space at the start of the string: JF ? JF // UNTESTED JF $count = substr_count(' '.strtolower($string), strtolower(' '.$srch)); JF echo $count; ? JF this won't help if there are newlines and other white space instead of JF spaces, and won't help (so far) for a different set of circumstances... JF it would be nice to extend substr_count() could be extended to have an JF option. JF Justin JF on 28/09/02 3:41 PM, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: I need to count how many times the word AVAILABLE appears in a string like this $string =AVAILABLE More Info AVAILABLE More Info; some time the string looks like this $string =UNAVAILABLE More Info AVAILABLE More Info; or $string =AVAILABLE More Info UNAVAILABLE More Info; when I use $srch=AVAILABLE; $count=substr_count(strtolower($string), strtolower($srch)); echo $count; it puts the count a 2 even when one of the words is UNAVAILABLE how can I make it only count AVAILABLE and not UNAVAILABLE or visa verse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] can you recommend PHP shopping cart
I believe that x-cart provides the code when you purchase. Looks like an inexpensive and full featured solution. Check out www.oscommerce.com for an excellent open source project that will rival most commercial solutions. There are some live site examples in the featured sites section. Many features and new contributions daily. olinux --- Peter J. Schoenster [EMAIL PROTECTED] wrote: Hi, Looking for a shopping cart. I've written plenty in the past but in Perl. I'm looking for one in PHP and I don't want to write my own. I looked at this: http://www.x-cart.com/ And I asked to see their code but I have not heard anything back. I'm already favorable to anything that uses Smarty. I'd like something that is as OO as possible. Something that's got all the core features and is then easy to extend as every customer has their uniqure requirements. Anyone got some suggestions? Peter http://www.coremodules.com/ Web Development and Support at Affordable Prices 901-757-8322 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] reuse database connections
When you create a connection it is available to the end of the script run. You can run as many queries as you wish in the script and all will use the same connection. If you wish for multiple accesses to use the same connection, I think you will have to use persistent connections. olinux --- Kumar Lakshminarayanan [EMAIL PROTECTED] wrote: You can use persistent connections from php to mysql server using mysql_pconnect(host,user,passwd) then go on to use the returned link. this will open a new connection only if one is not available. kumar Support @ Fourthrealm.com wrote: Another question about efficiency / using server resources: In another language I use, I can re-use an ODBC connection to make further queries/update/etc to the database to save the overhead of closing and reopening the connection to the db over and over. It works sometime like this (in the other language): iSQL DBNAME='xxx' LOGIN='xxx' SQL='some query' # opens the connection ... display results... iSQLMORE SQL='some other query' # reuses the connection display other results /iSQL # closes the connection Is there an equivalent in PHP to this, using the mySQL set of tags? Peter - - - - - - - - - - - - - - - - - - - - - Fourth Realm Solutions [EMAIL PROTECTED] http://www.fourthrealm.com Tel: 519-739-1652 - - - - - - - - - - - - - - - - - - - - - -- 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 __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question about $_GET, etc
You need to turn register_globals off in your php.ini file. This is default in php 4.2+ Try this article for a great overview: http://www.webmasterbase.com/article/758/8 olinux --- swade [EMAIL PROTECTED] wrote: On my laptop i still have 4.11 apache,linux on it but its just for development. I must be confused about get and post handling. I've been referrencing them in $_GET, etc but I was just working on something and linked to a script by using ?section=duh in the query string,etc Now i thought $duh would be empty since i thought all get and post now got stored in $_GET[duh], but i notice if i echo $duh[0] it will return an 'd' is this normal? thanks! shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! News - Today's headlines http://news.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] can you recommned a simple banner rotator in PHP
I'll second that - It's a truly professional solution. [even has a full user manual] Here are a couple articles you might want to checkk out: http://www.devarticles.com/content.php?articleId=126page=1 http://www.devshed.com/Server_Side/PHP/CommercialBreak/page1.html olinux --- Seán_Dillon [EMAIL PROTECTED] wrote: -Original Message- From: Peter J. Schoenster [mailto:[EMAIL PROTECTED]] Hi, I've got a customer who needs a banner rotation system. I don't want to recreate any wheels and I'm tryin to avoid a lot of research. Have a look at phpAdsNew http://sourceforge.net/projects/phpadsnew/ Seán -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! News - Today's headlines http://news.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Stock Market data - where can I get it?
I would like to have a dynamic graph of market indices. Where I can get this data (free and paid). I have found several applications that grab yahoo finance data, but I don't think this flies very well with yahoo. CBS MarketWatch seems to be quite pricey. Can anyone recommend a source? Thanks, olinux __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Good free PHP web stats package?
Webalizer is a fairly popular package, even used by a few fortune 500's if I remember correctly. Not PHP but fast and free. http://www.webalizer.com/ olinux --- tomba [EMAIL PROTECTED] wrote: I have a client that is hosted with a company that has a rather lame web stats package. I am looking for a PHP based stats package and have waded through the sites that have apps shown under PHP at hotscripts.com and wasn't drawn to the dozen or so that I looked at. So if you have recommendations, send them along. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: str_replace question
something like this should do foreach ($reserved_words as $key = $value) { $reserved_words_bold[$key] = 'b'.$value.'/b'; } $string = str_replace($reserved_words, $reserved_words_bold,$string); olinux --- Gregor J [EMAIL PROTECTED] wrote: Same as with b.$reserved_words./b, i get Array :) Chaillan Nicolas [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... What about a str_replace($reserved_words, b$reserved_words/b,$string); Tell me. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] [EMAIL PROTECTED] www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet Gregor Jak¹A [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hello, i have array $reserved_words which i want to replace with bold .. but when i tried to do str_replace($reserved_words, b.$reserved_words./b, $string) it showed Array instead of bword/b if i simply do str_replace($reserved_words, $reserved_words, $string) then it shows the words not Array but not in bold ;) I know i could use 2 arrays one with bold words one without or i could use foreach but i want a simpler solution :)... Any suggestions ? thx in advance ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Toolbar for Homesite...
Very cool! Here's a few suggestions: cookie should open a dialog box so you can input values similar to mail. ability to enter more than one array value at once maybe the dialog box has a drop down [1-10] which so if you select 4 then 4 fields appear to enter more values mysql functions are quite heavily used, maybe include a few more of these. I would only use the buttons that are going to save time. so a button that prints out something like this would be great. while ($row = mysql_fetch_array($result)) { $value1 = $row['']; $value2 = $row['']; $value3 = $row['']; } olinux --- Matt Zur [EMAIL PROTECTED] wrote: I made a php toolbar for Homesite v5. It's currently at v1.0 right now, but I'm looking for any suggestions anyone might have for the next version. http://zurnet.com/dl/hsphptb/ -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5th Anniversary!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card Processing - Take Two
www.x-cart.com looks like a good and inexpensive option - I will be implementing it soon, but I have not tried it yet. Anyone used x-cart? Thanks, olinux --- Daniel Guerrier [EMAIL PROTECTED] wrote: Can anyone recommend a good and cheap shopping cart and credit card processing combo. Based on PHP of course. Thanks __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com ATTACHMENT part 2 message/rfc822 Date: Mon, 15 Jul 2002 08:58:39 -0700 (PDT) From: Daniel Guerrier [EMAIL PROTECTED] Subject: Credit Card Processing To: [EMAIL PROTECTED] Can anyone recommend a good and cheap shopping cart and credit card processing combo. Based on PHP of course. Thanks __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP install - what features?
Hi all, I have searched the archive for a message subject something like PHP Wish List and was unsuccessful. I am going to have our new server setup and would like to know which features should be enabled - I know a few that I will need, but what features should i get now that I will be requesting a recompile later on for? Here are the features I think will be best - am I missing anything? do excess features slow down php? --with-xml -with-mysql -with-gd -with-ttf -with-pdflib -with-pear -with-openssl -with-zlib -with-curl -enable-ftp -with-mnoGoSearch -enable-sockets -enable-safe-mode -with-exec-dir --with-apache Thanks much, olinux __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Single website Unix + Windows servers
I am working on integrating our current website to apache/redhat/php/mysql Due to a recent investment in an ASP project I must have the windows / SQL server machine running this application. Any suggestions to keeping the site 'seamless' or ideas that will help Thank you, olinux --- Matt Parlane [EMAIL PROTECTED] wrote: Hi Brian... I have it set up just like Robert, and I really think it's the way to go - having Apache as the web-accessible server gives me much more peace of mind than having IIS sitting out there just waiting to be attacked. Do you realize you can have content served by IIS accessed without using the :8080 (or whatever) port number? I'm not sure if you're aware of this but here's the relevant parts of my httpd.conf: NameVirtualHost * LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_connect_module modules/mod_proxy_connect.so LoadModule proxy_http_module modules/mod_proxy_http.so VirtualHost * ServerName zevi.net ServerAlias zevi.net www.zevi.net ProxyRequests Off ProxyPass / http://zevi.net:4040/ ProxyPassReverse / http://zevi.net:4040/ /VirtualHost VirtualHost * ServerName newworkstudio.com ServerAlias newworkstudio.com www.newworkstudio.com DocumentRoot C:/htdocs/newworkstudio.com DirectoryIndex index.html /VirtualHost So, for each ASP site (or for each site served by IIS), just add a VirtualHost entry using the ProxyPass directive to send it to the IIS server. The IIS server doesn't have to be on the same computer by the way - or even the same network... Hope that helps. Matt Parlane Zevi Interactive [EMAIL PROTECTED] Brian McGarvie [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I will probably do this the other way round as we have a few sites... so if i have a single file with a frame and point contents of frame to apache this should work? -Original Message- From: Collins, Robert [mailto:[EMAIL PROTECTED]] Sent: 09 July 2002 4:41 PM To: Brian McGarvie; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] Dual Server... I have Apache and IIS coexisting on my intranet server and the way I set them up was to put each on a different port. (Apache serves http://intranet and IIS serves http://intranet:8080) this appears to work fine. Hope this helps Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Fax: (504) 248-3866 Email : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -Original Message- From: Brian McGarvie [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 09, 2002 10:39 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] Dual Server... OK following from my thread 'Browser Issues' I have found that when serving the site from apache, that the aforementioned errors go away... mostly... OK so... What is the best way to setup so that IIS/Apache co-exist... I'd like to keep the 'entry' to the site on IIS as we have other sites too... and use apache to serve the content of it. Any help mucho appreciated... also working to a deadline! -- PHP General 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 __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP: Script Security: Best coding practices
A little off your request, but may be of interest: Top 21 PHP Programming Mistakes from Zend.com http://www.zend.com/zend/art/mistake1.php http://www.zend.com/zend/art/mistake2.php olinux On 07/04/2002 02:24 AM, Jean-Christian Imbeault wrote: I am trying to figure out what are some Bad Things (tm) when it comes to secure PHP programming and how to avoid them. I am looking for a kind of best practices for security list for PHP programming. Do's and Don't, or a list of common pitfalls and how to avoid them. Can anyone point me to such a list or tutorial? __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php SMS (or phone contact)
Most cellular and paging companies provide your phone/pager with an email address. usually [EMAIL PROTECTED] check out this list of providers and their addressing: http://www.weblinkwireless.com/customerservice/how2send/index.html so just use mail() and it looks pretty sweet when your website sends msg to your phone olinux --- Duncan [EMAIL PROTECTED] wrote: Hi again, thx for the replies. Well, nagios ... quite a story ... anyway, i spent more than 3-4 hours and still didn't get it to work. Maybe i should look into it again, if it supports that kind of stuff, which really would be just what i need :) Thanks a lot, Duncan __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Architecture problem? Google want index files exept the main page.
Are you using a 404 error to generate those deeper pages? If so you will want to send an OK header: header('HTTP/1.1 200 OK'); olinux --- Andy [EMAIL PROTECTED] wrote: Hi guys, I did recently launch my first web site and I am asking myself why google is only indexing the first page. To get a better index on other search engines I am passing parameters a bit strange and the dynamic pages look more like static ones. So I hope this was not a shoot in a hole :-( I am getting the parameters from the url and decode them after a certain key. The file looks to the visitor like it is a directory while I am forcing apache to parse it with php. So this is the first day google is indexing it, but as I said I tryed to search the site with google site search and it does only find the first page. A site like: http://www.globosapiens.net/profiles/A002021.html is not indexed at all!! Did I go the wrong path, or what else is going on? Thank you for any help, Andy -- http://www.globosapiens.net Global Travellers Network! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Architecture problem? Google want index files exept the main page.
Not sure what you are doing, but google is not going to index pages that require authentication. You should send the 200 header before any script output - i'm not sure what this will do to your authentication scheme... I do the same with the false directory structure - in my case i have a script 'news' (with no extension) and use the apache's ForceType to force this file to be parsed. url is something like this website.com/news/category/year/month/day/article_id.htm - check out Tim Perdue's article on www.phpbuilder.com olinux --- Andy [EMAIL PROTECTED] wrote: Hi, I am not using a 404 in this case. What I do is to name a file like a directory name and then parse this file with php. The parameters look like the filename. e.g. server.com/file/parameter.html In an other case I do use a 401 error. What is changing if I send this ok header? And when should I send it? Andy -- http://www.globosapiens.net Global Travellers Network! Olinux [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Are you using a 404 error to generate those deeper pages? If so you will want to send an OK header: header('HTTP/1.1 200 OK'); olinux --- Andy [EMAIL PROTECTED] wrote: Hi guys, I did recently launch my first web site and I am asking myself why google is only indexing the first page. To get a better index on other search engines I am passing parameters a bit strange and the dynamic pages look more like static ones. So I hope this was not a shoot in a hole :-( I am getting the parameters from the url and decode them after a certain key. The file looks to the visitor like it is a directory while I am forcing apache to parse it with php. So this is the first day google is indexing it, but as I said I tryed to search the site with google site search and it does only find the first page. A site like: http://www.globosapiens.net/profiles/A002021.html is not indexed at all!! Did I go the wrong path, or what else is going on? Thank you for any help, Andy -- http://www.globosapiens.net Global Travellers Network! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: phpmyadmin - moving data from one database to another
if your database is more than a couple mb you may not be able to do this - shared hosts limit your max memory per script and max upload size. Use select into outfile like this: SELECT a,b,a+b INTO OUTFILE /tmp/result.text FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY \n FROM test_table; It will write the data to a delimited file - then upload this file to new server and use LOAD DATA INFILE much the same way SELECT INTO OUTFILE http://www.mysql.com/doc/S/E/SELECT.html LOAD DATA INFILE http://www.mysql.com/doc/L/O/LOAD_DATA.html olinux --- Taylor York [EMAIL PROTECTED] wrote: Just dump the data and structure to an SQL file, choose save as file, then run all the code in the file on the next server. Taylor York Phil Schwarzmann [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The lazy and worthless a-holes at www.infinitehost.com (my host server) are forcing me to move all my MySQL data from one server to another because they are too dumb to fix it. I need to use phpmyadmin to move the data but i'm not %100 sure how to do it. There are some view dump commands. It looks like I can somehow download all the data and structure to my local computer, then upload it to the new server. Anyone have any info on this? THanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php