php

How to determine how many pages did user add my facebook application to?

I need to give the user ability to add my application only to certain amount of fanpages that he owns(is a admin of), how can I determine how many pages of particular user use my app? ...

For business people to manage, keep binary images in MySQL or just the urls?

Hello everyone: I am working on a task to enable image uploading and auto-scaling(from full sized to thumbnail) by jQuery & PHP. I can naturally come up with two approaches : First, store both images as binary objects directly into MySQL; Second, store only urls to the images and keep the images somewhere on server. The images are ...

Creating a Variable that is the Sum of Two Other Variables

Hello, For the code below, I would like to make a new variable called totalScore2 that equals days + totalScore. How can I do this? Thanks in advance, John $sqlStr = "SELECT l.loginid, l.username, l.created, DATEDIFF(NOW(), l.created) AS days, COALESCE(s.total, 0) AS countSubmissions, COALESCE(c.total, ...

How can I upload photos to album using Facebook Graph API

Here is the code: $file= 'bbbb.jpg'; $data = array( basename($file) => "@".realpath($file), "caption" => "Uploaded using graph api", "aid" => '13595', "access_token" => $accessToken, 'method' => 'photos.upload' ); $sds =$facebook->api($data); This is the error Uncaught C...

Application/Script for checking "unseriousness" possible?

I have a classifieds website where users may sell/buy just about anything... My issue which costs the company alot of money, time etc is that ALL classifieds must be reviewed by a physical person (employee) before beeing posted on the website. So when you create a new classified enty, you get the message like "Your ad will be reviewed ...

Best tutorial for learning Wordpress plugin development?

I'm new to wordpress. Can any one suggest me a best tutorial for learning wordpress plugin development and some simple examples? I've done some searches in google and got some informations. ...

utf-8 to gsm 7 convertion in php

What should I do to convert utf-8 to gsm-7 in PHP. I got this link http://mobiletidings.com/2009/07/06/gsm-7-encoding-gnu-libiconv/ But dont know how to do this in PHP. ...

flagship Merchent Account Payment gateway

hello i have to integrate flagship merchant services on my project.But i don't have any idea about this.if any person any idea about this or have any api regarding this please let me know .I have also integrate reoccurring payment service in this.So if any body has worked on this payment express please provide me the api or the flow so i...

How to retrieve Aggregate objects?

In DDD, Repository takes care of saving and retrieving domain objects and also serves as collection of Aggregate Roots. My question is how do you retrieve the information for those child entities (let's say from DB) of an Aggregate where basic rule is Repository should just hold collection of Aggregate Roots (parent object) and not child...

Having problem in sql query execution

Hi there, I have a problem in sql query execution.I am using this sql query: $userid = 1; $sql = mysql_query(" SELECT ID, Nm, Address, date_format(DateOfBirth, '%d%M%Y') as DateOfBirth FROM PersonalDetails where UserMasterID = $userid ") or die (mysql_error()); The result appears as: You have an error in your SQL syntax; che...

Problem in Integrating TripIt api

I downloaded tripit_php_v1_25392 zip file i try to run the file in my local xamp it asks for api_url, consumer_key, consumer_secret, access_token ,access_token_secret keys how do i get those values and run the file ...

How to send message through net to mobile ?

currently we are developing website which send sms alert to user for perticular service but i am not able to set script which will do the same Please somebody tell me what will be solution.... Please tell any script or site for this problem thanks... ...

PHP: Check if URL redirects?

Hi everybody, I have implemented a function that runs on each page that I want to restrict from non-logged in users. The function automatically redirects the visitor to the login page in the case of he or she is not logged in. I would like to make a PHP function that is run from a exernal server and iterates through a number of set URL...

PHP compare doubt

if(0 == ('Pictures')) { echo 'true'; } why it's giving me 'true' ? ...

How to call Ajax to run a PHP file while maintaining PHP & Javascript variables.

Hi Stackoverflowers. I'm using the Facebook php-sdk to get the users name and friends, right now the loading friends part takes about +3 seconds so I wanted to do it via Ajax, e.g. so the document can load and jQuery then calls an external PHP script which loads the friends (their names and their profile pictures). So to do this I did: ...

How can I search for an email using the zend framework?

Hi guys I need to build a functionality that involves searching through emails in an inbox for emails whose subjects match a certain user inputted keyword. SInce I'm using the zend framework I would like a solution that uses the zend framework libraries. Aside this I have noticed that the zend libraries are a bit limited with respect to...

special characters in file/folder names on Linux; Rename php function not working

I am using a function Rename() (php) to move some images from one folder to another. The destination folder has special characters in them. However, when doing this on the server I get the error that the folder isn't found with the name. And in that error, the folder names special characters are replaced with Squares: Warning: rename(...

TripIt working files

where can get fully working example file for tripit integration using php ...

European signs in img src problem

Hey. I recently encountered a strange problem on my website. Images with æ ø and å in them (Western European signs) Won't display. The character encoding on all sites is "Iso-8859-1" I can print æ ø and å on the page without problems. If I right click the "broken image" and choose properties, it displays the filename with the europea...

How to get and disect the query string appended into a url? PHP

Hi, I am trying to develop a PHP class which would enable me to get the query string appended into a url and process it according to the variables passed. How can this be done? Eg www.example.com?var1=a&var2=b&var3=c now I want to get ?var1=a&var2=b&var3=c section and process it based on the variables. Thanks for your responses bu...