help with copy() function in php

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    help with copy() function in php

    hello friends.. i would like to know how can i use the copy function to copy a file from a location that is having an ip and a port to my server ...
    say the server from which i want to copy is: x.x.x.x and port is 81
    so i write
    copy('x.x.x.x:81/sample.zip','sample.zip');
    but this does not work.
    i get an error
    "failed to open stream: Connection refused in /home/xxxxx/public_html/check.php on line 10"

    what's wrong ??? and yes i have chmoded to 777.

    (note that the file can only be accessed by port '81' and not by any other port.)

    #2
    frnd i m nt so much big php expert bt u can help me. How i can replace the comments related to any file means if i grab the site example.com and its files r
    file1(example).mp3
    file2(example).mp3 now i want to replace (example) with (sample) .
    2nd question that some sites use there logos as comment, how can i replace wid mine logo

    Comment


      #3
      Originally posted by prakash55 View Post
      frnd i m nt so much big php expert bt u can help me. How i can replace the comments related to any file means if i grab the site example.com and its files r
      file1(example).mp3
      file2(example).mp3 now i want to replace (example) with (sample) .
      2nd question that some sites use there logos as comment, how can i replace wid mine logo

      first off... make your own thread for your questions !
      but i always like to help beginners in php like me..
      so for your question,

      suppose $f1='file1(example).mp3' ;
      to replace with sample , simply use this code
      $f1=str_replace("(example)","(sample)",$f1);

      and i could not understand your second question..

      Comment


        #4
        $f1=str_replace
        ("comment logo url","ur logo url",);

        Comment


          #5
          it can possible wid curl i guess nt wid copy clarify me somebody if i am wrong

          Comment


            #6
            bt it is nt possible to get content logo url coz the logo appears after downloading

            Comment


              #7
              ok i created the working script from scratch and uploaded in the script forum..
              This is my new community for wap coding. Come and join and experience real wap coding
              http://leonine.6te.net

              Comment

              Working...
              X