php

how to identify remote machine uniquely in php?

how to identify remote machine uniquely in proxy server environment, i have used $_SERVER['REMOTE_ADDR'] but all machines in proxy network has same IP Address, is there any way ...

Whats the best way to implement typo correction into a search (in php/mysql)?

I have a site that lists movies. Naturally people make spelling mistakes when searching for movies, and of course there is the fact that some movies have apostrophes, use letters to spell out numbers in the title, etc. How do I get my search script to overlook these errors? Probably need something that's a little more intelligent than...

Is there any other way to create an application in google app engine? [Closed]

I want to create an application in google app engine using php, Is there any way to login in to my google account using php and create an application dynamically. ...

What's the PHP equivalent of a final variable in C?

I'm wondering if PHP has a type of variable in classes that functions like final in C. And by that I mean all objects of the same class use the same variable and when it's updated on one it's updated on every one. Static is close because it is shared throughout all objects but I need to be able to update it. Will I have to use globals fo...

[PHP specific, could apply to others] Which 'layer' is responsible for validation of data

Let say I devise an architecture like this - an application consists of modules and modules uses domain-specific utilities to perform changes to the model or database. An example, a registration module which shows the form, accept input and then use a registration utility which will perform the calls to insert the user info do the DB. ...

What is https and SSL? How do they work? How can they be used in PHP?

I know the general definition but I need more details on how to implement them in general and PHP in specific, and what exactly are the features I gain from them? ...

foreach equivalent of php in jquery?

Is there a foreach code in JQuery as in PHP? I have a code in php,like <?php foreach ($viewfields as $viewfield): ?> if("<?php echo $viewfield['Attribute']['required'];?>"=='true'){ $("<span class='req'><em> * </em></span>").appendTo("#fb_contentarea_col1down21 #label<?php echo $viewfield['Attribute']['sequence_no']?>"); } ...

MySQL: How to search for spelling variants? ("murrays", "murray's" etc)

Hi Friends, I want to search like this: the user inputs e.g. "murrays", and the search result will show both records containing "murrays" and records containing "murray's". What should I do in my query.pl? ...

ffmpeg image creation

hi im using ffmpeg in my server and every thing is working fine except one that the image(thumbnail) creation im using this script /usr/bin/ffmpeg -i /var/www/test/test.flv -deinterlace -an -ss 13.45 -t 00:00:05 -r 0.01 -y -s 120x72 -vcodec mjpeg -f mjpeg /var/www/test/test.jpg is there any problem...

How to generate propel ORM objects on virtual host with no include_path?

I have a dev server with several virtual hosts on it. Each one needs to be able to run the command: propel-gen ./ creole That script executes some php that reverse-engineers the database... BUT the php it executes needs to be included to do so. There is no include_path set in the php.ini because it would be global to all virtual hosts...

Can this PHP code be improved?

Is there a better way to do this simple task below? Like with an array or even another method? <?PHP // current way if ($city != NULL) { $city = FilterALLHTML($city); } if ($state != NULL) { $state = FilterALLHTML($state); } if ($title != NULL) { $title = FilterALLHTML($title); } if ($division != NULL) { $division = Fil...

Storing and displaying unicode string (हिन्दी) using PHP and MySQL

I have to store hindi text in a MySQL database, fetch it using a PHP script and display it on a webpage. I did the following: I created a database and set its encoding to UTF-8 and also the collation to utf8_bin. I added a varchar field in the table and set it to accept UTF-8 text in the charset property. Then I set about adding data ...

Issue FORM POST Request From PHP using HTTP Basic Authentication

I hope this is a relatively straight forward thing to do, and that my google skills have simply failed me on this occasion. I have a BASIC authentication protected resource which I want to have PHP perform a POST HTTP request against. I have tried injecting Authentication: Basic (encrypted u/p data) into the headers which didn't appear ...

PHP MVC Questions

Can someone please tell me what the best way to pass values from a controller into a view would be? If anyone has played with codeignitor, they will know what I mean. I have looked at CIs code but can't find the file that handles this. I'd LOVE to know how this is done. Thanks! ...

php java bridge not working on tomcat 6

I just installed the current Tomcat version on my mac because I wanted to try the PHP Java bridge. I followed the guide here http://php-java-bridge.sourceforge.net/pjb/tomcat6.php but when I paste the xml config to the tomcat configuration file <listener><listener-class>php.java.servlet.ContextLoaderListener</listener-class></listener...

How to stop PHP prefixing LF to start of file

I am using PHP to pass some information in a text file back to the user which is then used as input for an app. I'm using the method shown in the following snippet to serve the file to the user. header('Content-type: text/csv'); header('Content-Disposition: attachment; filename=filename.dat'); echo $data; exit(); I get the save as dia...

pharagraph display in line by line within 3 line

i have a one string of 75 charater and it display in 3 line how i display in 3 line in php pl help ...

display quasi-real-time data to user with php/ajax

Hi, I currently have a class Status, and I call it throughout my code as I preform various tasks, for example - when I upload an image, I call $statusHandler = new Status(121), when I resize it, I call $statusHandler = new Status(122). Every statusID corresponds to a certain text stored in the database. Class status retrieves the text, ...

Php soap problem

simple soap program in php where i can send user name and password to soap server and it return Boolean value ...

Post Back response from PHP to javascript [SOLVED]

Dear developer, I'm new to forms and post data ... so I don't know how solve this problem! I've a php page (page1) with a simple form: <form method="post" action="/page2.php"> <input type="search" value="E-Mail Address" size="30" name="email" /> <input type="submit" value="Find E-Mail" /> </form> How you can notice ... this form pos...