say i have strings that are sent back and forth from the client, and server via AJAX.
however i wish to securely encrypt it before being sent via the client. once it's on the server, it should be decrypted, and processed.
additionally, how does password encrypting work ? user signs up, and upon entering password, its encrypted on the s...
I need a program to get all the web pages under a website. The website is Chinese, I want to get all those English words out. Then I can extract all the information I need. Any ideas for this? Is there any software for this purpose?
If NO, I would like to write one. Any suggestions?
Thanks much.
...
I'm using the Facebook library with this code in it:
class FacebookRestClient {
...
public function &users_hasAppPermission($ext_perm, $uid=null) {
return $this->call_method('facebook.users.hasAppPermission',
array('ext_perm' => $ext_perm, 'uid' => $uid));
}
...
}
What does the & at the beginning of the functi...
i prefer jquery.
let's say i have a string with ,
adam, lisa, john, sarah
and i want to turn them into :
<ul><li>Adam</li><li>lisa</li><li>john</li><li>sarah</li></ul>
...
I'm using a third-party AJAX slideshow for a website that takes an RSS feed as its picture source. I would like to randomize the order of the pictures, but that's not a feature of the slideshow (or the RSS feed I'm pulling from).
Surely it shouldn't be difficult to write a short function in PHP that takes an external RSS feed, randomiz...
i have several HTML Select dropdowns on the same page, used in slightly different contexts. they both use the same option data that is stored and echoed out of a php variable that was built from a database query.
The Problem i am running into is that one works and returns the selected value, while the other one only returns the value of...
First off, I'm aware this is a bad practice and I have answered many questions even saying so, but to clarify I am forced to use regex because this application stores regexes in a database and only functions this way. I absolutely cannot change the functionality
Now that we got that out of the way.. because I always use DOM methods I'm ...
Say I have an array like:
Array
(
[0] => Array
(
[Data] => Array
(
[id] => 1
[title] => Manager
[name] => John Smith
)
)
[1] => Array
(
[Data] => Array
(
...
Within my php app I have multiple templates that get combined to form a single page. so say your on the about us page, the template would look like this
<?php
$this->render("header.php");
?>
my about us page
<?php
$this->render("footer.php");
?>
which is just a fancy way of doing an include(). However, header.php has some java...
Hey,
I'm looking for help on writing a script to check a list of phrases/words and compare them to one another and see which one is the properly typed phrase/word.
$arr1 = array('fbook', 'yahoo msngr', 'text me later', 'how r u');
$arr2 = array('facebook', 'yahoo messenger', 'txt me l8r', 'how are you');
So, in comparing each index...
hello,
i need to split any mysql select statement in its main parts: SELECT, FROM, ALL THE JOINS(if there are any), WHERE(if it exists),GROUP BY(if it exists), HAVING(if it exists), ORDER BY(if it exists), LIMIT(if it exists)...
i tried using regular expressions, but i'm not very good with them...
for the SELECT the regex was simple (an...
Hi
i'm getting dates from feed in this format
2009-11-04T19:55:41Z
i'm trying to format it using the date() function in PHP but i get an error saying:
date() expects parameter 2 to be long, object given in /bla/bla.php
i tried using preg_replace() to remove the T and the Z but still can't get it to work
any ideas on this ?
...
My delete.php is sending the selected item to the db as dead as it should, but the blog is still staying on the page that its deleted from. What am I doing wrong? this is my query: on the delete.php:
$MyBlog = $_GET['id'];
$query = "UPDATE `Blogs` SET `status` = 'dead' WHERE `id` = '".$MyBlog."'";
Like I said, this is marking id dea...
That code work:
startSlideshow(<?php echo json_encode(glob("photos-animaux/*.jpg"))?>);
that code dont :
$.post("",{'folder':'animaux'});
startSlideshow(<?php echo json_encode(glob("photos-".$_GET["folder"]."/*.jpg"))?>);
WHY ?, what i am doing wrong ?, help !
why the stupid php fonction just dont make the string right !! ahhhh!
...
I'm migrating a db from mysql to postgresql. The mysql db's default collation is UTF8, postgres is also using UTF8, and I'm encoding the data with pg_escape_string(). For whatever reason however, I'm running into some funky errors about bad encoding:
pg_query() [function.pg-query]: Query failed: ERROR: invalid byte sequence for encoding...
I've been asked to create a web UI that allows a user to modify a specific section of the HTML DOM and then POST the modifications back to the server for storage. The modification should be done via drag'n'drop, with my tool of choice being jQuery. The server will be PHP, but written by someone else since I'm not a PHP programmer.
The ...
How to do n0gram algorithm program in php
...
I recently discovered the PHP framework Kohana (which is awesome) and was reading a thread about using it in conjunction with a templating engine such as Smarty or Twig. My question is why bother? Surely an MCV framework, by definition, is a templating engine. Even "raw" PHP is, arguably, a templating engine. What possible benefits are t...
Is a comment of the form
/*:[url=users/%id]:*/
going to be a problem with any documentation toolkits out there (especially for PHP)? Or any other comment pre-preprocessors? (Related to http://code.google.com/p/caret/ )
...
This has been asked 1000 times and I have browsed through the different posts before posting this but have not found an answer. As long as I have been prgramming with PHP, this have always been a nightmare to get working. Can someone please tell me what I am doing wrong here?
I have error_log set in the ini file along with error_reporti...