I want to generate random strings like:
sssder
tvmwww
66rfdd
123123
oo007oo
1234
2020
1111
rrrr
r8r8r
uiuiu
wewewe
fefefe
abced
xyz..
Specifically, I want a string with a length of 5 to 8 characters that is easy to remember. Is this possible?
...
Hello.
I am using FFmpeg for the video conversion and thumbnail generations on my php site, but the main problem is that if I upload any file it is directly converted to flv.
And thumbnail genration: how how can I do this?
Please help me.
...
I have three different crawler scripts that I want to run in parallel and I'm wondering what command do I use to execute all three at the same time.
I'm on a nix platform
...
I need a replacement for PHP's rand() function that uses a cryptographically strong random number generator.
The openssl_random_pseudo_bytes() function gets you access to the strong random number generator, but it outputs its data as a byte string. Instead, I need an integer between 0 and X.
I imagine the key is to get the output of o...
I've been reading several articles on MVC and had a few questions I was hoping someone could possibly assist me in answering.
Firstly if MODEL is a representation of the data and a means in which to manipulate that data, then a Data Access Object (DAO) with a certain level of abstraction using a common interface should be sufficient for...
I have the following arrays below in PHP that I store a user_id number in to keep track of moderator/admins on my site, then in a page I can just use in_array() to determine if a user should have moderator privileges, I figure this saves some mysql queries by using an array instead.
I am wondering, would there be any performance gain ...
Hey all!
I need to match all 'tags' (e.g. %thisIsATag%) that occur within XML attributes. (Note: I'm guaranteed to receive valid XML, so there is no need to use full DOM traversal). My regex is working, except when there are two tags in a single attribute, only the last one is returned.
In other words, this regex should find tag1, ta...
I want to have a user select a file and then have php put the contents in db. Now the last part (processing the file in php) is easy. But is there a way I can process a user selected file whithout a new page load?
If I use the following:
<FORM ACTION="upload.php" METHOD="post" ENCTYPE="multipart/form-data">
<INPUT TYPE="file" NAME="som...
Here is client Side code:
jQuery(document).ready(function(){
jQuery("#list").jqGrid({
url:'example.php',
datatype: 'xml',
mtype: 'GET',
colNames:['Inv No','Date', 'Amount','Tax','Total','Notes'],
colModel :[
{name:'invid', index:'invid', width:55},
{name:'invdate', index:'invdate', width:90},
{...
Which of the following code is better in building a delete -action for removing a question?
1 My code
<a href='index.php?delete_post=777>delete</a>
2 Stack Overflow's code
<a id="delete_post_777>">delete</a>
I do not understand completely how Stack Overflow's delete -button works, since it points to no URL.
The id apparently can ...
Is there any way to make a PDO object throw an error if a query takes too long? I have tried PDO::ATTR_TIMEOUT to no effect.
I'd like a way to have a query throw an error if it is running for longer than a certain amount of time. This is not something that I can do in the database, ie, no maintenance jobs running on the db or anything...
hi there,
i've read a book on PHP coding and I've also created my own project from scratch (it was a personal blog) but I would like to gain more practical experience on topics such as security, architecture, and design. I believe analyzing the code of professionals will help me gain such knowledge.
I have looked at wordpress as well ...
Hey guys - The problem stems from a poorly designed database used to store real estate information. I set up a template for my client to select a weekend and to display the open houses for that weekend. Open house times (ohtime1, ohtime2, ohtime3) are stored as tinytext, with no way of knowing AM or PM. "12:00 - 2:00" and "01:00 - 03:00"...
I've read through the Google Spreadsheets API PHP documentation. All examples are using Zend, which I cannot use. See this page: http://code.google.com/apis/spreadsheets/docs/1.0/developers%5Fguide%5Fphp.html
Does anybody know a simple example of the following:
How can I use PHP w/ curl (or whatever) and the Google Spreadsheets API to ...
I have this sql query:
SELECT DISTINCT r.uri uri
FROM resource r
INNER JOIN object o ON o.idResource = r.idResource
WHERE r.type = 2
AND r.idResource IN (
SELECT DISTINCT r1.idResource
FROM object o1
INNER JOIN resource r1 ON r1.idResource = o1.idResource
INNER JOIN class c1 ON c1.idClass = o1.idClass
INNER JOIN property p2 ON...
Trying to run a cron job every few hours that reads the current Twitter Trending topics listed here:
http://search.twitter.com/trends.json
And then dump the top 10 trends into a mySQL table on my server
how to do this? thanks
...
Hello, in PHP, how would one return from an included script back to the script where it had been included from?
IE:
1 - main script
2 - application
3 - included
Basically, I want to get back from 3 to 2, return() doesn't work.
Code in 2 - application
$page = "User Manager";
if($permission["13"] !=='1'){
include("/home/radonsys/p...
I am trying to read get parameters in such a way that will not open up potential security issues.
What I was thinking was matching the request parameter explicitly to what I expect and then setting a default for anything that doesn't match.
For example:
if ($_REQUEST['media'] == "video")
$sort = "video";
elseif ($_REQUEST['media']...
Hello
I need a way to upload a file and POST it into php page...
My php page is:
<?php
$maxsize = 10485760;
$array_estensioni_ammesse=array('.tmp');
$uploaddir = 'uploads/';
if (is_uploaded_file($_FILES['file']['tmp_name']))
{
if($_FILES['file']['size'] <= $maxsize)
{
$estensione = strtolower(substr($_FILES['file']['name...
Hi,
Somebody asked me to created a PHP image gallery that will read the images out of a directory and then create thumbnails for the gallery. There is one directory with thumnails, and one directory with fullsize images.
I read the file names out of the /thumb/ directory and insert each file name as a value into the thumbArray. From t...