Jump to content

siddscool19

Members
  • Posts

    133
  • Joined

  • Last visited

    Never

Posts posted by siddscool19

  1. I want to know how to stream a file from a server while it is being downloaded by the user.......

    Basically what I want to do is login into a server like say rapidshare and stream file from there and make it available for the user such that user downloads file directly from the rapidshare server and without himself logging into account.. I don't want to copy file first to my server and then make it avaiable for download.

    So how should I procede on this...... We can login into a rapidshare url using http://username:pass ....

     

    If I am not much clear please tell me and also I want this to setup rs premium generator for my site so that people can download files using premium account..... I have nothing bad in this :)

  2. I want to know from where I can learn about headers for example

    <?php
    $file = 'monkey.gif';
    
    if (file_exists($file)) {
        header('Content-Description: File Transfer');
        header('Content-Type: application/octet-stream');
        header('Content-Disposition: attachment; filename='.basename($file));
        header('Content-Transfer-Encoding: binary');
        header('Expires: 0');
        header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
        header('Pragma: public');
        header('Content-Length: ' . filesize($file));
        ob_clean();
        flush();
        readfile($file);
        exit;
    }
    ?>
    

    I have taken these codes from php.net

    I would like to know from where to learn about headers because I see that they play a really good role in php and can help a lot. So I wanted to know that from where to learn about them in detail and their uses....

     

    Thanks

     

  3. I have created a coding which can pass first step of login..

    That is it logins into blogger and when it faces redirection page it opens a new page

    and when i save the output i get all the redirecting page contents.......

    Here are the codes for more clear understanding.....

    <?php
    $url="https://www.google.com/accounts/ServiceLoginAuth?service=blogger";
    $email=(email id of blogger here);
    $pass=(pass of blogger here);
    $continue=urlencode("https://www.blogger.com/loginz?d=%2Fhome&a=ADD_SERVICE_FLAG");
    $ch3 = curl_init();
        curl_setopt($ch3,CURLOPT_URL, $url);
        curl_setopt($ch3, CURLOPT_POST, 4);
        curl_setopt($ch3, CURLOPT_POSTFIELDS,"continue=$continue&service=blogger&naui=8&fpui=2&skipvpage=true&rm=false&hl=en&alwf=true&alinsu=0&Email=$email&Passwd=$pass&PersistentCookie=yes&rmShown=1&signIn=Sign+in&asts=");
        curl_setopt($ch3,CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch3,CURLOPT_FOLLOWLOCATION,1);
        curl_setopt($ch3,CURLOPT_SSL_VERIFYPEER,0);
    curl_setopt($ch3,CURLOPT_COOKIEJAR,"cookie.txt");
    curl_setopt($ch3,CURLOPT_CONNECTTIMEOUT,120);
    $result1234 = curl_exec($ch3);
        curl_close($ch3);
    
    $ch3 = curl_init();
        curl_setopt($ch3,CURLOPT_URL, "https://www.google.com/accounts/CheckCookie?continue=https%3A%2F%2Fwww.blogger.com%2Floginz%3Fd%3D%252Fhome%26a%3DADD_SERVICE_FLAG&hl=en&service=blogger&chtml=LoginDoneHtml&skipvpage=true&alinsu=0&naui=8");
        curl_setopt($ch3,CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch3,CURLOPT_FOLLOWLOCATION,1);
        curl_setopt($ch3,CURLOPT_SSL_VERIFYPEER,0);
    curl_setopt($ch3,CURLOPT_COOKIE,1);
    curl_setopt($ch3,CURLOPT_COOKIEFILE,"cookie.txt");
    curl_setopt($ch3,CURLOPT_CONNECTTIMEOUT,120);
    $result1234 = curl_exec($ch3);
        curl_close($ch3);
    $fopen=fopen("hi.html","w");
    fwrite($fopen,$result1234);
    fclose($fopen);
    ?>
    

     

    So how should i go further by redirection page and save the cookie of the resulting page using which I can login into blogger account completely...

     

    I want to do this since I want to post on my blogger using php since it takes a lot of time for me to load the new post creator page and then enter details there so I wanted to use php..

    I have no bad intensions :)

     

    Thanks

  4. I think something is wrong with if function it should be like this

     

    <?php
          if (!isset($_COOKIE["rchjr"])){
             exit();
          }else{
             header("location:http://www.kraft.com");
             exit();
          }   
    ?>

  5. Ohk thanks

     

    One more question I want to ask. I have quite a good knowledge of php lets say more than basics atleast but not at the top. I want to know how should i go in more deep knowledge of php...

    Should I read some books?If yes could u suggest some if u don't mind :)

     

    I am asking here since I don't want to create a new topic for it :)

    If you say i would create a new topic :)

  6. I am using the following codings :

      $email = $_REQUEST['email'] ; 
      $subject = $_REQUEST['subject'] ;
      $message = $_REQUEST['message'] ;
      $from=$_REQUEST['from'] ;
      
    mail($email,$subject,$message,"From: $from\nContent-Type: text/html; charset=iso-8859-1");

     

    These are working but it is having problems with quotes like it sends quote in this format " due to which my html doesn't work so how to prevent it from converting?

  7. I want to store the cookies when I login using xmlhttprequest in phpbb3 forum so that i can use the cookies again..... Here are the codings I wrote but they are not working....

    include('class.XMLHttpRequest.php');
    $xml = new XMLHttpRequest();
    $xml->open("POST","http://www.phpbb3.com/ucp.php?mode=login");
    $xml->send("username=user&password=pass&redirect=&login=Login");
    $cookie=$xml->getResponseHeader('Set-Cookie');
    echo $cookie;
    
    $xml = new XMLHttpRequest();
    $xml->open("POST","http://www.phpbb3.com/posting.php?mode=post&f=4");
    $xml->setRequestHeader("Cookie",$cookie);
    $xml->send(null);
    echo $xml->responseText;

  8. Sorry for trouble

    Here are the details:

    See I have a script and it posts on a phpbb3 forum. It works fine on my localhost since my internet is slow. But when I upload it on a hosting account majority of time it skips posting due to high speed. So I want to control the speed at which it sends data or wait for the script to send data before it proceeds majority of the time it proceeds without sending data to the forum. So I want to fix this problem. I hope you can get it now.

    If you will anything else is missing please tell me

  9. How can we slow down speed of a script..... While sending data using curl its skipping the data due to high server speed. I am not able to get the script to work :(

     

    Here is the function

    function getquote($postonelink){
    $ch2 = curl_init();
        curl_setopt($ch2,CURLOPT_URL, $postonelink);
        curl_setopt($ch2,CURLOPT_RETURNTRANSFER,1);
        curl_setopt($ch2,CURLOPT_SSL_VERIFYPEER,0);
    curl_setopt($ch2,CURLOPT_CONNECTTIMEOUT,"120");
    curl_setopt($ch2,CURLOPT_COOKIEFILE,"cookie.txt");
    $souvik123 = curl_exec($ch2);
        curl_close($ch2);
    return $souvik123;
    }

    I am not able to get the return code :(

    What to do to fix it?

     

    There must be a way to control it.......

  10. I have created a script.. The script has to post data on a forum using curl. It works fine on xampp server since my net speed is fine. While when i test it on hosting it has problems due to high speed it sometimes send data and sometimes not. How should I force it to send data?

    WHen i use sleep function to slow down script it does work sometimes but not always :(

    How to fix such problem?

     

    THe forum has no time limit between posts since its my forum and I have removed it.

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