kucing
-
Posts
54 -
Joined
-
Last visited
Never
Posts posted by kucing
-
-
<?php
session_id($sessionID);
session_start();
?>
Thanks you all..
This works fine
-
Thanks for your reply..
well.. how i m going to overwrite the new session with the session stored in cookie?
Appreciate your help.
-
when i try to open a new window using javascript window.open function. sometime the new window opens with new session.
So I need some help here to pass the whole session to new window using the session_id function.
Any work around?
Thanks
-
It worked prefectly.
Thank you all
Just out of curiosity, have you checked out the highlight_file() function? It's a built-in function that highlights PHP code and formats it according to how you have written it.
http://uk2.php.net/manual/en/function.highlight-file.php
-
Thanks all for your time and concern.
Well.. I am still getting the same result as if using file_get_contents function.
What if we change the first line <?php to ?php while getting the data from the file or rename the file to .txt ext before getting the content?
any easy way to do that?
Thanks
-
Hello there,
I want a function or a command which let me read a php file but should not run it while reading.
like example.
I have a file name read.php
read.php
<?php echo ("hello"); ?>
When I get the content of this file using file_get_contents which first run the file and then I get the content of the file
I only want to have the content of this file without running this file.
Thanks.
-
How about this one?
$string = 'Link : http://link.com Description : Some information Here!!'; preg_match('/Link : (.*?)\s.*/is', $string, $matches1); print_r($matches1); preg_match('/Description : (.*?)\s.*/is', $string, $matches2); print_r($matches2);
-
Thanks for the reply Tehelo..
Actually I have even tried that way but it still doesn't work.
So I was thinking if there is any other way to do that using other function than preg_match?
-
Hello all,
I am trying to match something in my array with php file but it doesn't work.
Here is the example:
$file="if \(!\$emptymessage['member']['signature'] && \$emptyoptions['show_no_signatures']\)";
if (
preg_match(
'%'.$file.'%si',
$file,
$output
)
) print_r($output);
Any help will be very appreciated..
Thanks.
-
effigy thanks for the reply.
Actually the data coming is kinda dynamic.
so i was thinking if i can get a way to make it auto detect and arrange something like http://us3.php.net/manual/en/function.xml-parse.php the last example.
-
Hi there,
Here is the xmy data which I want to convert into array any help will be very appreciated.
<userinfo> <user>test</user> <age>24</age> <country>japan</country> <city>heaven</city> </userinfo>
into
Array ( [0] => Array ( [0] => user="test" [1] => age="24" [2] => country="japan" [3] => city="heaven" ) [1] => Array ( [0] => user [1] => age [2] => country [3] => city ) [2] => Array ( [0] => test [1] => 24 [2] => japan [3] => heaven ) )
Thanks
-
Here is my question which is bothering me!
I have dynamic data from html pages which i have to match and replace with new data
Which could be
<table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="425" valign="top" align="left">test<td> </tr>
or
<table width="50" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20" align="right">test</td> <td width="20" align="right">test</td> </tr>
or
<table width="500" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="200" align="right">test<td> </tr>
or
<table width="500" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="200" align="right">test<td> </tr>
or
if ($a==1) print_r($a); else print_r("test"); $a++;
or
if ($a==1){ print_r($a); /////////example } else{ print_r("test"); /////////example } $a++;
Sorry for the long examples, well now I would appreciate if someone can help me with this.
Thanks
-
Hello Guys,
I'm looking for a way/tool to generate a thumbnail of a website on the server.
I know there are hundreds of tools that let you capture screenshots manually, but because I have to thumbnail a few hundred website, I'd need a solution that works directly on the server. Ideally I would just type in a URL and it would come up with the screenshot or even save it on the server...
I've searched a few forums and there a few people came up with the idea of installing a browser on a server and using some kind of perl code to capture the screenshot.
Unfortunately we don't have our own server yet and would rely on a software/script that can be installed on a "standard" webspace.
Does anyone have any good ideas how to solve this problem?
Thanks a lot,
K
-
Try this way..
$filename = "path/to/file"; $data = file($filename); function fileToArray($data) { $words = explode(' ',$data); foreach ($words as $word) { $outputArray[]=$word; } print_r($outputArray); } fileToArray($data);
Not tested yet but seems to be working in my mind.. lol
-
HI..
you may want to look at lightbox..
http://fortysomething.ca/mt/etc/archives/005400.php
Which do exactly what you just mentioned.
K
-
You would do this with Ajax
Thank you fert
I found another good way to do that and it's only 1 line
-
Thanks you very much nloding and bennyboywonder
Both the way works fine
Appreciate your help
-
Hi and thank you reading my issue:)
We all know that when we use innerHTML it clear the old data and inject the new data in it.
However I am looking for a way which I want my old data there and also want to inject the new
Example:
<script language="JavaScript" type="text/javascript"> function test(data){ document.getElementById('testInject').innerHTML = ''+data+''; } </script> <div id="testInject"> </div> <a href="javascript:test('This is a test data example');">DATA</a>
Output:
This is a test data exampleI want something like when I click it 10 times it should give me the ouput for ten times
Please any hint for this one.
Appreciate your help.
K
-
Here how I did that
<script type="text/javascript"> var N=5; var array = new Array() var items = list.getElementsByTagName("li") for (var i = 0, n = N; i < n; i++) { var item = items[i] array.push(myFnc(item)) } alert(array); // <----- i want this array to forward to my php script saveIT.innerHTML = '<IFRAME src="myTest.php?lid='+array+'" width="300" height="200" frameborder="0"></IFRAME>'; return array.join('|') } </script>
So this little thing saved my another 2 days.. lol
saveIT.innerHTML = '<IFRAME src="myTest.php?lid='+array+'" width="300" height="200" frameborder="0"></IFRAME>';<div id="saveIT"></div> -
Thanks all for listening me.
And my issue is now solved as I found something very cool no ajax an it's not even longer than one line and atlast I manage to pass the data directly to $_SESSION
Thanks
-
Any more hints for me
-
hello.
Do you have any example how your bad words look like?
K
-
Jesirose very thanks for a very quick response.
I also want to mention that I already have many .js running at a time and if I add one more .js file my site is really gonnd be very slow
So i was looking forward for a way which doesn't involve some complex but a easy way to pass a variable to php without my page get refreash.
Thanks again
K
-
Dear friends,
I have search google and tested many examples and I found non of them working for me..
So now I need your help to solve this thing..
Actually what I wanted to do was save one value from javascript to my database but when doing that I don't want my page to refreash and also don't want any button asking me to submit then save!
Any thing will be best which do it automaticaly without clicking anywhere also could be ajax thing.
Or also if possible sending that value directly to $_SESSION will be best.
Here is my code example.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Java2php Test</title> <script type="text/javascript"> var N=5; var array = new Array() var items = list.getElementsByTagName("li") for (var i = 0, n = N; i < n; i++) { var item = items[i] array.push(myFnc(item)) } alert(array); // <----- i want this array to forward to my php script return array.join('|') </script> </head> <body> <ul id="menu"> <li class="box" id=1>TEST1</li> <li class="box" id=2>TEST2</li> <li class="box" id=3>TEST3</li> <li class="box" id=4>TEST4</li> <li class="box" id=5>TEST5</li> <li class="box" id=6>TEST6</li> <li class="box" id=7>TEST7</li> <li class="box" id=8>TEST8</li> <li class="box" id=9>TEST9</li> <li class="box" id=10>TEST10</li> </ul> </body> </html>
Thanks
Any help is very much appreciated
K
passing the whole session to new window.
in PHP Coding Help
Posted
I was wondering if doing this way.. is this way is safe?
like if a hacker got to know about my sessionid and takeover my session?