Server:
<?php
error_reporting(E_ALL | E_STRICT);
$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_bind($socket, '192.168.1.7', 11104);
$from = "";
$port = 0;
socket_recvfrom($socket, $buf, 12, 0, $from, $port);
//$buf=socket_read($socket, 2048);
echo "Received $buf from remote address $from and remote port $port" . PHP_...
I am using Simple Mail from PHP.
Now I had intention of knowing life time of email.
If a user wishes to send email one day after submitting form, how can I achieve this in PHP?
$headers = 'From: '.$Name.''. "\r\n" .
'Reply-To: '.$_POST['email'].'' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
$subject = "Subject";
$message = ...
Hello I am trying to send email messages with swiftmailer version 4.0.3.
I get a returncode 2. And it seems the messages are sent, however they don't arrive.
I am using the sendmail transport mode
$this->psTransport = Swift_SendmailTransport::newInstance('/usr/sbin/sendmail -t');
I get a return code of 2 and no exception happens.
...
I'm running XAMPP - apache 2.2. I have 200+ folders in http://localhost/examplefolder
I have bought another hdd to load balance the folders, now I have 100+ folders in C:/xampp/htdocs/examplefolder and another 100 folders in D:/examplefolder.
How can I point both directories so that 200+ folders will appear in http://localhost/examplef...
I have an admin site that I have copied over to a new server to test for bugs and put live, along with some other sites.
The admin appears to have REGISTER GLOBALS on and is using it for most of the 300 php files.
Based on the fact that you have to login to this system anyway is it worth the weeks of work to re code all the variables?
...
I have a web server which can run PHP and Ruby.
I would like to know if there is a PHP program which can do version control of my code similar to SVN?
I know there are already open source project hosting sites which provide this service already but I would like it to be installed on my own host.
I don't have the access to this server t...
Hi I am trying to get a data feed from a vendor. I set up a page and gave them a URL and told them to httppost csv data.
right now my page just looks like this so I can see what the data looks like that I am getting:
$feedData = file_get_contents("php://input");
mail('[email protected]','data feed from vendor',$feedData);
They said...
Help,
I am having problems calling a url from PHP code. I need to call a service using a querystring from my PHP code. If I type the url into a browser, it works ok, but if I use file-get-contents() to make the call, I get:
Warning: file-get-contents(http://.... ) failed to open stream: HTTP request failed! HTTP/1.1 202 Accepted in ...
convert DEC to ASCII:
$ascii=chr($t);
I need a code that converts ASCII to DEC.
...
I have four block views on a page (call it "info" page) that are filtered by proximity to give me four pieces of information relating to one particular filtered location.
I would like to be able to create an intro page with an exposed proximity filter that when executed would take me to the (info) page and simultaneously filter the four...
I did a cursory search and couldn't find this question and this could be viewed as a multi-part question so help me out in either case if I made a mistake.
I want to know when building a typical site on the LAMP stack how do you optimize it for the best possible load times. I am picturing a typical DB-driven site.
This is a high-level...
Hi, I have a file (image) upload script in PHP that I use to upload and resize images... It uses a simple MIME type and size validation so only jpg images are allowed and 1MB max file size.
I recently discovered a problem. When I try tu upload a .avi file using the script, the script processes the file like its the correct MIME type and...
I'm writing a function that works out whether or not the time is between 9am and 5pm on a working day. It then tells you when the next working day starts (if currently out of business hours) based on whether today's business hours have ended or (if after midnight) are about to begin.
All is going well so far, and to create the most rea...
Hello new to PHP and in a bit of a bind. I need to diplay a nav bar PID = "nid" nid is the page i am on so say i am on a page A and page A has 5 sub nav categories(child ID) then they will display on the left side. MY problem here is that the cid and its name are on two different tables..(tables are listed at bottom) Thanks
$navQuery ...
Duplicate:
YUI -like compressor for PHP?
What is the best PHP code encryptor?
The original question was edited and changed in its sense!!!
I am looking for a source encrypting software and I want to know your opinion!!!
I am not looking for a obfuscator, not a YUI-like-compressor!
...
zend framework has many components/services I don't need, it has many includes.
All this I think slow down application.
Do you know how to speed up it? may be remove not used(what is common) components, or combine files to one file?
...
I'm wanting to order Wordpress posts by the most recent comment. To the best of my knowledge this isn't possible using the WP_Query object, and would require a custom $wpdb query, which I can easily write. However, I then don't know how to setup the loop to run off this object.
Can anyone help?
...
Hey,
Say I am echoing a large amount of variables in PHP and I wont to make it simple how do i do this? Currently my code is as follows but it is very tedious work to write out all the different variable names.
echo $variable1;
echo $variable2;
echo $variable3;
echo $variable4;
echo $variable5;
You will notice the variable name is th...
Are there any tricks to transferring and/or sharing the Resource Links across multiple PHP pages? I do not want the server to continue connecting to the database just to obtain another link to the same user in the same database.
Remember that the link returned from mysql_connect() is automatically closed after the script it originated o...
I am attempting to get the last modified time of a file that definately does exist:
/document_root/myfile.pdf
-rwxr-xr-x 1 11018 11008 198621 Nov 26 2007 myfile.pdf
When i run the following statement (through PHP CLI as root):
filemtime('/document_root/myfile.pdf');
I get errors:
Warning: stat(): Stat failed for /document_r...