I'm trying to to get tokens so something like that so that an app will be able to search a user in Facebook.
I've tried http://github.com/facebook/php-sdk but it is either for authenticating a user or it is not working.
For example this one is for authenticating a user to the app
http://github.com/facebook/php-sdk/blob/master/examples/...
hello, I'm trying to parse block from html page so i try to preg_match this block with php
if( preg_match('<\/div>(.*?)<div class="adsdiv">', $data, $t))
but doesn't work
</div>
blablabla
blablabla
blablabla
<div class="adsdiv">
i want grep only blablabla blablabla words
any help
...
i want to store retrieved data from database into an array list with limit.And display the data from that array list one by one with next button.have any answer for this?
...
I need to link a website from my blog.
I don't want that the owner of that website know that I have linked his website.
How can I do that ?
...
<h1><?php echo $GLOBALS['translate']['About'] ?></h1>
Notice: Undefined index: About in page.html on line 19
Is it possible to "catch" an undefined index so that I can create it (database lookup) & return it from my function and then perform echo ?
...
Hello folks,
I need to save the Errors in a database table instead of writing in into errors.log??
How can i achieve it???
thanks in advance
...
Hi,
I am trying to add a HTML multi-column table to a Zend_Form. The table would be populated by data from the database and each row should be preceded by a checkbox, as shown in the ASCII below:
+-----+-------------------------+-----------------------+--------------+
| | Column_1 | Column_2 | Column_3 ...
Hi,
I would like to include a mp3 file preview feature which should enable a person, once he/she has uploaded an mp3 file.
He should be able to listen/preview it within the site.
How can this be accomplished and are there any flash mp3 player which do this. All have seen are all XML based.
Thanx
...
i have two tables in mysql . i want to add or subtract values from one table from another. i expect clear answer. please help me
...
I have the following insert function. Is it safe from a sql injection. If it isn't then how do I make it safe.
public function insert($postValues, $table){
$dbh = $this->connect();
try {
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$fields = implode(array_keys($postValues), ',');
$val...
I've got the following code:
class the_class {
private the_field;
function the_class() {
the_field = new other_class(); //has other_method()
}
function method() {
$this->the_field->other_method(); //This doesn't seem to work
}
}
Is there anything wrong with the syntax here? The method call always seems to return tr...
shopp('product','quantity','input=menu&return=true');
The above function from my CMS returns the value <select name="products[1][quantity]" id="quantity-1"><option selected="selected" value="1">1</option><option value="2">2</option><option value="3">3</option></select>.
Any idea how I can get the number in that last option tag and ass...
http://github.com/facebook/php-sdk/blob/master/tests/tests.php
How you get the access token for my own app?
...
Hi all
Following code:
<?php
$str = "19.09.02";
if(substr($str, -3, 2) == ".0")
{
// Doing something
}
$str2 = "19.09.2002";
if(substr($str2, -3, 2) == ".0")
{
// Doing something
}
?>
Why does the second statement apply (without regexp)? and how can I solve, that it just apply the first expression?
Thank you
...
I have tried $_SERVER['HTTP_USER_AGENT'], but we didn't get the exact name.
Then i have tried the following code
$browser = get_browser(null, true);
print_r($browser);
Firstly it shows warning.then i have enable it in the .ini file.
After that it dosen't display anything.
Is there any other solution to know the name
...
Hi guys,
I have read related Q&A's for this is question, but still I am confused on this, can somebody help me on this?
What I am doing: my url is : www.mysite.com/home.php
I have two files: home.php and get_data.php, in home.php i am calling get_data.php with the use of jquery. the code for jquery is:
$(document).ready(function(){
...
Often in PHP, I see:
$result = mysql_query($query) or die();
Coming from python, I know why this should work, because or returns the first value if it is true in a boolean context, and the second value otherwise (see this).
But when I try the above technique in PHP in another context, for example something like:
$name = "John Doe";
...
I have RSA public key in OpenSSH format:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9xmJumsHeLEDcJwf3LYONZholP3+pDHJYen4w+gm8o1r7t6oq825Gmjr7pjsQ+ZDxWivkI4vMW9RyFevPg09ljW+V7lZInBpRtB6v1s8PdmV9YVk4R3S0e7sPMPXuM7ocPLh5yKZ9f7JZwQlpp4ww/RE7blbXywjwCxngT7+G+J6HJB0UcR8xR8t6z8qDrDTAJA7pFFFNliw9M+I8tbrFl8HmoyudOFsGsYOd5hjemy4ivW88XcXzfHJdKnmD9FHVZ...
I want to receive an array that contains all the h1 tag values from a text
Example, if this where the given input string:
<h1>hello</h1>
<p>random text</p>
<h1>title number two!</h1>
I need to receive an array containing this:
titles[0] = 'hello',
titles[1] = 'title number two!'
I already figured out how to get the first h1 value ...
I want to keep errors out of my PHP output stream. I only want output of things I explicitly echo.
Looking at my php.ini, is "display_errors" the only configuration I need to change?
...