How can I make short random unique keys, like YouTube video IDs, in PHP?
is any ability to create keys like in youtube (nWChTnkVdKE)? ...
is any ability to create keys like in youtube (nWChTnkVdKE)? ...
I am using javascript to run a XMLHttpRequest to a PHP script which returns data. Basically I want to be able to provide the user with a progress bar (instead of a spinning circle or something) that shows the progress of getting and receiving the data. I know if I was getting a file, I could just check the content length header and use t...
What is the correct way to change the active Drupal theme programmatically? ...
So I'm in the process of writing an ASP.NET application that requires to import users from a PHP application. The passwords were hashed using MD5 into the database, so the user table records looks more or less like this: user Password user1 827ccb0eea8a706c4c34a16891f84e7b user2 e10adc3949ba59abbe56e057f20f883e And so on. I have acce...
Hey all, I am a designer/front-end developer but I have to move the div with a class of "span-4" before the div with a class of "span-20." The developer who wrote the php is not available to ask how to not mess up his php markup. Thank you in advance for any help! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3...
Hi Guys, I am trying to create a php script that inputs the HTTP links pasted into a textarea into a separated row in a database. More exactly: First page is where the textarea (name=textarea-linkfield) is, links are going to be pasted here http://www.stackoverflow.com http://www.yahoo.com .... http://google.com The links are being ...
Hello I am creating a XML navigation for my website. This line below is causing a simpleXML issue: <label>Osnabrück</label> My PHP code, using HTMLentities has changed Osnabrück into Osnabrck . However, when trying to parse my XML with this line in it, I get this error: /application/configs/navigation.xml:318: parser e...
I have an array of categories: categories = computers, entertainment, products, graphics cards The array is sometimes returned in the wrong order BUT each category has a parent which exists in the SAME array. categories = products[parent=0], entertainment[parent=products], computers[parent=entertainment], graphics cards[parent=com...
This is weird, so be patient while I try to explain. Basic problem: I have a massive string -- it can be of varying lengths depending on the user. My job is to acquire this massive string depending on the user, then send it off to the other piece of software to make a tag cloud. If life were easy for me, I could simply send the whole t...
I'm creating a web application that uploads websites from my server to youtube on behalf of the users. I have followed Google's documentation for PHP and been sucessful in obtaining a session token. Here is my code I'm using to retrieve my session token: require_once 'Zend/Loader.php'; Zend_Loader::loadClass('Zend_Gdata_AuthSub'); $...
For an upcoming project, one of the requirements is to translate the web application in a few languages, one of which is in Arabic. I know plenty about dealing with multiple languages, and know plenty about unicode. What I'm wondering is if there's some basic tips and recommendations I can follow anticipating an Arabic translation for m...
Hello I am using an MVC architecture for my web application. Now the problem is I have my views in one place and have my images folder in another place. Now I am unable to get my images printed in the right places since, I cannot get my paths right. Even though I give the absolute paths, the images are not getting printed. images locati...
Hi, I'm working in a website that is going to work like a landing point, providing a specialized service for many other websites. Users log-in to different sites and those sites have links to my website. Now, I want to create my website using asp .net, and also I want to be able to use SSO (Single Sign-On) so the users doesn't have to ...
Hi there, I'm trying to convert this adaptive bayesian rating formula into PHP code.. http://cl.ly/cabd3372e2860b52e3db Here are the details of the various parts of the formula.. nvotes : total number of votes so far nlinks : total number of links nvotes(k) : number of votes cast to rth link. deltarank(k, m) : rank increment caused b...
Hi guys, My php application must create 2 copies of 12000 optimised jpgs, 1 copy of each on 2 different servers. Am I best to create the images on my server then move them, or create them on the remote ftp's. Both would be using php ftp functions. ...
Currently I am working on a PHP script to output a CSV file from entries in a MySQL database. My problem lies in how to correctly output the values. Many of the entries in the MySQL database will contain commas and quotes, which destroy the format of the CSV file if I just plainly print them out to the file. I'm aware that I can surro...
i'm going to explain the flow of what i need: the checkout process is the same, now, in the last step, i'm doing POST to an external URL, where all the data is processed, i wait to the response of the external server, after process it, i make the correspondient step, 1- Save the order in the db or 2- Give an error message. it depend on t...
I have two processes running in different scripts indepdent of each other. PHP #1 script reads the filename of a file and writes it to a DB PHP #2 script uploads the file I would like to create a third script (also independent) that only executes once script #2 has fully completed uploading the file. I'm thinking of using PHP's floc...
I'm using the PECL intl module to localize dates and numbers in a PHP project. In all other languages I'm using (40), localizing ordinal numbers works fine. In Swedish, however, I get strange output. It appears to be the template constants used to generate the ordinals. $fnf = new NumberFormatter('sv_FI', NumberFormatter::ORDINAL); echo...
I have strings that looks like this: John Miller-Doe - Name: jdoe Jane Smith - Name: jsmith Peter Piper - Name: ppiper Bob Mackey-O'Donnell - Name: bmackeyodonnell I'm trying to remove everything after the second hyphen, so that I'm left with: John Miller-Doe Jane Smith Peter Piper Bob Mackey-O'Donnell So, basically, I'm trying to ...