Hello,
I'm trying to find out how to build nice and short alpha numeric hashes like the kind used in youtube urls.
Example: http://www.youtube.com/watch?v=rw71YOSXhpE
Where rw71YOSXhpE would convert into video number 12834233 (for example).
These integers could be reversed in PHP to an integer and then looked up in a database.
I've ...
I have my main website and wordpress in different directories on my server on which I use nginx as the web server. The main website is in /home/me/www and Wordpress is in /home/me/wordpress. I need to have them in separate directories this way for a particular reason. How do I specify this in the nginx configuration file? I currently hav...
I need to keep a persistent connection open across multiple page requests. You cannot put PHP resources into the session.
My solution is to trigger a deamon on the first request and keep the PHP resource there. I then need to get the deamon to talk to my different page requests. I could do this the long way by using a database or file b...
Hello everybody!
I'm writing a small script which generates some configuration for devices. I want to have separate file, where I'm storing configuration, and change some strings during printing the content of the configuration to the browser. How can I replace string in a line of the file with a variable from $_POST['somevariable']?
--...
hi
I have some php code as below.
<?php
$value = -1924050635;
echo "before:".$value;
echo "<br/>";
$value = sprintf('%u', $value);
echo "<br/>";
echo "after:".$value;
?>
Before value is -1924050635
after value is 2370916661
My problem is that what the sprintf is doing here.
What i need to do if i want ...
Hi,
I am trying this new method I've seen serializeArray().
//with ajax
var data = $("#form :input").serializeArray();
post_var = {'action': 'process', 'data': data };
$.ajax({.....etc
So I get these key value pairs, but how do I access them with PHP?
I thought I needed to do this, but it won't work:
// in PHP script
$data = json_d...
i have thi function :
<?php
function getmypost($number)
{
query_posts('p=1828');
while (have_posts()) : the_post();
the_title('<h1>', '</h1>');
the_content();
endwhile;
}
?>
i need to make the 1828 as a variable
i have try :
query_posts('\'p='. $number .'\'');
it does not work.....
Hi,
I am using Oracle Application Express and I was wondering whether it's possible to call php inside a pl/sql page process?
Can I use htp.p or htp.prn in pl/sql?
For example, let's say I have a php function on the server that returns the remote_addr of the local machine - I basically would like to capture this function value and add...
I am currently working on a PHP project with an Oracle database. To update a table, the php code I'm working with uses a SQL "MERGE INTO" method to loop through a table and see if values for multiple records exist in another table. If they don't exist yet, the values are inserted into my table. If the values already exist, nothing hap...
I'm have a java program that uses Apache httpclient api. This is used to login to and communicate to a webapp. Once logged in, there's a situation in which the program issues an execute process to open up firefox to hit the webapp and allow the user to see data in the browser. Since the java program is already logged in, is there a way...
I've created a form which works fine, but when I put it in a table it always thinks the form is incomplete - is there a way I can put it in a table (so it looks nice!) without this problem?
-----My HTML------
<h2 class="green">Interested in making life easier?</h2>
<form method="post" action="sendemail.php">
<?php
$ipi = getenv("REMO...
Who knows about a "mature" workflow engine for php?.
I am looking forward to use it from an application made using symphony framework.
Thanks !
...
I've seen many examples of this (clickatell.com among them) that only support text in the USA. I need my application to receive images/videos from text messages (MMS?) from users. The web app needs to receive a way to identify the user (phone number) and the actual files (in the same fashion facebook has implemented for sharing photos vi...
I've downloaded the Zend GData package to use the Google Calendar API. When I look through the contents of the package it seems to contain loads and loads of stuff. Do I really need all of it just for using Google Calendar and no other Google APIs? If not, what can i safely get rid of?
...
I have a PHP script that simply takes some data, separates it into tab delimited format, saves it as an .xls file, and then gives user a link to download it.
Works well most of the time, but some people are getting cached versions of the exported .xls file.
What I am thinking I need to do is instead of giving user a direct link to the ...
hi, I am using a MySQL INNER JOIN statement which returns various results for one distinct record in the main table from the joins, similar to http://stackoverflow.com/questions/1038653/how-to-join-multiple-joins-yet-return-distinct-values
My query is
SELECT cl.*, dep.dept_name
FROM epapers.clientelle cl
INNER JOIN epapers.dept_s...
I'm trying to build a form dynamically based on the field and its definitions stored in a XML file. In my xml, I have defined 1 checkbox with some label and 1 textfield with some label.
How do I build a form dynamically based on what I have in my xml.
I dont want to create any models.
...
Possible Duplicates:
Career with PHP or ASP.NET?
Learning PHP or ASP.NET?
I would like to become a web programmer. I am a database programmer and would like to change directions. I can't decide whether to focus my efforts on PHP/LAMP vs. Microsoft .NET.
Any thoughts?
...
How is it possible that the snippet below prints out "readablenot readable" ? afaik a die() should stop everything immediately?
EDIT: posted the full function. This is a function from Zend_Search_Lucene_Storage_File_Filesystem. We're always getting "file not readable" errors. The file does seem to be readable but the snippet below print...
In the auth module, we have users and roles with a many to many relationship.
My question probably has a simple answer, but I couldn't find it by myself... How would I go about selecting only users having a certain role using ORM?
What I'd like to do is something like this:
ORM::factory('user')->with('roles')->where('role','member')->f...