php

Problem with Flash PHP upload

Hi there, I am using a script to upload photo (written by my own) which allow user to select more than 1 files, using Flash. When user click upload, as3 will post the upload file to upload.php, resize it, and save it one by one. The problem: In production server, if I am uploading many photos and the photos size are very large, >2MB, t...

PHP array echo problem

Sorry i am a bit of a newbie. I have a form with some inputs which are arrays and some which are not <input type="text" name="name" value="name1111" /> <input type="text" name="email" value="email1111" /> <input type="text" name="model[]" value="model1111" /> <input type="text" name="serial[]" value="serial1111" /> <input type="text" ...

WPF app + PHP, fastest way of communicate data

Hello may be you can help me. I'm wondering about the fastest way to send and receive information between a WPF app (client) and a PHP (web hosting server). Is tcp with sockets the way to go? or it'll have problems with the firewalls and IT related stuff? Do you recommend me to go for a rest php version? Webservices? I would like to...

How to use OpenID on my website.

I am using OpenID in our website but yahoo id is not verified. And from other OpenID I am not getting user detail so that I can store in the database. ...

Testing server load time with PHP?

Is there a way to determine how long it takes a web page, and all it's content, to load with PHP? I have already tried this: $time_start = microtime(true); (All the content of the web page here) $time_end = microtime(true); $time = $time_end - $time_start; echo $time; However, the problem with this (as far as I can tell) is that I'...

Make first every first character uppercase in array

Hi! I'm trying to get all my first characters in a PHP array to be uppercase. PHP code: <?php $ordlista = file_get_contents('C:/wamp/www/bilder/filmlista.txt'); $ord = explode("\n", $ordlista); sort($ord,SORT_STRING); foreach ($ord as $key => $val) { echo $val."<br/>"; } ?> Thanks ahead for answers! Solved: <?php $ordlista ...

Are MySQL datetime and timestamp fields better for PHP apps then Unix timestamp ints?

I was reading over an article that shows some really good information and benchmarks about how well the three different MySQL date/time storage options perform. MySQL DATETIME vs TIMESTAMP vs INT performance and benchmarking with MyISAM While reading the article you start to get the idea that using ints are just a waste and you should...

Improving a constructor

Alright, I'm working on making a Member class for my website. I want to make it as optimized as possible. Currently, the constructor can take ($resource) either an int (to grab info from one member in the database, based on id) or an array of ints (to grab multiple members from the database, and store them in an array member variable)....

Java vs. PHP Speed Comparison

Which language is faster for web, Java or PHP? ...

submitting a form with out using submit?

Hi I want to submit a form without using submit button how can i do that? ...

PHP ecommerce system: which one is easiest to modify

I will have to set up ecommerce application. It will be ecommerce with high traffic (thousands views per day, few thousands orders per day, 30000+ products). I’m looking for ecommerce software written in PHP. I have checked: Oscommerce zencart Magento (http://www.magentocommerce.com/) PrestaShop (http://www.prestashop.com/) + OpenCart ...

Trying to write to a MySQL database with a PHP form

I'm trying to do a simple write to database with an HTML form, using PHP. I've run the SQL query in the database and it works perfectly. However, using the form doesn't work. I'm not sure why. Any help? The user/pass/db name are all correct. <?php if(isset($_POST['submit'])) { $con = mysql_connect("localhost","delives0_ideas","ideas")...

Registration Form Checking The Two Password Are Matching

hello. Hello, I want to make this registration script tell the user when the passwords they have entered are not matching. and i use this code: if ($_POST['pass' != 'pass2']) { echo ("Oops! Password did not match! Try again. "); } please help me to correct my coding. :-( thanks so much! ...

What is the best way to solve this problem in a model?

I come across this a lot, and have always been curious if there is better way. Consider this (example only, assume an OO query builder) class Dogs extends Pets { public function getAll() { return $this->parseRows($this->db->get('dogs')); } public function getBig() { return $this->parseRows($this->db->get('...

How can I provide temporary links to web pages ?

I intend to give my users the ability to share a link to their profile with other people, however this link should not be the usual link. Instead : it should not give out the real landing page the user should be able to deactivate it if they wish Is this possible ? ...

PHP word index, performance and reasonable results

Hello, I'm currently working on an indexer for a search feature. The indexer will work over data from "fields". Fields looks like: Field_id Field_type Field_name Field_Data - 101 text Name Intel i7 - 102 integer Cores 4 physical, 4 virtual - 103 select Vendor Intel - ...

Is this sufficient to protect against a CSRF for an ajax-driven application?

I'm working on a completely ajax-driven application where all requests pass through what basically amounts to a main controller which, at its bare bones, looks something like this: if(strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { fetch($page); } Is this generally sufficient to protect against cross-site requ...

PHP String Function

Simply put, I have a string with a prefix "msg" followed by some numbers that serve as the ID for a list item e.g. <li id="msg1"></li>..............<li id="msg1234567890"></li> What is the most efficient way to grab just the numbers? In VB, I'd do the following: str = "msg1" str = right(str,len(str)-3) How would I do something ...

mysql database Back-up (linux server to client m/c) automatically

How can we store the mysql database Back-up from a linux server to a client windows m/c automatically in a fixed duration of time.... Thanking you, ...

How we can play audio in html page

In my page i have a button called Play In included windows media player using this tag <embed id="wmpid" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="mediaplayer1" ShowStatusBar="false" EnableContextMenu="false" autostart="0" width="200" height="45" loop="false" src="/1.wma" /> The...