TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Showing results 1 to 25 of 126
Search took 0.02 seconds.
Search: Posts Made By: Sam Granger
Forum: General 11-09-2009, 03:37 PM
Replies: 6
Views: 2,560
Posted By Sam Granger
How does Facebook store all that information?

Hey guys!

I'm quite interested in scalability and was wondering, how does Facebook manage to have such a huge database?! Surely it's spread over multiple databases, how does it know what page/user...
Forum: MySQL & Databases 07-30-2009, 02:29 PM
Replies: 5
Views: 760
Posted By Sam Granger
Either what has already been said, or double...

Either what has already been said, or double clicking of button, maybe even using back button. Do you always get duplicate entries?
Forum: General 07-24-2009, 11:06 PM
Replies: 15
Views: 11,723
Posted By Sam Granger
Very odd. Have you checked if there are any other...

Very odd. Have you checked if there are any other httpd.conf files? I remember having to change a lot of php.ini files in xampp to found out which one had to be editted :-)
Forum: General 07-24-2009, 09:26 PM
Replies: 5
Views: 1,190
Posted By Sam Granger
You seriously wrote that? It worked a charm! How...

You seriously wrote that? It worked a charm! How fast is it compared to going down the file_get_contents & explode method?

I loved the fact that the function worked fine with eg:



Not just


Also...
Forum: General 07-24-2009, 08:49 PM
Replies: 5
Views: 1,190
Posted By Sam Granger
Salathe, that SplFileObject::fgetcsv looks pretty...

Salathe, that SplFileObject::fgetcsv looks pretty awesome! Thanks for the help, I'm going to give it a try now :-)
Forum: General 07-24-2009, 05:33 PM
Replies: 5
Views: 1,190
Posted By Sam Granger
Some questions about file_get_contents

How do I manage to get the following, but with file_get_contents instead of fopen?

$fp = fopen($filename, 'r');
$content = implode('', file($filename));
$content_array = explode($seperator,...
Forum: General 07-16-2009, 07:48 AM
Replies: 2
Views: 594
Posted By Sam Granger
Ah, silly me - make link from subdomain to id in...

Ah, silly me - make link from subdomain to id in the php file it calls :)
Forum: General 07-15-2009, 02:55 PM
Replies: 2
Views: 594
Posted By Sam Granger
htaccess: Options +FollowSymlinks RewriteEngine...

htaccess:
Options +FollowSymlinks
RewriteEngine On

Options -MultiViews

RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com [NC]
RewriteCond %{HTTP_HOST} ^([a-z0-9]+)\.yourdomain\.com
RewriteRule (.*)...
Forum: Tips & Tricks 07-14-2009, 12:25 PM
Replies: 5
Views: 1,433
Posted By Sam Granger
Crap, I always forget about chmod!

Crap, I always forget about chmod!
Forum: Tips & Tricks 07-13-2009, 10:59 PM
Replies: 5
Views: 1,433
Posted By Sam Granger
Indeed - but you can't always do this immediately...

Indeed - but you can't always do this immediately when it happens. It's just a precaution.
Forum: Tips & Tricks 07-13-2009, 09:11 PM
Replies: 5
Views: 1,433
Posted By Sam Granger
How to protect your php files & database if PHP fails!

On occasion, I'll come across a PHP powered site, some are popular, some are sites that I am visiting for a first time. But what I'm talking about here is when PHP is down on a server. This gives...
Forum: General 05-04-2009, 03:10 AM
Replies: 1
Views: 450
Posted By Sam Granger
Find what PHP version is required?

Hey guys!

Are there any applications that allow you to find out what the minimum requirements are of a script? I know I could look up all the php functions and see in what version they were added...
Forum: Tips & Tricks 05-01-2009, 01:46 PM
Replies: 1
Views: 1,271
Posted By Sam Granger
How to check valid license without connecting to external server

Hey guys!

I've been working on a paid script and was brainstorming how I could protect my script against piracy. While I like products like IONCube, I do not like encoding a whole product - the user...
Forum: Javascript, AJAX, E4X 04-29-2009, 03:21 AM
Replies: 0
Views: 798
Posted By Sam Granger
2 or more forms don't want to play along nicely..

Right, I have an ajax cart and this is my problem. I have a form that submits an id through AJAX. This form is recognised through its class form. See the JS below. Anyway, this works fine for 1 form...
Forum: General 04-26-2009, 10:01 PM
Replies: 1
Views: 634
Posted By Sam Granger
Doh! total and total2 sre the same value in many...

Doh! total and total2 sre the same value in many cases ofcourse! Silly me. Solved :)
Forum: General 04-26-2009, 09:54 PM
Replies: 13
Views: 675
Posted By Sam Granger
Exactly :) ^^

Exactly :) ^^
Forum: General 04-26-2009, 09:29 PM
Replies: 13
Views: 675
Posted By Sam Granger
Old school you might say - template files are...

Old school you might say - template files are easier to work with, but PHP in itself is a templating script. There's nothing wrong with your method, and it's the 'fastest'. But this just makes it a...
Forum: General 04-26-2009, 09:22 PM
Replies: 13
Views: 675
Posted By Sam Granger
Yep, but smarty is quite large, has lots of...

Yep, but smarty is quite large, has lots of functionality that I don't need. But it has some nice addons. This is just nice and simple.
Forum: General 04-26-2009, 09:13 PM
Replies: 13
Views: 675
Posted By Sam Granger
Example of header.html - also placed in the...

Example of header.html - also placed in the template dir.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta...
Forum: General 04-26-2009, 09:11 PM
Replies: 13
Views: 675
Posted By Sam Granger
PS. VIEW_PATH is a define in the class - so you;d...

PS. VIEW_PATH is a define in the class - so you;d need to change that to the dir that contains the files.
Forum: General 04-26-2009, 09:10 PM
Replies: 13
Views: 675
Posted By Sam Granger
Well, lets say I have index.php - I define some...

Well, lets say I have index.php - I define some variables (template filename and content) and send that to the class - class handles it from there, if I want to include a header file, I define that...
Forum: General 04-26-2009, 08:35 PM
Replies: 13
Views: 675
Posted By Sam Granger
I use a Template Class - basically, I can have an...

I use a Template Class - basically, I can have an index.html file with php include for header and footer inside, parse variables to it, have while loops if needed. I always design a page in html,...
Forum: General 04-26-2009, 06:28 PM
Replies: 1
Views: 634
Posted By Sam Granger
CPU load function - division by zero error :(

The following function seems to give me a Division by Zero error - not all the time but quite a lot of the time.

class Linux_Server extends ServerLoad {
function loadAverage($bar = false)...
Forum: General 04-22-2009, 11:42 PM
Replies: 3
Views: 414
Posted By Sam Granger
Do I have to clean session id?

Quick question here.

@session_start();
$session = session_id();

Would I have to clean $session before inserting into DB? Is there any way someone can change there browsers session into harmful SQL...
Forum: General 04-16-2009, 10:44 PM
Replies: 5
Views: 429
Posted By Sam Granger
Ah! Starting to understand OOP a bit better now,...

Ah! Starting to understand OOP a bit better now, thanks Salathe! ^^
Showing results 1 to 25 of 126

 

All times are GMT. The time now is 09:38 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design