How can i get/read a header of url ?
I have try this function,
function get_headers($host, $path = "/")
{
$fp = fsockopen ("$host", 80, &$errnr, &$errstr) or die("$errno: $errstr");
fputs($fp,"GET $path HTTP/1.0\n\n");
while (!$end)
{
$line =...
I have problem with sorting an array of array.
@array = (
[200,3],
[100,5],
[250,6],
[700,5],
[370,4],
);
I want to sort descanding the first elemen of array on each index.
The result is like this :
@array = (
[700,5],
[370,4],
[250,6],
[200,3],
[100,5]...
Hi,
I need help to resolve my problem.I have tried resolved it in a week but I didn't get the solution.
The problem is like this:
I have a string like this (for example, it can be more complex):
$str = '$my_var = $your_var + 2;';
I want to split the string based on a list of regexp in an array...
I am new comer in Perl, and i still confuse with the differences among $_ $& $+ and the other $. Anybody can help to explain that. Please with example so I can more understand.
Thanks.
I have a problem to match a string with some regular expresion. for example
i have regular expresion saved in associative arrays like this
%re=qw{
1 \$[a-z]+
2 \+
3 \=
4 [0-9]};
and i have a string like this
$str = '$s += 10'
i'm trying to match those each part of string with regular...
I have a problem like this.
I have a file contain :
<HTML>
<BODY>
The amount of goods : <?php print $sesuatu; $a++; ?>
<img src='kitty.gif'>
<form action='<?php print $PHP_SELF?>'>
</BODY>
</HTML>
I want to get ALL of the string between <?php and ?>and I have tried this way:
Put all the...
How can I get a part of string which contain newline (\n)?
Ex:
$string = "<HTML> \n <BODY> \n <?php print "Something 2 print";\n print $a; \n ?> </BODY> \n </HTML>\n";
I want to get string between <?php .... ?>. And how can i get them?
I have try it with many way...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.