Jump to content

siddscool19

Members
  • Posts

    133
  • Joined

  • Last visited

    Never

Posts posted by siddscool19

  1. I was reading a program code and I came across this line of code

     

    $result = 0x01111111;

     

    when I tried to echo the $result I got this output

     

    17895697

     

    I am not able to get what this operator "x" actually does..

     

    If someone can help me understand.

     

    Thanks

  2. I am connecting to a page using cURL in php and when transferring data to a string using CURLOPT_RETURNTRANSFER and then running my filters on the output. But since the page is very bulky it takes time to load and so i want a sort of progress meter  which can show the last line the php is currently retreiving from the page it is fetching.

  3. I am facing a weird problem with sending data to a site via curl.

     

    If i send the value by this

     

    $data1="action=capt&tm=1256956853&tmhash=074144d43b5e2fcf34607221bd51b69dded08475&wait=30&waithash=7772647b09ec9995fc3c92d9f04be89029f80564";
    curl_setopt($ch2, CURLOPT_POSTFIELDS,$data1);

     

    It works in the above case but however if I send the values like this

     

    $data="action=".$action."&tm=".$tm."&tmhash=".$tmhash."&wait=".$wait."&waithash=".$waithash;
    curl_setopt($ch2, CURLOPT_POSTFIELDS,$data);

     

    It won't work.

    Here I set $data1 from the value of $data only by getting its output on screen. So $data1 and $data are same.

    Just the difference is that $data is in form of variables which I get using preg_match.

    I use preg_match to get values of action,tm,tmhash and all that.

     

     

  4. I want to know how to use ob_flush() and flush()..

    I am testing this code:

    <HTML>
    <BODY>
    This page is loading.<br />
    <?php ob_flush(); flush(); sleep(10); ?>
    Almost there...<br />
    <?php ob_flush(); flush(); sleep(10); ?>
    Done.<br />
    </BODY>
    </HTML>

    But it is not giving me the desired output in firefox :(

     

    Am I wrong in using it or it doesn't work with firefox ?

  5. I want to know how to upload from server to a browse type form.

    For example to upload an image we select the picture using browse form from our computer and it is uploaded. Instead of this how to transfer picture from server to that site using that form?

     

    I know its possible just want to know how to do it :D

     

    Thanks in advance

    I eagerly need this.

  6. I was reading rapidleech script today and i faced a new function geturl

     

    here:

    $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, 0, 0, 0, $_GET["proxy"],$pauth);

     

    What does it do?

    And is there any page on php.net on it

    ?

    I was not able to find myself there :(

    Hope someone can help

    Thanks in advance

  7. did not work it has no option for getting hostname only

    also when i try to get only directory path it gets also the hostname with it

    Like

     

    $url="http://test.com/tester/index.php";
    $path_parts=pathinfo($url);
    echo $path_parts['dirname'], "<br>";
    echo $path_parts['basename'], "<br>";
    echo $path_parts['extension'], "<br>";
    echo $path_parts['filename'], "<br>";
    
    The result is
    http://test.com/tester
    index.php
    php
    index

     

    What I want is to get only /tester in the first output.

  8. When i use fgets the file pointer jumps from one line to another. And i can reset it to first line using reset function. But how do i shift the pointer to the line of my choice like second line so that when i use fgets command it gets second line in the string...

    Is it possible?

  9. I want to know how to make php show output as php runs... Rather than showing the full output in one go..

    Like in my script there are many loops and each loops get different data.. So its like that the script runs for few seconds.. Now what i want that as the script passes first loop it displays data obtained from that loop rather than the script showing all data once it had passed all loops..

     

    Please let me know if you didn't get what I mean :)

     

     

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