help with copy() function in php

Started on the old forum in January 2011 · view the original in the archive · old links redirect here

6 replies · 897 views · started 15 years ago · 1 min read

5 participants
arpan.rnc Developer · 94 posts #1

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

prakash55 Junior · 17 posts #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

arpan.rnc Developer · 94 posts #3

prakash55 wrote: 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..

atef201080 Developer · 58 posts #4

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

Anshul Senior · 296 posts #5

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

prakash55 Junior · 17 posts #6

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

leonine Developer · 130 posts #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

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close