PHP 7.1.12 Released

ssh2_scp_recv

(PECL ssh2 >= 0.9.0)

ssh2_scp_recvSolicita un fichero mediante SCP

Descripción

bool ssh2_scp_recv ( resource $session , string $remote_file , string $local_file )

Copia un fichero desde el servidor remoto al sistema de ficheros local usando el protocolo SCP.

Parámetros

session

Un identificador de enlace de conexión a SSH, obtenido desde una llamada a ssh2_connect().

remote_file

Ruta del fichero remoto.

local_file

Ruta del fichero local.

$loci> pphp?t=1478800802&f=/styles/theme-base.css" media="screen"> ulue='zhturndd> dsrEt

D dsrETRUEpan> )<_scp_r co casa ll éxiemaoah2_scp_rs="pa>FALSEpan> )<_scp_r co casa ll '>Err
ulue='Ejeial

edit-bug"> xaial< pph xaial<-5454v class=psh2_scp_rEjeial< #1 n

an> p class="edit-bug"> xaial<-href="htt"goto">a"> "rs="pa>s="funkarou" hrtur: #000000t"go="funkarou" hrtur: #0000BB"><?$s.php'>Per > ct() 22> > ct() word> $s.php'>Per> word'> >br />> ct() $s.php'>Per> > ?0) )
) ulue='zer también class="para">
nav"> orial nction"> seeAlso mend » an>. - Envíro mediante SCP

<">
seeAlso mcopyan>. - ichero desde el >
i
ahref="function.sange.phpadd-hdd>ype=D="lassh2-scp-recv">Report age=fu Pror"las.php.net/manual/es/function.ssh2-scp-recv.php"> /images/l'gos/php-hdd> -add@2x.png'>'addtenhdd>'" heigh'12'4" alt="'12'ass=mall>addtenhdd>> mall>>. ulue='tted tensiibuionsNdd> id="function">coupia 10nhdd>s> ot< pph104124v ss="next"> vdd> lasss"breadcrumbVu104124v ef="/" class="bfunctiovdd>-hdd>ype=Drum104124es/funon.ssh2-scp-recv">Report aes/fuvdd>=uPHP ReleasV/a>us.phdd> -vdd>u">up/div>
Report aes/fuvdd>=>DowHP ReleasV/a><>Dow! nction">us.phdd> -vdd>rio>Dow/div>
ally pphV104124vP Releas83% like this...v ef="/4>
us.p> /em>ojovirtu> > an> afuncction">gdhpnchor"class="#104124v> &
; afueadccreen">d"appliReleas2011-05-25 01:37ssh2_scp_r6 years ago> an> v id="flash-t">
pphHn.p104124v eoto">a"> "rs="pa>s="funnamediva"es"> Tryneraemage> esms iut-tse" id?

Neic Eforge> emaus. '>Magi iutthe es" id, bui neic Eiutthe do el one.

Exaial<:

s="dc-title">S le keywordt"=> an> "mye" idms .>

s S keywordt"(s S keywordt",s S keywordt",s S keywordt".> an> "/"> keywordt".> S keywordt"); > Copia // ERROR

s S keywordt"(s S keywordt",s an> "\""> keywordt".> S keywordt".> an> "\""> keywordt",s S keywordt".> an> "/"> keywordt".> S keywordt"); > Copia //OK

s S keywordt"(s S keywordt",s an> "\""> keywordt".> S keywordt".> an> "\""> keywordt",s an> "\""> keywordt".> S keywordt".> an> "/"> keywordt".> S keywordt".> an> "\""> keywordt"); > Copia //ERROR
> S > So,tthe '>Magi iutthe /dd>m" idmar>m"eedonsoionsfal sisted, hddsfal

) vdd> lasss"breadcrumbVu119630v ef="/" class="bfunctiovdd>-hdd>ype=Drum119630es/funon.ssh2-scp-recv">Report aes/fuvdd>=uPHP ReleasV/a>us.phdd> -vdd>u">up/div> Report aes/fuvdd>=>DowHP ReleasV/a><>Dow! nction">us.phdd> -vdd>rio>Dow/div> ally pphV119630vP Releas75% like this...v ef="/2>
us.p> /em>liubomyr<>Dt pelo at gMail<>Dt ct>g em>> an> afuncction">gdhpnchor"class="#119630v s&
; afueadccreen">d"appliReleas2016-07-20 07:56ssh2_scp_r1 year ago> an> v id="flash-t">
pphHn.p119630v eoto">a"> "rs="pa>s="funnamediva"es"> Io case if youage>:
>br />Warn miut/onte-vg" File Syssoie<2
>br />Use ` aneam_ge>_href="ht` sh2-scp-r
>br />Exaial<:
s="dc-title">S l aneam > keywordt"= @> S keywordt"(s an> "Funcisunction.sshp.ne"esheetnofoll"quitarge>="_blank rfhp.ne>.
S an> "> keywordt", > an> 'r'> keywordt");
if (! > S keywordt") {
        throwm"ew \> S dash; keywordt"(s an> "Could hddsdesc: > S an> "> keywordt");
}
>br />> S keywordt"= s S _href="htdash; keywordt"(s S keywordt");
> S _href="ht > keywordt"(s S keywordt", > S keywordt");
@> S keywordt"(s S keywordt");
> S ) ) vdd> lasss"breadcrumbVu97997v ef="/" class="bfunctiovdd>-hdd>ype=Drum97997es/funon.ssh2-scp-recv">Report aes/fuvdd>=uPHP ReleasV/a>us.phdd> -vdd>u">up/div> Report aes/fuvdd>=>DowHP ReleasV/a><>Dow! nction">us.phdd> -vdd>rio>Dow/div> ally pphV97997vP Releas75% like this...v ef="/2>
us.p> /em>luriptddssv at gMail<>Dt ct>g em>> an> afuncction">gdhpnchor"class="#97997v s&
; afueadccreen">d"appliReleas2010-05-19 03:16ssh2_scp_r7 years ago> an> v id="flash-t">
pphHn.p97997v eoto">a"> "rs="pa>s="funnamediva"es"> Tdd> sh2-scp- can b> miuema ror"laorysoie es<'>Serv,SH elat> <

s="dc-title">S ls.php'>Per > keywordt"= s S keywordt"(s an> 'host'> keywordt", > S keywordt");
s S word> keywordt"(s S Per> keywordt", > an> 'us.p'> keywordt", > an> 'p> word'> keywordt");

s S keywordt"=> an> "/e keywordt";
s S keywordt"=> an> "/ keywordt";

s S keywordt"=> an> "lt > S an> "> keywordt";
s S keywordt"= s S keywordt"(s S Per> keywordt", > S keywordt");
s S _bkeywordt"(s S keywordt",s S keywordt");
s S keywordt"=> S keywordt"(s S keywordt",s S keywordt");

s S keywordt"=> S < keywordt"(s an> "\n"> keywordt",s S keywordt");

s S keywordt"=> S keywordt"(s S keywordt");

for(s S keywordt"=> S keywordt";s S keywordt"<s S keywordt";s S keywordt"++){
    s S keywordt"=> S keywordt"(s S keywordt"[s S keywordt"]);
    if(s S keywordt"!=> an> ''> keywordt"){
        s S keywordt"=> S keywordt".> S keywordt";       
        s S keywordt"=> S keywordt".> S keywordt";
       
        if(s S keywordt"(s S Per> keywordt", > S keywordt",s S keywordt")){
            echo > an> "m Rel"> keywordt".> S keywordt".> an> " was copionst > S an> <br /0) keywordt";
        }
    }
}

s S keywordt"(s S keywordt");
> S ) ) vdd> lasss"breadcrumbVu112508v ef="/" class="bfunctiovdd>-hdd>ype=Drum112508es/funon.ssh2-scp-recv">Report aes/fuvdd>=uPHP ReleasV/a>us.phdd> -vdd>u">up/div> Report aes/fuvdd>=>DowHP ReleasV/a><>Dow! nction">us.phdd> -vdd>rio>Dow/div> ally pphV112508vP Releas100% like this...v ef="/1>
nction">us.p> /em>Anonymousg em>> an> afuncction">gdhpnchor"class="#112508v s&
; afueadccreen">d"appliReleas2013-06-24 09:14ssh2_scp_r4 years ago> an> v id="flash-t">
pphHn.p112508v eoto">a"> "rs="pa>s="funnamediva"es"> May fail esmfromtthe us.p's/dd> ror"laoryswhen youatry emaus. a path like '~/> ppears emadislike tildes, smaus. the /ull pathp ) ) vdd> lasss"breadcrumbVu112862v ef="/" class="bfunctiovdd>-hdd>ype=Drum112862es/funon.ssh2-scp-recv">Report aes/fuvdd>=uPHP ReleasV/a>us.phdd> -vdd>u">up/div> Report aes/fuvdd>=>DowHP ReleasV/a><>Dow! nction">us.phdd> -vdd>rio>Dow/div> ally pphV112862vP Releas50% like this...v ef="/0>
nction">us.p> /em>Maddieg em>> an> afuncction">gdhpnchor"class="#112862v s&
; afueadccreen">d"appliReleas2013-07-30 05:40ssh2_scp_r4 years ago> an> v id="flash-t">
pphHn.p112862v eoto">a"> "rs="pa>s="funnamediva"es"> If youaar>marted.p the '>Err -recv - Manual (): Unype Rt ceionses
>br />Try /dt_href="ht("Funcisunction.sshp.ne$sfhp$>="_blank rfhp.ne$sfhp$>_href="ht()che m s.ie9.css"-- this is afng SIatrionsallmpath fipulatit no avail ) ) vdd> lasss"breadcrumbVu110230v ef="/" class="bfunctiovdd>-hdd>ype=Drum110230es/funon.ssh2-scp-recv">Report aes/fuvdd>=uPHP ReleasV/a>us.phdd> -vdd>u">up/div> Report aes/fuvdd>=>DowHP ReleasV/a><>Dow! nction">us.phdd> -vdd>rio>Dow/div> ally pphV110230vP Releasno vdd> ...v ef="/0>
nction">us.p> /em>mark at mohc<>Dt netg em>> an> afuncction">gdhpnchor"class="#110230v s&
; afueadccreen">d"appliReleas2012-10-03 12:47ssh2_scp_r5 years ago> an> v id="flash-t">
pphHn.p110230v eoto">a"> "rs="pa>s="funnamediva"es"> Transe fred mcan b>Per,'exit').  end » willmdid hddsn.phletely eranse fr
>br />egr
>br />end » a$c.php'>Per, $in/dd>, $es/dd>, 0644);
st()Per, 'exit'); // exit the 0.9.c.php'>Per> ) vdd> lasss"breadcrumbVu83487v ef="/" class="bfunctiovdd>-hdd>ype=Drum83487es/funon.ssh2-scp-recv">Report aes/fuvdd>=uPHP ReleasV/a>us.phdd> -vdd>u">up/div> Report aes/fuvdd>=>DowHP ReleasV/a><>Dow! nction">us.phdd> -vdd>rio>Dow/div> ally pphV83487vP Releasno vdd> ...v ef="/0>
nction">us.p> /em>gordon_e_.css. at yahoo<>Dt ct><>Dt aug em>> an> afuncction">gdhpnchor"class="#83487v s&
; afueadccreen">d"appliReleas2008-05-28 03:19ssh2_scp_r9 years ago> an> v id="flash-t">
pphHn.p83487v eoto">a"> "rs="pa>s="funnamediva"es"> Bets it will" id>br />I should /dd>mitche m builes, bui fis" the p'>ProcsallD> mhddsknowswhat he is oie bout!
>br />Bui anyway - the s.ie 9.css" ofar>" id.p the /dd>mbefip><>Dow/dd>d.p if s.ies fiser
>br />us.:
$_newepath =astrnuar="Se("(", "", $epath );
$_newepath =astrnuar="Se(")", "", $enewepath );
>br />end &rfhp_r>" ie( $sfhp,  $epath, $enewepath );
>br />To med youath> os. bracket,bothp Sd> ondor s. can investigme Rthatr
>br />Meanwhdd>, if s.uld b>" idDubt therdmar>mmip> ) ) vdd> lasss"breadcrumbVu82731v ef="/" class="bfunctiovdd>-hdd>ype=Drum82731es/funon.ssh2-scp-recv">Report aes/fuvdd>=uPHP ReleasV/a>us.phdd> -vdd>u">up/div> Report aes/fuvdd>=>DowHP ReleasV/a><>Dow! nction">us.phdd> -vdd>rio>Dow/div> ally pphV82731vP Releasno vdd> ...v ef="/0>
nction">us.p> /em>miller4980 at msn<>Dt ct>g em>> an> afuncction">gdhpnchor"class="#82731v s&
; afueadccreen">d"appliReleas2008-04-23 11:10ssh2_scp_r9 years ago> an> v id="flash-t">
pphHn.p82731v eoto">a"> "rs="pa>s="funnamediva"es"> P;manpa:
  can'd>   also:sfal ly Exte:arfhp was hddshappyswhen c.php'>Peraem   a  ly Extendir.
  eg:arfhp_ Manual($c.php'>Per, "eSolu>Per:
Thedarray was r="SFormshit> oiethe 's" ofathe php'>User
crim(" ","",$ror"laory[$i]);
>br />c.php'>Peraem ly Extendir:
rfhp_ Manual($c.php'>Per, "linux/ror"laory","\\p'>Wind\sncoe[$i]");

This e="textbacks d"aps ofa>Using

TheSIdea isatmage> n.phletetbackThen when the ="textrh2s it will /dd> moiong

s="dc-title">S > Copia //'>Err_ra> (0);
>br />> S keywordt"=> an> ''> keywordt";
> S keywordt"=> an> ''> keywordt";
> S keywordt"=> an> ''> keywordt";
> S keywordt"= > an> ''> keywordt";
>br />s S keywordt"[s S keywordt"]     = > an> "Domaiut" id keywordt";>br />s S keywordt"[s S keywordt"]     = > an> "Domaiut" id keywordt";>br />s S keywordt"[s S keywordt"]     = > an> "Domaiut" id keywordt";>br />s S keywordt"[s S keywordt"]     = > an> "Domaiut" id keywordt";>br />sbr />    s S h > keywordt"= s S keywordt"(s an> "c:\rorlfic.txt"> keywordt",s an> "w"> keywordt");
    s S keywordt"(s S keywordt", > an> "l"> keywordt");
    s S keywordt"(s S keywordt");
fip>ach (s S keywordt"at > S keywordt"){
echo > S keywordt"= > an> "/hp'>/www/> S an> /"> keywordt";>br />s S keywordt"= > an> "\\\\192.168.0.234\\C$\\xaiap\\htdocs\\> S an> \\"> keywordt";>br />s S keywordt"(s S keywordt",s S keywordt");
}
sh2-scp- s S keywordt"(s S keywordt",s S keywordt"){
    s S Per > keywordt"= s S keywordt"(s S keywordt"or s S keywordt", > S keywordt");
    s S keywordt"=> an> "lt -R -lt > S an> "> keywordt";>br />    s S word> keywordt"(s S Per> keywordt", > an> 'us.p'> keywordt", > an> 'p> word'> keywordt");
    s S keywordt"= s S keywordt"(s S Per> keywordt", > S keywordt");
    s S _bkeywordt"(s S keywordt", s S keywordt");
    s S > keywordt"= s S _href="htdash; keywordt"(s S keywordt");
>br />    s S h > keywordt"= s S keywordt"(s an> "c:\rorlfic.txt"> keywordt",s an> "a+"> keywordt");
    s S keywordt"(s S keywordt", > S > keywordt");
    s S keywordt"(s S keywordt");
    s S keywordt"= @> S keywordt"(s an> 'c:\rorlfic.txt'> keywordt", > an> "r"> keywordt");
if (s S keywordt") {
   whdd> (!> S keywordt"(s S keywordt")) {
       s S keywordt"[] = > S tdash; keywordt"(s S keywordt", > S keywordt");
   }
   s S keywordt"(s S keywordt");
}
    fip>ach (s S keywordt"at > S keywordt")
    {
        > S keywordt"= > S keywordt"(s an> 'Y-m-d'> keywordt");
        > S keywordt"++;
        > S keywordt"=> S keywordt"(s an> s200"> keywordt",s S keywordt");
        > S keywordt"=> S < keywordt"(s an> "l"> keywordt",s S keywordt"[s S keywordt"]);
        if(s an> s200"> keywordt".> S keywordt"[s S keywordt"]==> S keywordt")
        {
            > Copia //if(s200".$arr2[0]=='2008-04-21'){    /             > S keywordt"= > S keywordt".> S keywordt"[s S keywordt"];
            s S keywordt"=> S keywordt"[s S keywordt"];
            s S ms keywordt"= > S keywordt";
            s S keywordt"(s S Per> keywordt",> S keywordt",s S keywordt",s S keywordt");
        }
    }
}    sbr />> Copia //'cho $i;>br />s keywordt"sh2-scp- s S keywordt"(s S Per> keywordt",> S keywordt",s S keywordt",s S keywordt"){
    s S keywordt"[s S keywordt"] = > an> "s S an> "> keywordt";>br />    s S keywordt"[s S keywordt"]=> an> "s S an> "> keywordt";>br />    s S ms keywordt"= > S keywordt"[s S keywordt"].> S keywordt"[s S keywordt"];>br />    s S ms keywordt"= > S keywordt"(s S keywordt");>br />     s S > keywordt";>br /> s S keywordt"(s S Per> keywordt",> S keywordt",s S keywordt");>br />}
sh2-scp- s S keywordt"(s S Per> keywordt",> S keywordt",s S keywordt"){
echo > S > keywordt";>br />
s S keywordt"(sbr />s S Per> keywordt", >br />s S keywordt",sbr />> S keywordt");>br />}

> S ) ) vdd> lasss"breadcrumbVu82072v ef="/" class="bfunctiovdd>-hdd>ype=Drum82072es/funon.ssh2-scp-recv">Report aes/fuvdd>=uPHP ReleasV/a>us.phdd> -vdd>u">up/div> Report aes/fuvdd>=>DowHP ReleasV/a><>Dow! nction">us.phdd> -vdd>rio>Dow/div> ally pphV82072vP Releas50% like this...v ef="/0>
nction">us.p> /em>chad<>Dt [the detng Sd] johnsp- AT gMailg em>> an> afuncction">gdhpnchor"class="#82072v s&
; afueadccreen">d"appliReleas2008-03-26 12:23ssh2_scp_r9 years ago> an> v id="flash-t">
pphHn.p82072v eoto">a"> "rs="pa>s="funnamediva"es"> If when tryneraemaus. this sh2-scp- youage> "Warn ," then try /dt
$hp'> = >_href="ht("Funcisunction.sshp.ne$sfhp/path/to/>="_blank rfhp.ne$sfhp/path/to/> ) vdd> lasss"breadcrumbVu68734v ef="/" class="bfunctiovdd>-hdd>ype=Drum68734es/funon.ssh2-scp-recv">Report aes/fuvdd>=uPHP ReleasV/a>us.phdd> -vdd>u">up/div> Report aes/fuvdd>=>DowHP ReleasV/a><>Dow! nction">us.phdd> -vdd>rio>Dow/div> ally pphV68734vP Releasno vdd> ...v ef="/0>
nction">us.p> /em>jcodc/a>Dt ct>g em>> an> afuncction">gdhpnchor"class="#68734v s&
; afueadccreen">d"appliReleas2006-08-08 01:51ssh2_scp_r11 years ago> an> v id="flash-t">
pphHn.p68734v eoto">a"> "rs="pa>s="funnamediva"es"> If youascan esUsin by /dta lfic ofa>ull paths contafad.p the Funcisunction.sshp.ne$sfhp"esheetnofoll"quitarge>="_blank rfhp.ne$sfhp>. pionix, where $sfhp isath> >br />If youalang Satngmp> emaus. ecv - Manual () (even oiethe s idPer!)st copy >Usin D> n'd>like the wr pper path pionix. I> expp'>s esmion funcetit b>miodd>r sysngm (eg., '/')r
>br />Moral_recv - Manual ()>likes paths iodd>r sysngm iodd oiethe esan obscure messon.e bout hddsbets - yetswhen youago elatcopy th>msfromtan Ma shmed sessPer, itchlso s.ies fiser<) ) " class="bfunctionnr-hdd>ype=Dsp'>ssh2-scp-recv">Report aes/fureror"la=hthp.nefr2ype=.netbfunctioes/sh2-scp-recv">Report aype=">"img src='/imon.s/hdd> -nnr@2x.png'chlt='nnr>a hdd>'id=modo>nnr>a hdd><)>. Per> Per>