Search Results

Search found 3 results on 1 pages for 'safaali'.

Page 1/1 | 1 

  • curl cookie problem in PHP

    - by safaali
    hi as my client needs, I developed a code to login via cURl. login to www.web1.com and store cookies in cookie.txt go to www.web2.com and browse a page using that cookie.txt no problem with www.web2.com so when i want to do this with www.web3.com, the problem appears. the www.web3.com uses session and cookies itself and I have to gather and use them. it means I should have tow series of cookies, first those from www.web1.com , and second those from www.web3.com , then request the www.web3.com/somepage how I can do that?

    Read the article

  • php import larg table to phpmyadmin database

    - by safaali
    hi, I am so worry :( I dropped one of the tables from the database accidentally. fortunately, I have back-up. (I have used the "Auto backup for mysql") The back-up of the table is stored as .txt file (56 Megabytes) on my PC. I tried to import it by PhpMyAdmin and the import failed because the file is too large to import. then I uploaded the file to /home/tablebk directory. I have some experiences in php. I know that I would import it with this code, but i don't know the sql statment for this import. what is have to put as $line variable? please help me :( :( <?php $dbhost = 'localhost'; $dbuser = 'mysite'; $dbpw = 'password'; $dbname = 'databasename'; $file = @fopen('country.txt', 'r'); if ($file) { while (!feof($file)) { $line = trim(fgets($file)); $flag = mysql_query($line); if (isset($flag)) { echo 'Insert Successfully<br />'; } else { echo mysql_error() . '<br/>'; } flush(); } fclose($file); } echo '<br />End of File'; ?>

    Read the article

  • [php] how to read only 5 last line of the txt file

    - by safaali
    hello i have a file named "file.txt" it updates by adding lines to it. I am reading it by this code: $fp = fopen("file.txt", "r"); $data = ""; while(!feof($fp)) { $data .= fgets($fp, 4096); } echo $data; and a huge number of lines appears. I just want to echo the last 5 lines of the file how can i do that ? thanks in advanced

    Read the article

1