I know this may be an impossible question, since we are dealing with two different layers of the network, but is it possible to send a reply to an ARP request using PHP sockets?
If so how....such as What port and ip address would you connect the socket to? Again, I understand that arp doesn't use a port number...at least not that I can...
I want to fetch a method's comments,take below method for example:
/**
* Returns the regex to extract all inputs from a file.
* @param string The class name to search for.
* @return string The regex.
*/
public function method($param)
{
//...
}
the result should be
Returns the regex to extract all inputs from a file.
@param string ...
Hi guys,
is there a way to traverse an object to get the parent object data?
With "parent object" I don't mean the parent class, but literally object.
Here an example, in a javascripty world :-) :
$parent->test = "hello world!";
$parent->child = new B();
It would be great If I could access all the data from parent in the child obje...
class A
{
public $property1;
public $objB;
public __construct(){
$this->property1 = 'test';
$this->objB = new B();
}
}
class B
{
public $title;
public __construct(){
$this->title = 'title1';
}
}
so now i do this in the .php file
$a = new A();
in my .tpl i want to display $a->objB->title
how do i do that...
Let's say I have this string:
Hello &, how are you? I'm fine!
Is there a function that will convert this to:
Hello &, how are you? I'm fine!
Also, why does "'" sometimes show up as: � on sites? What am I missing?
...
Hi.. i want to convert this array
Array
(
[2] => Array
(
)
[4] => Array
(
[12] => Array
(
)
[13] => Array
(
[16] => Array
(
)
)
)
[5] => Array
...
I use dreamweaver cs4 as my main php coding editor. I am wondering if anyone has any information on how exactly to write a dreamweaver extension? Also, what can / can't you do ?
Specifically, I want to write an extension that will allow me to quickly search my file tree and then open a file, via a quick auto complete search box locate...
I'm looking for a way to rotate a string to the left N times. Here are some examples:
Let the string be abcdef
if I rotate it 1 time I want
bcdefa
if I rotate it 2 time I want
cdefab
if I rotate it 3 time I want
defabc
.
.
If I rotate the string its string
length times, I should get back the
original string.
...
Present day usable solution:
Note that if you use an ide or an advanced editor, you could make a code template, or record a macro that inserts '->' when you press Ctrl and '.' or something.
Netbeans has macros, and I have recorded a macro for this, and I like it a lot :) (just click the red circle toolbar button (start record macro),t...
What is the function used to create taxonomy terms in Drupal from the code?
...
What's the "trick" to save an XML file that visually would result neatly formatted?
such as:
<xml>
<item>foo</item>
</xml>
and not:
<xml><item>foo</item></xml>
...
Hi,
Given an array like this:
Array => (
[0] => 1,
[1] => 2,
[2] => 3,
[3] => 5,
[4] => 6
)
What is the easiest way to find the first 'available' ID in that array that is, the first value in the sequence [1,2,3...n] that does not exist in the array? In this case, the correct answer would be 4.
I can do this using some whi...
Hy everyone how can I replace "" // i think its called double quotes with '' // i think its called single quotes
using PHP ?
...
$db = new PDO('mysql:dbname=xnews;host=localhost;port=' . $LOCAL_DB_PORT,
$LOCAL_DB_USER,
$LOCAL_DB_PASS,
array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'")
);
reports:
Undefined class constant
'MYSQL_ATTR_INIT_COMMAND'
Is it renamed?
...
Just need get some vals located in application.ini(main ini) in the Controller plugin
I know I can create an instance of Zend_config_Ini but would like to use the existing resource (application.ini is already used in Front Controller)
...
I am trying to call ejabberdctl from a PHP file, but it is failing with the following error :
Failed RPC connection to the node ejabberd@localhost: nodedown
The node is running, i have checked this by logging into the server.
When the php script is run this is the error i see in /opt/ejabberd-2.1.2/logs/ejabberd.log shows :
=ERROR R...
I want to display digits with leading 0s, for values of a single digit, specifically for displaying hours and minutes.
How do I do that in PHP?
...
I have a html file that contains urls that start with ftps, http, https, mms, ed2k.. and in certain paragraphs. I need to sort these links and remove all the links that start with mms://. I tried preg_replace but it doesnt work coz many links are too long. can someone suggest a good method to remove the links using php?
...
Is there a simple "Web interface" to running PHPUnit test suites? i.e. a PHP script that runs the test on the command line, and outputs a nicely formatted HTML result.
I develop web applications, and the day-to-day workflow usually switches between the IDE and the browser. I would like to have the unit testing in the same environment.
...
hey guys
im using a form in php to submit some information into my database
so i used two function to do this
but how to show the result in th same page that has the form
...