I build a facebook app with php api, everything work fine just have a problem when i need public a message on user's Wall.
my code bellow
$appapikey = "xxxxxx";
$appsecret = "xxxxxx";
$facebook = new Facebook($appapikey, $appsecret);
$fb_user = $facebook->require_login();
if (!$facebook->api_client->users_hasAppPermission("publish_str...
Hello All,
Is there a way to get user-defined php functions, variables, constants from a php file?
Following functions are not the best way to do so because they get all decalred
functions/vars/constants (with hundreds of php's built-in constants and internal php functions):
get_defined_vars
get_defined_functions
get_defined_consta...
$query = "SELECT UniqueID FROM configuration";
$result = mysql_query($query)or die(mysql_error());;
while($row = mysql_fetch_assoc($result)) { }
throwing exception as
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\Program Files\Apache Group\Apache2\htdocs\ehp\hello.php on line 10
...
I have installed Drupal 6 and have the "Printer, e-mail and PDF versions" aka "Print" module installed.
I then realized in order to generate PDF's from my html nodes that I need a third-party tool, which is fine but the Print module is not recognizing the third-party tools I have installed in the /modules/print/lib/ directory. I get the...
I have this text file:
Dec 04 20:15 Naruto 123
Dec 04 17:42 Naruto 98
Dec 04 16:19 D Gray Man 001
Dec 04 16:05 Bleach 128
Dec 04 12:13 50 x 50 44
I need to output the contents into a table with the Date and Time in its own column and the Tile and Chapter in another.
Also.. I need to replace the Title and Chapter with a link that must...
I am using php and mysql. And my site is in flash (full flash site)
I have a website which let users to sign up. The signup process including sending "activation email", click link to activate account.
The first two weeks was fine. Out of around 2000 users, 1800 users are activated. After that, the activated users drop drastically, to ...
I need advices for a table structure.
I need to create menus dynamically.
There will be more than 3 menus.
Some of menus will have multi-level structures.
What is the best way to strucure the menu tables?
All the menus are in one table
Each table should have one table
Any other??
Please give me your experience or common practices...
function getExtension($str) {
$i = strrpos($str,".");
if (!$i) { return ""; }
$l = strlen($str) - $i;
$ext = substr($str,$i+1,$l);
return $ext;
}
define ("MAX_SIZE","2000");
if( isset($_FILES['file_upload']))
{
$errors=0;
$image=$_FILES['file_upload']['name'];
if ($image)
{
$filename = stripslashes($_FILES['file_u...
I have a login system in place for my website, the details of the user which are stored in the database are userid(unique for every user and identifier), email address(unique), display name(not unique), password and membersince.
Now what should I store in the cookies? I was thinking about storing just the userid in the cookie with an exp...
Hi,
I hope I can explain this good enough. I have 3 tables. wo_parts, workorders and part2vendor. I am trying to get the cost price of all parts sold in a month. I have this script.
$scoreCostQuery = "SELECT SUM(part2vendor.cost*wo_parts.qty) as total_score
FROM part2vendor
INNER JOIN wo_...
Hello,
Is there any way I can check if a method is being called statically or on an instantiated object?
Jamie
...
$objPHPExcel->getActiveSheet()->SetCellValue('A1', 'Name');
1.How I set this to bold?
2.How I set the width(I will have some dinamic text in the cells!)?
I have read the documentation, but I haven't found any solutions!
...
I was trying to create a pdf from an FDF file. I have created the FDF file succesfully.
But when i try to convert it into pdf i get some errors. Below is the part of my code. the test.pdf file open in a download box and when i try to open it gives error "couldn't open test.pdf because it is either not supported file type or has been dam...
I am print an string as below
Code:
echo "&words=".$rs['pw']."&";
Output:
&words=Help|Good
Notice that "&" is not printed.
But when I am giving "space" after "&" then it gets printed as below
Code:
echo "&words=".$rs['pw']."& ";
Output:
&words=Help|Good&
Now "&" is printed.
Why its happening and whats the reason for thi...
Hi,
First, I tried searching for different variations of the title I've put for this question, both in StackOverflow and google. I couldn't find a solution.
I am fairly new to php. New enough to not know the difference between using eq and == for string comparison!
I usually use == to compare strings in PHP. I am comfortable with it.
...
Can I store as many as values in setcookie? What's the limit?
...
Using Wordpress I have created a multiple select box so that users can select categories to exclude. When the page initially loads I see my default values pre-selected. However when I select new values and save... I only see the word "Array" echoed and nothing selected?
<select class="amultiple" id="<?php echo $value['id']; ?>" name="<...
I posted this question on the wordpress forum but got no hits. Perhaps one of you might be able to point me in the right direction.
I am putting together a wp theme for a site I am working on. I want to get the layout to match the rest of the site as closely as possible and am running into trouble using the wp_list_pages/categories/boo...
I need is_dir() to don't care about if the folder or the argument is upper or lower case, or a mix of upper and lower.
So if the foldername is "My Folder" and I run is_dir("mY FoLdEr") the result should be true.
...
In my flash game I use sendAndLoad to send information about the game played back to my server for for a high scoreboard.
I have recently started using MochiAds meaning that it my swf is hosted on another domain to where the PHP script resides.
If I use version control with the automatic preloader the sendAndLoad function just never se...