I see base64_encode can encode values, but without a key. I need a function that takes a salt and data, encodes it, and can be decoded with the same salt (but if you try to decode it without the salt, it gives you gibberish).
Is there a PHP function for this (can't find it, only modified versions of base64_encode).
EDIT: Found the answ...
Hi, I want to track IP addresses of visitors to my blog. I don't know which blog I'm going to use, I'll use whichever one will work (i hear blogger doesn't work with php).
Also, once I make the blog and set up the IP tracker, where will I go to find the IP addresses of my visitors? Thanks in advance!
...
I'm trying to build a list of functions that can be used for arbitrary code execution. The purpose isn't to list functions that should be blacklisted or otherwise disallowed. Rather, I'd like to have a grep-able list of red-flag keywords handy when searching a compromised server for back-doors.
The idea is that if you want to build a mu...
I'm trying to get a constant string and index it as if it was an array of characters (square bracket syntax). When I try this code it fails on the last line.
define( 'CONSTANT_STRING','0123456789abcdef');
echo CONSTANT_STRING; // Works by itself :)
$string = CONSTANT_STRING;
echo $string[9]; // Also works by itself.
echo strlen(CONSTAN...
Hello,
I'm still learning functions and how they work. I know what I'm doing wrong just not how to fix it. I am writing a function to pull image data out of a database and return it onto the screen. It works but if there is more than one image it will return the last image only. I know the problem is that $project_image is only returni...
Hi guys,
I'm doing this tutorial:
http://www.phpeveryday.com/articles/Zend-Framework-Database-Creating-Input-Form-P494.html
We are building a simple input form using POST and submitting it to a mySQL database. All is working fine. I'm just trying to get my head around the getRequest() function.
In the controller, we have this:
pub...
Is this bad practice and should I be shot for coming up with this code?
function get_business_addresses($business_id) {
$query = $this->db->get_where('contact_business_addr_rel', array('business_id'=> $business_id));
if ($query->num_rows() > 0) {
foreach ($query->result() as $row) {
$address_id = $row->addr...
hi this is my array structure. i want to print title track id .
Array
(
[@attributes] => Array
(
[type] => array
)
[track] => SimpleXMLElement Object
(
[id] => 3617316
[created-at] => 2010-06-24T09:09:23Z
[user-id] => 1219873
[p...
Hi
I am trying to send a mail with html template. The mail was sent. but i can't find the design there in that mail. How to send the mail with the design.
The mail should exactly look like what i view in my html template.
How to do this? kindly advice.
Thanks in advance.
My code:
$subject = "Hi this is subject";
$email = "[email protected]...
I am new to PHP and am trying to write a very simple class:
<?php
class Course {
private $credits;
public function getCredits() {
return $this->credits;
}
}
?>
the problem is when I load this in a browser, I see:
credits; } } ?>
so it looks like the browser is echoing all that follows "thi...
Hi everyone. I'm trying to learn object oriented programming more clearer by creating a database class in PHP.
This is what i have right now. I'm getting an error about $mysqli being an undefined variable when i try to call it using $db->query();
Please explain how to make the variable $mysqli defined.
<?php
class phpDatabaseClass ...
Hi,
there is any possible to implement php applications in android phone without using the web browser.if there then help me.thanks in advance.
...
I have a PHP app, and I want some of the latest data to be extracted and display on a Joomla portal. I just couldn't figure out, can I return an XML document or what is the best way to do?
...
hi
how can i add a ffplay.exe (ffmpeg) video to php script.can i use exec() to access the ffplay.please help me out.thanks in advance.
...
Hi All, I want to decode Json returned from the WebService, And it should set a cookie, that i want to use to call next WebService API. I am not sure how to set a cookie, and decode this json.
I tried decoding it, but get the error. I need to extract sessionId. You can use the WebService.. I have put this on Internet.
Here is my code s...
Hi all,
I would like to know why the quality of my image is low in DOM PDF.
The following image:
http://img517.imageshack.us/img517/6996/top3.gif
The borders are 1px and everything looks sharp.
If I include the image in a HTML document with DOMPDF, everything works great, but the quality of the image is not really sharp.
Output:
img...
Dear all,
am developing a web application and I need some help.
I have in my database(MySQL) tables for village linked to the sub county table. Sub county linked to the county table and the county table linked to the District table.
I need to design a web form in dreamweaver using PHP for capturing people's details i.e Name,Date of Bir...
Hello,
I see here an c example of libavcodec http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/api-example_8c-source.html
This is encoding/decoding audio and video (frame by frame).
I intend to something like this but in php.
I want to convert a video in same time of uploading.
Ex: User upload a 100mb video. When server receive first d...
hi,
how can we execute a ffplay.exe file from php in windows.there is any way place help me out with some codes.thanks in advance.
...
hello friends,
when i am hosting cakePHP and database is in different servers it takes too much time to respond
but when both are in the same server itz performance is good
is there any way to tune performance of cakePHP
keeping database in different server
the performance of database server is good
i already tested another applicatio...