Jump to content

kucing

Members
  • Posts

    54
  • Joined

  • Last visited

    Never

Posts posted by kucing

  1. 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

  2. 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.

  3. 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);
    

  4. 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. :)

  5. 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  :)

  6. 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

  7. 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

  8. 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 example

     

    I 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

     

     

  9. 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>

     

  10. 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

  11. 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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.