I want to generate an email using the mail() function:
<?php
$to = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
// instead of sending mail, out put to file
mail($to, $subj...
I want simple PHP class or function to return the URL of the FLV video from a page on YouTube to use this URL in another FLV player to play the video in my own player not with default YouTube player.
...
Hello guys,
As we know it is possible to send emails using php mail() function. but in some servers it requires SMTP authentication (ie we have to provide an email address and password). How can I determine through a PHP script that the server require authentication or not.
Thanks
...
Im new to PHP..I commonly see online that many PHP developers like to code php in simple notepad.. however its always nice to use an IDE which helps the user being more productive by making fewer mistakes and writing good code. My Question is "WHICH IS THE BEST IDE FOR DEVELOPMENT IN PHP?"
Im looking for a PHP IDE which provides good:...
I'm writing a google maps page with about 160 records, 1 for each location.
The original map data is held in a sql table. As there is quite a lot of text
this could be a max of 900 characters per record.
I filter this data my month so there may be 20-30 records shown as markers on the map.
I want the user to quickly switch between mon...
is there any website which has given very good examples of php5 and mysql.
how to use OOP for website development from small website to large. or is it good to start development in zend framework.
...
Looking at w3schools for xPath (feel free to give me other references), you can select all the children of bookstore, but what if I wanted to only select the second book element? How can I do that?
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book>
<title lang="eng">Harry Potter</title>
<price>29.99</price>
</book>
<b...
Each line is a string
 4
 minutes
 12
 minutes
 16
 minutes
I was able to remove the  successfully using str_replace but not the HTML entity. I found this question: http://stackoverflow.com/questions/657643/how-to-remove-html-special-chars-in-php
But the preg_replace did not do the job. How can ...
file_get_contents("zip:///a/b/c.zip") is returning NULL. How can I read unzipped contents of a zip file in PHP 5+ ?
...
I need to generate uncompressible data (therefore pseudorandom), and have been trying with the code below. But it's only producing about 10MB/s of data. I need about 100-200 MB/s.
Do you have any advice?
if ($length > 8*1024*1024){ //Default max string length in php.
while (($length - $bytesGenerated)>8*1024*1024){
$bytesGen...
I want to enhance my browser-based web application with functionality that needs to read the absolute path of the files being uploaded and used for some processing, I have used HTML5 File API and PHP POST Upload method to support the upload functionality.
Question: Direct or work around method of reading the absolute path (client-side) ...
Hi,
it's been a very very long while since i did anything in PHP.
Would anyone care to explain how to achieve such effect:
i go to mydomain.com/user/peter
and get a customized user page for this username 'peter'
can it work such that peter gets piped to some php script that generates page for user parameter? it kind of works like passi...
Hi i need some help with it. I have created a php script which i am running from copy paste into node as php code. I need a file path for a file to process like i am using '\birds\birds.xml'. I dont want to include the file path instead i am thinking, How to create a simple small form with browse button and selecting a file than submit w...
A php closure or anonymous function is used to create function without specifying its name.
Is it possible to call them without assigning to identifier as we do in JavaScript ?
e.g.
(function(){
echo('anonymous function');
})();
What is the correct use of use construct while defining anonymous function and what is the status of a...
I am trying to implement this method in my model:
class Application_Model_MenuProfilesProducts extends Zend_Db_Table_Abstract
{
protected $_name = 'menu_profiles_products';
public function fetchProducts($profileID) {
$select = Zend_Db_Table::getDefaultAdapter()->select()
->from(array('mpp' => 'men...
Hi all,
I want to get the cookie information stored using setcookie function in the source code of the php.. not the php source code.. What is the corresponding C code for _COOKIE['xx'];
In other words where is the _COOKIE array created and populated?
...
Hello everyone, I'm starting a new project using Linux and PHP, but for the early dev state i'm now, I'm trying to use XAMPP for now.
I'm Running Ubuntu 10.04 x64 on a laptop, And got everything I need. The site I should build is based upon CodeIgniter and some implementation of smarty, but I think this is not that important because the...
Hi all,
Generally when we are using GPRS connection , the request will be sent to appropriate host as a http(s) request . In receiving side ( PHP ) , we are able to get the IP address using $_SERVER or $_REQUEST variable . Like that is there any way to get the mobile number that means from which mobile number request being given. Ca...
what is autoload in PHP?
...
hi i am working with php5 in this i upload a zip file and also extract the zip file in folder where i uploaded it. but problem is created when i want to read that file using zip_read function but its give following error.
Warning: zip_read() expects parameter 1 to be resource, integer given in C:\wamp\www\praveen\zipupload.php on li...