Im having a hard time grasping this concepts of objects and how they should interact/exist.
Should I for instance have different objects (well, maybee I mean connections to the database here if there is any difference) for interactions with my database whenever they are not related?
Lets say I have one object that index.php uses to ge...
Can anyone tell me why this code won't work?
<?php $err=1; ?>
<img src="334234234234234.gif" onError="<?php $err=0; ?>" />
<?php echo "<br />" . $err; ?>
Even when the image exists, the onerror is still executed. Why?
...
Whats the best way to get around PHP's user agent matching for sessions without actually changing the global security setting? I can easily pass the session id from the page containing the swf into the swf.
Note: This is for swfupload
...
I just added OpenID to my website using the PHP janrain libraries, and I got everything working but I have a question about how to do something.
After receiving the openid_url from the user, I pass it to the openid lib, which then processes the url and gets it ready to send to the OP. How can I retrieve that URL?
Why I ask is because ...
I'm using GD to resize and convert images, however during my tests I found a weird behavior when converting transparent PNG's to JPEG's. According to the manual ImageAlphaBlending() is on by default but in order to preserve the transparency I must set ImageSaveAlpha() to true (which in turn requires that I set ImageAlphaBlending() to fal...
What is the best way to implement multi-language support in the Zend Framework?
I plan to use a separate language file for each language. Are there any other good approaches that I could look into?
...
There's a form on my site that's used for inviting friends. It's a simple text field and a submit button. If there is an error I redirect back to this page and display an error message if their is a session variable set.
if (isset($_SESSION['invite_error'])) {
echo $_SESSION['invite_error'];
unset($_SESSION['invite_error']);
}
H...
I have 2 separate arrays, one is just the id's the other is the percentage
Id's:
Array
(
[0] => 3
[1] => 4
[2] => 5
[3] => 6
[4] => 7
}
Percent array:
Array
(
[0] => 28
[1] => 39
[2] => 17
[3] => 28
[4] => 23
So it would end up like:
Array
(
[0] => Array
(
[id] => 3
[percen...
Hello,
I am wondering if it is possible in someway, to secretly embed information such as the purchase id in a file, so that if a file is being distributed, I know which purchase id it is. Something like MD5 + I don't know what.
Something like steganography.
Thank you for your time.
...
hi guys,
im using WAMP2 right now, but when i click the projects in my "Your Projects" under WAMP page. it change to $loc.
Can you help me guys...
---- PHP Rules ----
...
What is that return path for?
Can i Use in this way?
mail($to_address, $subject, $message, $headers, "-f".$return_path );
Where:
$return_path = "C:/www/project/handlebounceemail.php";
Additional:
How to direct the email to a php script? I want to read the email and check for errors.
...
I am doing a bounce-email handling with php. I have include the return path in the mail function, e.g:
mail($to_address, $subject, $message, $headers, "-f".$return_path );
$return_path = "[email protected]";
Now, what should my php script looks like (and where should i put it) in order to read all the bounce emails? (can show m...
Hi,
I'm making a digg-like website that is going to have a homepage with different categories. I want to display the most popular submissions.
Our rating system is simply "likes", like "I like this" and whatnot. We basically want to display the submissions with the highest number of "likes" per time. We want to have three categories: ...
Possible Duplicates:
Is there a php library for email address validation?
How to check if an email address exists without sending an email?
hi guys,
how can i validate the email address to email provider just like yahoo?
scenario:
[email protected]
how can i validate it to yahoo.com that the email stated above is valid?
...
How would I construct a hook in Kohana so that ...
http://www.example.com/a_controller/non_existing_method
would route to to the controller title 'a_controller' except call the controller's index method and pass 'non_exisitng_method' as an argument?
It should also allow a fallback, so that if non_existing_method IS a method, it shou...
How can I convert "html code" to .doc or .rtf or another office file format in php for unix os?
...
I got a question about the "$key => $value" in the code below... I looked it up in google but it didn't returned any results.. All I know is that "=>" is used in arrays like x = array('a' => 'b').
function _stripslashes_rcurs($variable,$top = true)
{
$clean_data = array();
foreach($variable as $key => $value)
{
$key = ($top) ...
Hi,
In CakePHP, the value passed as a parameter in the url can be obtained by the controller attribute
<?php $userid= $this->params['pass'][0];?>
I want to use $userid inside the jQuery code.
$("#displayPanel #saveForm").live("click", function(){
document.location = 'http://localhost/cake_1_2/forms/homepage...
I seem to have confused myself with a preg_match regex I'm doing, so fresh eyes and help would be appreciated.
My current regex is as follows:
/<!--menu:start:\(([0-9])\,([0-9])\)-->(.*?)<!--menu:end-->/se
I am looking to make the number input and colon e.g. :(1,4) optional, so it would match:
<!--menu:start--><!--menu:end-->
or
...
I Encrypt and Decrypt successfully, but when I decrypt the value, appears strange characters at the final of string "���":
The initial $_POST['value'] do not have any blank space or any strange character
Any idea to solve this?
Encrypt with this:
$key='my key';
$td = mcrypt_module_open('tripledes', '', 'ecb', '');
$iv = mcrypt_create_...