php

Facebook Connect: How can I get a logged in user's info into a PHP object?

i have been working tirelessly just to get this working, but for some reason, in the following code: require_once 'facebook-php-sdk/src/facebook.php'; $facebook = new Facebook(FACEBOOK_API_KEY,FACEBOOK_SECRET); $fb_user = $facebook->getUser(); the variable $fb_user is always null! i was wondering what i am missing in order to get th...

code protection php chargeback issue

Hi, today i've approached by a client asking me to do major revamp on website and offering good money. However, the payment method he offering is via credit card - paypal, only method available to him. So, my question now is, what should i do to protect myself from paypal chargeback? Is there any protection i can add to my php codes ...

PHP Twitter proxy that supports XAuth on an Apache server

I've been banging my head against this problem for nearly two days now, and I'm hoping someone on this site can help me. I live in China and have a server (shared hosting) located in Hong Kong. I've set up a PHP Twitter proxy on the server, and I connect to the proxy using Twitter for iPhone (AKA Tweetie). It's worked beautifully for th...

how can i show mysql data alphabeticaly...

i have the following mysql table.... ----------------------- id customer_name date ----------------------- now let me know the query with which i will able to show data Order by alphabeticaly... where values of customer_fields are like testkhan, rafae, ibrahm and i want to show them as ibrahmrafaetestkhan ...

Event search in subhub using lat/lon

Is there any sample php code to search event in subhub api using latitude and longitude value ...

how to replace hyphen with blank space / white space? php

i don't know much about PHP but these days I'm modifying an existing script. I want to know how can I replace - with white or blank space For example a variable contains 'Love-you' and I want to replace this hyphen between them with a space like this 'Love you'. I'll appreciate your feed back. ...

facebook fanbage id

i get the face book user id who create face book page,now i need to get page id to display like box in my website. different users have there own face book pages.however i know to get there facebook user id is there any solution or alternative solution,something like fquery or etc??? ...

Read active log files without needing a temp file

I am developing a script to read and search log files for a big system at work. It currently works like this: User defines search parameters PHP uses shell_exec("tac logfile.log > tmpfile.log") to copy log file (and reverse the lines) to a temp file PHP fopen()'s the temp file PHP reads through each line of the file and applies the sea...

Is it possible to check a md5 password

More precisely: i want to check if the user enters his same password as the one store in the DB for its profile. i have tried something like this but i dont get an echo: $query2=mysql_query("SELECT emails_password,emails_id FROM lala.in_emails WHERE emails_password ='md5($password)' AND emails_id='".$_COOKIE['LALA_ID']."'")or die(mys...

Get Facebook fan page ID

I've got the Facebook user ID of the user who created a given page. Now I need to get the page ID to display like box in my website. Different users have their own Facebook pages; however, I know how to get their Facebook user IDs ...

Remote login to facebook account

Hi everyone! For my project purpose, i need to login to my facebook account remotely and retrieve some information from there. For the login purpose, i am using cURL library of PHP. On execution of the code, facebook page asks me to enable the cookies on my browser which i have already enabled. Is there any problem with the code? Can any...

How to create a public form for other sites in php?

Hi I need a public order form to provide registered users in my site. I can give a link to the users then user can copy paste that link to their own sites. If any person order via from the user site. the details must be saved in my site. How can create that kind of a page. any body can help me please :( ...

How to set Sku Type & Price Type of Bundle Product programmatically in Magento?

I have added a Bundled Product in Magento programmatically, using all the options / properties of the Simple Product & the use of the 3 methods specifically for Bundle Options:- setBundleOptionsData() setBundleSelectionsData() setCanSaveBundleSelections() The result is that the newly added Bundle Product shows just fine in the Admin ...

get_file_contents not working on my server

I tested this script on another server and it worked fine. Do I have to set my php.ini file? And how? <?php ini_set('allow_url_fopen', 1); if (!isset($_GET['url'])) { exit(); } echo file_get_contents($_GET['url']); ?> ...

Managing large log files

We have a crawler that persistently crawls our target sites, it's log files are turning out to be quite huge. Over 1 GB in some cases, I'm not too comfortable with deleting or overwriting them. Any examples of how you managed large log files? ...

Run the array mutiple times

Hey i need help, right now my script connect to an api and send a sms, 1 number at a time, I want it to pull from a local sql db then repeat the response for each number in the db! `$data['post'] = array ( '_rnr_se' => $rnrse, 'phoneNumber' => '1234567890', 'text' => 'This is a test SMS!', 'id' => ''...

How read < abc: xyz > xml tag using php?

Dear all, Using my below code i can read < abcxyz > xml tag easily. but how can i read the data between < abc : xyz > < / abc: xml > xml tag.. xml tag using php.pls help.... my php sample code... $objDOM->load("abc.xml"); $note = $objDOM->getElementsByTagName("note"); foreach( $note as $value ) { $tasks = $value->getE...

call function in jquery-ajax

hello all i have a show function in my test.php page , how may i call show() function in ajax instead url:test.php in following code $.ajax({ url: **'test.php'**, success: function(result) { alert(ersult); } }); ...

Sorting through a delimited string with PHP

Hi guys, I am trying to create a script that checks if a certain value is in a comma delimited string, and if the value is present, it should return true else it should return false. Basically, I am trying to check if a user has voted for a specific person before, and if so, they cannot vote again, if they have not, vote and then add th...

PHP - How to run multiple commands in system, exec or shell_exec?

I'm trying to run shell command like this from php: ls -a | grep mydir But php only uses the first command. Is there any way to force php to pass the whole string to the shell? (I don't care about the output) ...