php5

How Do I Properly Format Characters From eBay and Amazon Catalog?

I am using the Amazon and eBay API via PHP5 and Curl to get product listings for a client. When I ask the API to give me a description or a category for a product, I'm sometimes getting something that looks like this: Estée Lauder When I go look at the XML download from the API, it shows this entry inside: <categoryName>Estée Laude...

Webcam capture on web application

Hi. I need to take a picture from a webcam into a webapp (PHP5/JQuery/HTML5) but I cannot use Flash; Is there a light java applet or any alternative technology for this?. ...

an better way to do this code

myarray[] = $my[$addintomtarray] //52 elements for ($k=0; $k <= 12; $k++){ echo $myarray[$k].' '; } echo '<br>'; for ($k=13; $k < 26; $k++){ echo $myarray[$k].' '; } echo '<br>'; for ($k=26; $k < 39; $k++){ echo $myarray[$k].' '; } echo '<br>'; for ($k=39; $k <= 51; $k++){ echo $myarray...

Random problem connecting to MySQL

Environment: RHEL 5 servers, MySQL 5.1.43, PHP 5.1.6 (using MySQLi). Currently only available within our internal VPN network. Servers ServerA: Webserver ServerB/C/D: Database server (1 master 2 slaves) The error (on ServerA) [Tue May 25 11:12:17 2010] [error] [client CLIENTIP] PHP Warning: mysqli::real_connect() [function.mysqli-real...

reatining value on postback in PHP

how to retain values in dynamically generated element after post back ? ...

How do I select a bunch of random rows from a table?

I have a database of filenames that relate many-to-one to a set of subjects. How can I randomly select one filename from the several in the database that relate to a given subject? I'm working with Zend Framework, so if there is a ZF function that would help please mention it. ...

How to calculate the cointegration by PHP?

Hello, I found stats_stat_correlation() http://php.net/manual/en/function.stats-stat-correlation.php to calculate the correlation between two array. Now, I'm looking for a function to calculate the co-integration of two array, but, I didn't find nothing. Could you help me? Are there a statistics libraries? Thank you very much! ...

how i can add watermark to existing pdf file using php

i am in need to add watermark to existing pdf file using php i have google that but could't find any library. i found fpdf library that preview thumbnail of pdf file i don't know it add watermark to existing pdf file or not any one can suggest php library ? than show preview and add watermark to existing pdf file ? ...

xDebug : Output traces in php script?

Hi! I have tried to use xDebug on my local Ubuntu environment to speed up development and it's a great asset. However, I would like to see the output of the Trace function directly in the browser, at the end of the script. How can this be done? ...

PHP and Gettext don't work on my server

I have a website. I'm trying to get gettext to work so that my English, Sweden and Norway sites can come up. I can't get it to work. What have I done wrong? This is my config code: // define constants ( defualt - danish ) $lang = 'da_DA'; $lang_short = ''; $lang_prefix = 'da'; if ( isset( $_GET['lang'] ) ) { switch( $_GET['lang'...

PHP ORM Solution for SqlServer

I am searching for DAL or ORM (Only ORM no MVC) Solution in PHP5 that can efficiently access SqlServer. I am new to SqlServer. and I need to code a part of ASP.net website in PHP5. I am currently Using QCodo However its codegenerator is making some problem with ASP's own tables (?? the ASP Guys told me that its for ASP's Membership Manag...

QCodo SqlServer Codegeneration Unsupported Field Type: sysname

HI! All I am quite new to QCodo and SqlServer too. QCodo Code Generation works fine for MySQL It also works with General SqlServer Tables (However I got errors with Tables that doesn't have a PK) But I've faced the Following Error from the Code generator While Connecting to a Database that is being used for an ASP.net Website. error: MS...

Are there any PHP code libraries with function(s) to read and parse information from CSV files?

I am looking for some routines that will read and parse CSV files. I have written some code to do this, but the data files I download are not always evenly formatted for data extraction. I generally have to clean up the file manually before I can run my parser. ...

PHP preg_match Math Function

I'm writing a script that will allow a user to input a string that is a math statement, to then be evaluated. I however have hit a roadblock. I cannot figure out how, using preg_match, to dissallow statements that have variables in them. Using this, $calc = create_function("", "return (" . $string . ");" ); $calc();, allows users to inp...

What are the precise rules/PHP function for encoding strings into POST arrays?

Greetings, Just getting into PHP web development. I've got an HTML form where a user checks some series of dynamically-generated checkboxes, and submits via POST. On the PHP side, I want to check which of the check-boxes were clicked. I have an array $full_list, and am doing something like $selected_checkboxes = array_filter($full_l...

APC decreasing php performance??? (php 5.3, apache 2.2, windows vista 64bit)

Hi, I have an Apache/2.2.15 (VC9) and PHP/5.3.2 (VC9 thread safe) running as an apache module on Vista 64bit machine. All running fine. Project that I'm benchmarking (with apache's ab utility) is basically standard Zend Framework project with no db connection involved. Average (median) apache response is about 0.15 seconds. After I've...

Is this visitor a bot or a user? PHP

I am doing my own visitor tracking with special features that Google Analytics (nor any other) can provide me as it is customized. I was calling this function near the end of my script, but quickly ran into our clients running into thousands of pages being called from bots (I assume Google), and my table filled up with around 1,000,000 u...

Warning: sqlite_query() [function.sqlite-query]: attempt to write a readonly database

The error-Warning: sqlite_query() [function.sqlite-query]: attempt to write a readonly database is coming whenever i try to insert values into a sqllite 1.1 database thru php program. php version is 5.2. ...

Bulk Update in MYSQl

I have a site which has client side and admin side. There is a table called account History. which contains fields like uid | accountBalance | PaymentStatus | Date. Now this table has to be updated every month for all the paid users and the table is bulk. So what is the best way to update the table every month.Do i need to select all th...

how to calculate time difference in PHP

I Have to calculate date time difference how to do that in PHP. I need exact hours , mins and secs. any body have the scripts for that please give me :-P ...