-
php frameworks
Date: 03/27/08
Keywords: php, web
Hi,
I am currently in the works of planning a community based website and would like to know your thoughts on php frameworks as far as extensibility, flexibility, pros, cons... you know... the usual... What do you recommend? and why.
I currently am moving towards cakephp but would like to see if there are better ones.
Thanks in advance.
Source: http://community.livejournal.com/php/617145.html
-
mail() is slow
Date: 03/23/08
Keywords: php, spam
I have a script that regularly sends out lots of e-mails. Like, up to 500 at once. And since I don't want to use BCC or have everyone's address in the To: field, I've been calling up the e-mail list and looping through it, using one mail() command at a time. This has proven to be very slow. Is there a more correct way to do this? I checked out some other code I've messed with, like phpbb, and they just use Bcc and "undisclosed recipients" in the To: field. I don't want to do that, it'll make the e-mails more likely to get sent to people's spam folder.
Any other recommendations on the best way to deal with this?
Source: http://community.livejournal.com/php/616936.html
-
Partner
Date: 03/23/08
Keywords: php, mysql, technology, database, asp, sql, java, web
Hey everyone! I'm looking for a coding partner for a website I've been working on since last November. I find myself spending more time figuring out things and less time in actual development of the site--of course the learning could be rolled into the development, but it is apparent to me that more actual code needs to be written if I am to finish by my self-set deadline of the end of May.
The server-side script is done in PHP, the site uses a MySQL database, and there is some Javascript/AJAX implemented on the client-side.
This is probably the wrong place to find a person who has a strong background working with Javascript, but this is probably what I need more than anything since my knowledge is very limited in this area.
I can pay something, and I am open to a payment plan based on the revenue the site generates once it is officially launched.
A little background:
At one time I was a full-time professional photographer... it didn't work out so well since I really couldn't find a way to bring my potential clients to neutral ground in terms of negotiations. I also networked with many photographers in Orlando and around the United States who all seemed to make the same argument and really had a problem managing the administrative side of their business--often times hiring someone else to do it for the sake of not having to deal with it.
After completely bombing in the business in late 2006--a year after getting started, and acquring a full-time job in the technology sector, I got out of the business of actually taking the pictures, but the clients seemed to start pouring in due to the search engines ranking my current website high in returned results for folks looking for photographers in Orlando--where I'm based. There was no way that I could do the work while at the same time working my current job as a laser field service engineer--I wouldn't be in town. The solution was to help some of the photographers who I networked with out so I took care of all of the administrative work and hired them to do the actual photoshoot. We had a 40:60 [me:them] financial arrangement worked out which ultimately brought in about $20,000 last year for myself.
With the business growing, my time becoming more and more valuable, and advice from Mr. Trump [not personally, on T.V. lol] to "think big", I decided to start the National Photographer Group, LLC, and 9photographers.com, to take the whole thing to the web by creating a somewhat self-sufficient website where photographers could, for a monthly charge, use this site to take care of their administrative business--estimates, quotes, invoices, finances, project management, and lead generation.
As aforementioned, I started coding the site in November of 2007 and have put just about every weekend into some aspect of creating this website and business. I have already received many inquires from photographers anticipating the launch of the website.
So, I've been stubborn, to some extent, regarding whether or not I want to have somebody else help me with this script. The last thing that I want is for my script to be snatched up and spread over the web and have the business fail because of that. The business is going to go somewhere... but I'm finding that I really can't do it alone... I need some coding help, hence this entry.
So, if you are interested in working with me to help develop this site, or if you know someone who might be, or can point me in a direction where I can find someone who can help--preferably keeping the business in the U.S.A.-then by all means, please send a comment. Thank you for your time and sorry this was so long.
Lance.
Source: http://community.livejournal.com/php/616702.html
-
Get data from a .CSV
Date: 03/07/08
Keywords: php
I am very new to all this btw.
Trying to build a PHP page that reads a .CSV as a query so that a user can pick the Row data (first field is primary) and variable can be ran off of that Row.
Does that make any sense? My brain is tired.
Source: http://community.livejournal.com/php/616251.html
-
Code Generators
Date: 02/29/08
Keywords: no keywords
(If this isn't allowed, please let me know.)
Are there any comms for posting/sharing LJ-relevant code generators?
I'm on the cusp of finishing one. It's very simple (and very amateur, I'm sure), but it displays moodthemes in a table, letting the user input values for title, font, and link color, as well as a theme creator link (and of course the theme folder).
I think many theme makers might like this, but don't really know where/how to get the word out (besides posting it on my personal LJ, which has perhaps a handful of visitors).
Many comms have very strict rules of what they do and don't allow, and I'm not exactly sure where this fits in.
Source: http://community.livejournal.com/php/615773.html
-
Append value to existing array key
Date: 02/26/08
Keywords: database
I'm trying to create an array that holds the name of the table as its key, and the field as its value. The array is populated via database output. However, the same table may be listed multiple times, since more than 1 field for each table can be present.
However, I am having trouble appending a field to the previously created key/value pair.
$search_array = array();
$current_table = '';
$result = $d->dbQuery('SELECT the_table, the_fields FROM sitesearch ORDER BY id');
while($row = $d->dbFetchObject($result)):
if ($current_array != $row->the_table):
$search_array[$row->the_table] = $row->the_fields;
$current_table = $row->the_table;
else:
$search_array[${$row->the_table}] .= ','.$row->the_fields;
endif;
endwhile;
Source: http://community.livejournal.com/php/615163.html
-
The Future Of Social Networking
Date: 02/22/08
Keywords: no keywords
THE FUTURE OF SOCIAL NETWORKING
0. Introduction.
Almost three years ago, I started the Appleseed Project as a way to start experimenting with the idea of distributed social networking. Armed with enough hubris and naivete to think I could build it alone, I coded and coded until I got to the point I am now: With a project that stands at around 75% complete, it functions as a sort of proof-of-concept for distributed social networking in general. I've learned a lot, however, about the technological hurdles and impact that a truly open and distributed social networking platform could provide.
I'm writing this as a way to present my ideas and what I've learned in the hopes that an open and distributed solution becomes the direction that social networking takes. Although I would be happiest to see Appleseed succeed, I'd be excited to see any open and distributed social networking solution be adopted and replace the walled gardens that currently dot the internet landscape.
Read More
(note: please digg this up if you have a digg.com account!)
Source: http://community.livejournal.com/php/614891.html
-
hosting question
Date: 02/21/08
Keywords: php, mysql, database, sql, hosting
i have a new client that moved their site from a good but expensive hosting company to a not so good but inexpensive one. the reason was just price. the expensive one was $300 a month, the inexpensive $100 a year. their site is written in php with a mysql database. they are using about 7.5 megs of their database. the problem, of course, is performance: response is ridiculously slow, they are having form problems, et al. now my question. does anyone here know of any decently good hosting companies that i could recommend to my client? they need a switch, but i don't think they want to go back to the one that is $300 a month. usually i deal with very small sites, so i don't know any myself that can manage all this data. thanks for any help you guys can provide, this community is great :o)
Source: http://community.livejournal.com/php/614413.html
-
Comparing Data
Date: 02/17/08
Keywords: database
I have two arrays. one is data from a database, one is data from a form. If the data in the two arrays are the same, meaning no changes were made to the form, then I want to know so that a database update is not needed. If the data are different, then I want to not only update the database, but mark the time and date of the new update.
Here's what I've come up with:
$difference=array_diff($formdata, $dbdata);
$num_diff=count($difference);
if ($num_diff!=0){ update Database & set new date_updated }
Might there be a more elegant way to do this?
Source: http://community.livejournal.com/php/614320.html
-
Freelancing
Date: 02/17/08
Keywords: php, programming
What sites do you recommend when looking for freelance programming jobs, especially php jobs?
Source: http://community.livejournal.com/php/613901.html
-
PHP Categories?
Date: 02/16/08
Keywords: php, web
Question. I'm trying to make a website. I already have the PHP for the header, footer, etc. I'm trying to find the script that involves making like categories for the pages. An example is THIS SITE. When you click on her links in the center, the URL becomes:
http://sawyoucry.net/you-download.php?page=brush
How do I go about of doing this? I hope this makes sense.
Source: http://community.livejournal.com/php/613706.html
-
breadcrumbs
Date: 02/14/08
Keywords: browser, web, yahoo
Hi.. I have to add breadcrumbs to my company's... My first thought is to write a script that will create the links dynamically.
Do you guys have any experience or input regarding implementing a breadcrumb script/solution before I get started?
Thanks
For reference: Breadcrumbs
"There are 3 types: path, attribute, and location. The location breadcrumb is the one most commonly seen. It is a visual display or a page's location within a site. For example, Yahoo! uses location breadcrumbs when it shows you that the page you are on is categorized:
Health>Children>Bed Wetting>Treatment>Cleaning Up
With this, users can see where the page they are on is located in the hierarchy of the site. A 2003 study by Rogers and Chaparro reported is Usability News asked the big question: does Breadcrumb navigation positively affect a user's experience?
There has only been limited research on breadcrumb navigation. However, the studies that have been performed have shown that breadcrumb navigation makes site navigation simpler and more efficient (Bowler, et al. 2001; Maldaonado & Resnick, 2002). In 2003 Bonnie Lida, Spring Hull, and Katie Pilcher examined if study participants would use breadcrumb navigation when given the task of finding several items on a website. They also studied what other methods the subjects chose to use, such as the browser back button or search fields. They hypothesized that breadcrumb navigation was more useful for browsing than for searching for specific terms."
article
Source: http://community.livejournal.com/php/613206.html
-
nl2br and strip_tags
Date: 02/13/08
Keywords: php, yahoo
i'm still fairly new to php, so this questions may be pretty obvious.
i'm trying to allow strong, em, and a tags to pass through, but i also want to keep the breaks. all is fine with strong and em, but a's attributes show through. when i get rid of nl2br, everything works, but then i lose my breaks. here is my code:
$post = strip_tags($post, '');
$post = nl2br($post);
the link looks like this when it outputs:
href="http://www.yahoo.com">click here
a is missing, but the href shows through. link hovers, but of course, it doesn't take you anywhere.
thanks in advance!
Source: http://community.livejournal.com/php/612909.html
-
PHP and Java/J2EE
Date: 02/12/08
Keywords: php, java
Hey, I was wondering if you could recommend some sites/books on learning Java for PHP programmers. I have 2 years of professional exp in PHP but I see a lot of job ads for Java/J2EE developers and I want to add it to my resume. Any help is appreciated. Thanks!
Source: http://community.livejournal.com/php/612806.html
-
Form-Generated Image..?
Date: 02/11/08
Keywords: php, google
Hello; I'm new to this comm and fairly new to php. I'm very sorry if this is a ridiculously stupid question, but I'm not sure where to start with this (and Google/PHP's help articles are no use).
I basically just want to create something like this - where you fill in a form and an image is generated based on your responses/entries. (Although I'd like to do one mimicking a Facebook profile, since Livejournal refuses to allow div/style commands on user bios.)
I promise I'm not a simpleton and I'm not asking to be walked through the whole thing - just an idea where to start (some sample code would be marvellous) would be lovely.
Thank you very much in advance!
Source: http://community.livejournal.com/php/612563.html
-
low-cost logging?
Date: 02/11/08
Keywords: no keywords
I've been trying to find a low-cost (memory/time) way of logging application events/data and the one idea that came to me was using something like
file_get_contents("http://inside.my.network.local/logthis/?u=unixTimestamp&i=machineID&l=levelCode&m=escapedMessage&uid=userID") that way I could use a python server built just to handle message logging. My only thought, is there a better (non-blocking) way, perhaps with curl, embedding all the data as Post instead of Get variables and setting the timeout to something low like 5MS max.
Source: http://community.livejournal.com/php/612144.html
-
Looping through data, creating table
Date: 02/08/08
Keywords: php, html
A client needs a table of data displayed as follows:
Title 1 |
Title 2 |
Title 3 |
image 1 |
image 2 |
image 3 |
Desc 1 |
Desc 2 |
Desc 3 |
|
Title 4 |
Title 5 |
Title 6 |
image 4 |
image 5 |
image 6 |
Desc 4 |
Desc 5 |
Desc 6 |
The data is stored in an array, so I am looping through results. How do I create a table with this exact layout? The key is the title, image and desc need to be level on each row. The client did not like everything put in one cell, since the images & titles were different sizes & lengths.
I was using this
foreach ($array_clips as $clip => $data)
{
if ($c==0)
{
$html .= "";
}
$title = $data[0];
$description = $data[1];
$image = $data[2];
$html .= "
$title
$description |
";
$c++;
if ($c==3)
{
$html .= "
|
";
$c = 0;
}
}
Any suggestions on a good way of doing this?
Edited I came up with a solution of my own: http://community.livejournal.com/php/612044.html?thread=4427980#t4427980
Source: http://community.livejournal.com/php/612044.html
-
exec() question
Date: 02/06/08
Keywords: php, database
Has anyone had any luck running exec() in the background?
I'm using php to initiate a perl script using exec with the following...
exec('cd /usr/local/www/data/site/parse; perl parse_dbf.pl "'.$var1.'" "'.$var2.'" "'.$var3.'"');
now that parse dbf.pl is doing a lot of various database updates and takes several minutes to run, and since the php page that's running it is waiting for it to finish, it dies before completion.
I also don't want to do something like set_time_limit(), because that's just messy and hangs the page.
Looking at the php docs for exec, I see "If you start a program using this function and want to leave it running in the background, you have to make sure that the output of that program is redirected to a file or some other output stream or else PHP will hang until the execution of the program ends."
This sounds like exactly what I want it to do, but I'm not having any luck getting it to run.
I've been googling for ideas, but nothing has worked yet. My most recent attempt (and there have been many variations) looks like:
exec('cd /usr/local/www/data/site/parse; perl parse_dbf.pl "'.$var1.'" "'.$var2.'" "'.$var3.'" > holdfile.txt 2>&1');
It quickly executes the php page, but doesn't actually run the perl.
I'm stuck. Has anyone had luck with this? Any ideas?
Thanks
_________
edit: This seems to work (although for some reason without changing the set_time_limit(), it only changes 70 of the 1657 records it's suppose to edit. Anyway, I'll figure that out. Thanks.
exec('cd /usr/local/www/data/site/parse; perl parse_dbf.pl "'.$var1.'" "'.$var2.'" "'.$var3.'" > /dev/null 2> /dev/null & echo $!');
Source: http://community.livejournal.com/php/611669.html
-
php/linux permissions
Date: 02/02/08
Keywords: php, apache
In an Ubuntu distribution, I believe PHP runs as user www-data (inheriting the user name of apache).
All of the files I create have my user name and my group name.
I have a script that requires write access to some files and folders.
Is it better to add www-data to my group, or is it better to make these files and folders world writable (ie 0777)? Or is there another approach I am missing?
Source: http://community.livejournal.com/php/611462.html
-
Calendar issue
Date: 01/30/08
Keywords: php
Hello,
Very glad to find this community, why it hadn't occurred to me to search for one on LJ before now is beyond me. I'm trying to transition out of a user/network support position and into a more backend/developer role. As such I've been working on various projects that I've either suggested and implemented or I've been asked to work on in addition to my normal duties. I've ran into a snag with one of the projects, and I'm hoping someone here can offer some insight. :)
I'm working with WordPress MU and trying to get a calendar plugin that was written for the standalone WordPress to work. I have a modified copy that another MU user has working on his site and it is working somewhat on mine, but with a problem. I think the problem is in the PHP script. I have asked about this over on the WPMU boards but so far no responses, hoping maybe someone here will be able to point me in the right direction. You can see a properly working version of this calendar here. My installation is on an intranet so I can't share it.
The problem is that the calendar isn't rewriting properly. I go to the calendar page at
http://URL/calendar
and it is fine.
I can click PREV or NEXT and it properly navigates to the Dec 2007 or Feb 2008 page. But then when I click "Previous" to go back to January, it adds an extraneous 2008 both to the URL and the calendar display.
http://URL/calendar/2008/2008/jan
And, any events I had posted to the Jan 2008 calendar are missing because that is not the Jan 2008 calendar, it is the Jan 2008/2008 calendar.
Clicking Previous again brings up the Dec 2008/2008/2007 calendar page with the URL
http://URL/calendar/2008/2008/2007/dec
It just keeps tacking on extraneous years with each subsequent PREV or NEXT movement.
The calendar.php script is large so rather than include it in this post here's a link to it . I am not sure which function I should be focusing on, next_link, prev_link, or calendar. Or perhaps I'm completely wrong in looking there at all.
I do have rewrite rules in the .htaccess:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /wpmu/
RewriteRule ^.*/calendar/(.*)/(.*) wp-calendar.php?year=$1&month=$2 [QSA,L]
RewriteRule ^.*/calendar wp-calendar.php [QSA,L]
#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
If you can offer me some pointers on where I should be making changes to the script, if any, I would really appreciate it. :) Thanks!
Source: http://community.livejournal.com/php/611113.html