php

How do I control retrieving data from tables in a database

I do have multiple tables in single database. when my page loads it retrieve data s from all tables in this database. because of this my page is getting slow due to different loading time in different tables. my question is how do I display page with data which is loaded already from tables and rest is in a streaming mode?? I don't know ...

Connecting flex/php to Active Directory

Is there a way to connect my flex web application to Active Directory, and get the logged username? Right now we have a PHP script connected to the flex application, that gets user/pass input from the user and checks if there's such user in the AD, and that the password is correct. I don't want to ask for user/pass, but to make the appl...

Best way to flush or clear Ajax "temp" stuffs in IE7

Can any one please let me know, that, i need to clear the "temp" files every time i run the ajax process using php. ...

Country to timezones in PHP/Zend Framework

Is there a way in Zend Framework or default PHP to map a country (using country code) to a list of timezones? As an example I'm trying to replicate the Google functionality when searching for "time in australia right now" which displays all of the timezones and cities for that country. ...

parsing through html with php

while working on facebook connect I have to retrieve an access token from a url ( it is not in the url itself but in the file lined to that url) so this is what I do $url = "https://graph.facebook.com/oauth/access_token?client_id=".$facebook_app_id."&redirect_uri=http://www.example.com/facebook/oauth/&client_secret=".$facebook_...

How to code a 'Next in Results' within search results in PHP

Right, bit of a head scratcher, although I've got a feeling there's an obvious answer and I'm just not seeing the wood for the trees. Baiscally, using Solr as a search engine for my site, bringing back 15 results per page. When you click on a result, you get a detail page, that has a "Next in Results" link on it, which obviously forward...

Getting "Segmentation fault: 11" with imap extention

Hello everyone, This is something that irritate me from some time - I am using php imap extension to connect to email box and retrieve emails. Before with php version 5.2.9 all worked well , but had to upgrade to 5.2.13 because the production server running this version. Then it start crashing with "Segmentation fault: 11" on imap_fetch...

ADOdb Lite versus MySqli

Hello, I am working an a project to build an arcade site with PHP. I am considering using ADOdb Lite or MySqli. Which one is better for performance, speed and security? Thanks, ...

Where's the OCI8 extension in PHP/5.3.2?

I'm deploying a PHP application that connects to an Oracle 9i server using the OCI8 functions. I've installed the latest official binaries for Windows (PHP/5.3.2) in order to run it as Apache 2.2 module (i.e., the VB6+ts MSI installer). However, the OCI8 extension is no longer in the extension list: the only options to choose from are Or...

php: handling exceptions within exception handlers?

Let's say were using custom extensions of the Exception class to handle custom exceptions, like this for example: $testObject = new testClass(); and a autoload like this: function __autoload($class_name) { $file = $class_name.'.php'; if (file_exists($file)) { include $file; }else{ throw new loadException...

Problem sending php variables to flash game, on facebook

When I run the app for the first time in a session it works great i get all data form Database(if i logout, and enter with a diffrent account)the swf does not receive the variables. If i run manually the script typing the url address in the browser (typing: http://myserver.com/app/variables.php), and refresh the facebook app, it receives...

Php dynamic class construction

Hi to all, I'm trying to avoid the use of eval. I can dynamically instantiate a class like this: class myclass {} $my_class_name = 'myclass'; $obj = new $myclass(); If the constructor is like follows: class myclass { public function __construct( $argument1, $argument2 ) {} } and i have the values of the arguments in an array,...

How do I use the Zend Youtube API correctly?

I am trying to access the YouTube API with the Zend libraries that I have included like this (the full path to the Zend library is components/lib/Zend/Gdata.php): //Include Zend Gdata set_include_path('components/lib'); include("Zend/Gdata.php"); I now try to use the framework thus: //Access video data via Zend l...

imagettftext problem

<?php imagettftext($im,15,0,470,$m,$black,$font,"this is testing of all"); ?> when i run this function i got the image with uneven spaces. like this: this is testin g o fall does anybody know whats the problem is??? ...

Asked in PHP interview, Is it possible to insert Object in database?

Asked in PHP interview, Is it possible to insert Object in database? ...

PHP contact form, am I doing it wrong?

I'm learning PHP and I'm trying to write a simple email script. I have a function (checkEmpty) to check if all the forms are filled in and if the email adress is valid (isEmailValid). I'm not sure how to return true checkEmpty funciton. Here's my code: When the submit button is clicked: if (isset($_POST['submit'])) { //INSERT FORM VAL...

application blocking

I have a application which runs over browser ...php application... i need to lock this application to only few machines and laptops that we allow to access. IP locking cannot be done as laptops can be on wifi from outside... Any Idea on how to do this? ...

php: autoload exception handling.

Hello again, I'm extending my previous question (Handling exceptions within exception handle) to address my bad coding practice. I'm trying to delegate autoload errors to a exception handler. <?php function __autoload($class_name) { $file = $class_name.'.php'; try { if (file_exists($file)) { include $file; ...

Advice/suggestions for my first project PHP Classes

Hi guys, Any advice is welcome! I have a very limited understanding of php classes but below is my starting point for the route I would like to take. The code is a reflection of what I see in my head and how I would like to go about business. Does my code even look ok, or am I way off base? What are your thoughts, how would you go ab...

How do I error handle the FTP functions in PHP.

When connecting to mysql, I have functions to get the relevant error message and error code, I see nothing of the sort in the list of ftp functions of PHP. Is there a best practice to handle errors in FTP? EDIT+CLARIFICATION: I think the best error messages are the system error messages + my own, is there a way to catch the system err...