Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Application and Web Development > PHP
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 10-22-2007, 05:47 AM   #1 (permalink)
ChefFrank
Code Monkey
 
ChefFrank's Avatar
 
Join Date: Mar 2006
Location: Woodbury, CT
Posts: 38
ChefFrank is on a distinguished road
Send a message via Yahoo to ChefFrank
Structured records without SQL?

WOW! It's been a long time since I've posted here!

OK, here's the question:

I currently build a log of site usage, with timestamp, page, and user-ip. Right now, it's delimited by <br>, so that another page can read the log, and display it on the screen without a lot of fancy coding (yeah, I'm lazy).

I've gotten to the point where I want to do some selective filtering on the
file, however, my hosting company charges a lot extra for SQL access, not something desirable for what is basically a hobby.

Having worked a lot with other languages/systems, it had been possible to create simple files with a set record length (at least, that's the way it looked to the program). I looked through the PHP docs and didn't see a way to create a file (or even records) in this manner, other than through SQL.

Any ideas, suggestions, hints?

You guys have been helpful in the past. My coding skills have severely deteriorated, and the technology has really zoomed past. It's true - if you don't use it, you lose it!

Regards.

Frank
__________________
ChefFrank is offline   Reply With Quote
Old 10-22-2007, 06:39 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,680
redhead is on a distinguished road
It can be done with any type of file, that beeing a flat text file or a database structured file.
All you need to do, is put alot more work into your PHP part, when dealing with flat text files, than you need to do, when relying on SQL to handle all the sorting.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 10-22-2007, 06:44 AM   #3 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 635
DJMaze is on a distinguished road
Or maybe use SQLite (if installed)?
It is not a full blown SQL server but just an easy file reader
__________________

UT: Ultra-kill... God like!
DJMaze is offline   Reply With Quote
Old 10-22-2007, 07:01 AM   #4 (permalink)
ChefFrank
Code Monkey
 
ChefFrank's Avatar
 
Join Date: Mar 2006
Location: Woodbury, CT
Posts: 38
ChefFrank is on a distinguished road
Send a message via Yahoo to ChefFrank
Thanks for the replies!

I think I'm going to end up putting the work into the reader, probably in JAVA than to go back and change the code in the site. It sucks that SQL happens to be a paid extra, rather than a built-in, but, as stated before, it's a hobby and not an income-producing site, and for the amount of storage and bandwidth, they're a good deal (<$7/mo).

I can probably code a decent reader with the features I want in a short amount of time - sort by IP, sort/count by page accessed, and filter out IP addresses (Googlebot and Searchlive are a good number of hits on the site).

Yeah, SQL would have been my preferred way to do it, but I got to rely on my old school skills and find a way around it (I was writing programs like this, including the sorts, way before SQL existed!!).

Thanks all - glad to see you're all still around!

Frank
__________________
ChefFrank is offline   Reply With Quote
Old 10-22-2007, 10:16 AM   #5 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
hey frank,long time!

there's plenty of hosts out there who offer mysql with php for under $7/mo. shop around. any decent host doesn't charge extra for mysql access.
__________________
testing 1 2 3
sde is offline   Reply With Quote
Old 10-22-2007, 02:09 PM   #6 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,114
Belisarius is on a distinguished road
If I might make a selfish plug, I use DreamHost and they've been decent as an ultra-cheap hoster. Decent web-based tools, large quotas, decent support, and, yes, MySQL. They cost between $6 and $11, depending on how far in advanced you pay, and they have a deal going where you can get $110 off any year-long purchase (so a one-year purchase is more-or-less free). The code is on their front page.

And if you sign up through here, I get a kickback
__________________
GitS
Belisarius is offline   Reply With Quote
Old 10-22-2007, 04:14 PM   #7 (permalink)
ChefFrank
Code Monkey
 
ChefFrank's Avatar
 
Join Date: Mar 2006
Location: Woodbury, CT
Posts: 38
ChefFrank is on a distinguished road
Send a message via Yahoo to ChefFrank
Thanks all!

In spite of the limitations, I think I'm going to stick with my current host, seeing as I have 4 sites there, and for my measly monthly fee, they host them on 2 different accounts - saving me a substantial amount of money in the long run (literally, half price per account - plus, they pay for the domain names!) The site on my profile is the only one that does any fancy PHP (or needs to), and I can't see switching that one for something I can do on the back end easily - it would be cheaper for me to buy SQL support rather than switch to another host. My decision to go with this host was support when I first started building sites (back around 1998), and the unlimited bandwidth

Good to see all you guys (and gals, Redhead!) again. I'm in the middle of my busy season, so I get one or two days a month to play with the site, mostly writing my next newsletter. I'll have more time to play around with coding after Xmas, when we're deader than a church on a Tuesday afternoon. I may revisit this issue then.

As an afterthought, anyone got a good sitemap builder for searchbot (another problem I'm facing)?

Frank
__________________
ChefFrank is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Pre-pre-Basics QUantumAnenome Everything SQL ( MySQL, MSSQL, DB2, Postgre, Oracle, etc...) 3 06-20-2006 07:20 PM
help with SQL and VB.NET doobiwan Everything SQL ( MySQL, MSSQL, DB2, Postgre, Oracle, etc...) 4 06-10-2005 07:09 AM
EJBs, Websphere, and SQL Tuning technobard Web/Application Servers ( Apache, Tomcat, IIS, JBoss, Websphere, etc... ) 3 04-09-2005 06:23 AM
sql server 2000 validation problems cmartin2 MS Technologies ( ASP, VB, C#, .NET ) 0 12-11-2004 11:55 AM
Beginning SQL sequences using PostgreSQL and Oracle jeffro SQL 1 02-03-2004 08:32 AM


All times are GMT -8. The time now is 06:33 PM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle