What are good practices of unit testing facebook Canvas applications ?
Lets say you have MVC application with controllers utilizing local Facebook library which provides access to Graph API, FB session. After all your application depends on facebook authentication mechanism (OAuth and Facebook Connect) thus user is required to authenti...
Dudes
When you share something on Facebook (e.g. from Twitterfeed), it puts the icon and link for Twitterfeed website under the shared thing in this format:
icon goes here 2 hours ago via twitterfeed · Comment · Like
How can I make a page in my website send its icon and linked name?
Thanks
...
Does any of you know how to mask a URL in php?? Like the one you see in free URL redirectional services (http://www.shorturl.com)
I mean I have a url like http://www.my-server.com/
which will redirect me to http://www.some-other-server.com/abc.php
But I want the URL in the address bar of my browser to show only this URL
http://www.my...
Hey, first I use SQL + PHP the type of DB is MYSQL.
I have a column with the many strings, but I want to search the string 08/08/10 if it exists 5 times for example in the column, how do I do it?
** If I will do:
SELECT * FROM x WHERE y LIKE '%08/08/10%'
Maybe it exists, but I don't know if 5 times..
Thank you very much!
...
Hello,
i try to make a script to check if my server are online or offline:
<?
$server = "12.34.56.78";
$check = @fsockopen($server, 22);
if ($check) {
@fclose($check);
echo "online";
exit;
}else{
echo "offline";
}
?>
so this script works, but how can i make the script that i can ...
Hey
How can we get details from twitter and face book using PHP
suppose think that i am developing a site which have Twitter and Face book Log in, i will have only a user name not so much details,that's why i am asking, how can i get details like,
DOB,Address,Current Town, Country So on
...
hi guys,
my site lets users upload the youtube video codes. I am trying to make playlist by showing the thumbnails of the uploaded videos and play the respective video after clicking on specific thumbnail.
i would like to know the method of getting the caption and the thumbnail pictures of those videos which has been uploaded using emb...
Hi coders!
I've spent whole days with PHP's DOM functions but i can't understand how it works yet. :(
I have a simple XML file that looks okay but i cannot use it how i think when i've created it's structure.
Sample XML fragment:
-pages //root element
-page id="1" //we can have any number of pages
-product id="364826" //we...
AOA
I am facing pdf problem in joomla. when i click on pdf icon it opens the pop up and show the
pdf in wrong format. i think it does not pick the fonts. the pdf is generated something like this fomat.
%PDF-1.5 3 0 obj <> endobj 4 0 obj <> stream x��XMsG��~�\R�T�5, �7+��QbGX�r*$XkyL�?�~�O9��u��^�*�b����_�ll_4�n�n�����O���٫�m��f�'�dx�f�...
I would like to add a field to the user profile edit page in wordpress. The field should consist of one checkbox and should only be edited by the 'admin'.
Does anyone have an idea where I can find this or how I can do this?
I have searched through the entire Wordpress codex however i couldn't find anything helpful..
Thanks a lot!
...
Hi everybody,
I have created a function in the bootstrap to do the routing.
Once a route has been selected I would like to know which one it is.
Ideally I would like to be able to get that information in the bootstrap too, let's say I have a 1st function _initRouting() which decides of the routing and then later in the bootstrap a 2...
[Edit]
I have reedited the previous question - since I had misunderstood what was causing the problem - and therefore the ample snippet I had before was a red herring. Thanks to wimdvx, I have a clearer idea as to what is going on.
First of all, I am using code that is base on this one, to handle IPN notifications from Paypal.
I was u...
I'm using Zend_View to template text email content. However, I've come across one problem which I have been unable to solve: If a line ends with a php block (?>), then the line break is lost.
Does anyone have any idea how I can solve this?
The application is using Zend framework, but I have no particular reason to use Zend_View to rend...
Hi,
My regex won't work on single digit number
/^[0-9]{1,7}\.?[0-9]{1,2}$/
I need it to work on unsigned numbers:
1 (single digit numbers, without fractions) - currently it fails on them
1.0; 0.31 (floating point numbers)
Number before fraction can be 1-7 digits; after fraction 1-2 digits.
Thanks you!
...
Hi
Using the Create ZIP File PHP class I have the following line of code
$createZip->get_files_from_folder('blog/wp-content/themes/', 'themes/');
Am I right in thinking that this code gets the files and sub directories from 'blog/wp-content/themes/' creates a new folder entitled 'themes', and then puts these files and sub directories...
hello,
i'm triying to use javascript redirect to main window after log in succeed in an iframe.
this is my code :
if ($_GET['redirect']!='') {
$redirect=$_GET['redirect'];
$smart->assign('redirect',$redirect);
}
$redirect=$_GET['redirect'];
echo $redirect;
if(isset ($_SESSION['user'])&&$_SESSION['user']!='') {
$user->...
<? foreach ($this->criteria as $key => $value): ?>
<li><?= $this->accommodationsLink($this->criteria, $key) ?></li>
<? endforeach ?>
This code give unexpected results, because only one link is visible. But there are two items in $this->criteria.
I explored the cause of the probleem. In the function accommodationsLink is another foreac...
I have searched on google and stackoverflow for a while, but didn't really found an answer to my question.
I want to redirect admin.domain.com to www.domain.com if there are no subdirectories or queries.
Examples that should redirect:
https://admin.domain.com
http://admin.domain.com
https://admin.domain.com/
Examples that shouldn't re...
I have table 'posters', table 'reviews' and table 'trailers'. Every table is connected with an movieID column, but each table can be empty for certain movieIDs:
++ posters_table +++ ++ reviews_table ++ ++ trailers_table ++
--itemID--+--filename- --itemID--+--review-- --itemID--+--trailer
---------------------- -----...
Hi,
How can i create a main page with codeigniter?
That page should contain a few links like login, register, etc.
I followed a tut to create a login screen. But it made codeigniter only for that purpose. This is the site i'm talking about:
http://tutsmore.com/programming/php/10-minutes-with-codeigniter-creating-login-form/
So basic...