Précédent   Forum des professionnels en informatique > PHP > Langage > Débuter
Débuter Forum d'entraide pour débuter en PHP. Avant de poster -> Cours PHP, FAQ PHP, Outils PHP, etc.
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 16/11/2011, 13h09   #1
Membre expérimenté
 
Inscription : septembre 2007
Messages : 1 090
Détails du profil
Informations personnelles :
Âge : 28

Informations forums :
Inscription : septembre 2007
Messages : 1 090
Points : 583
Points : 583
Par défaut Explication code PHP

Bonjour j'essaye de comprendre un code php car je dois faire la meme chose (si c'est possible en asp.net). Est ce que quelqu'un pourrait m'expliquer ce que fais ce code. Merci

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 
 
$server = "http://toto/";
$user = "Archivio1";
$pass = "***";
$file = "file.txt";
 
$url1 = $server."yaya=ID=748925";
 
echo "$url1\n";
 
$ch = curl_init();
 
curl_setopt($ch, CURLOPT_URL, $url1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, "$user:$pass");
$info = curl_getinfo($ch);
 
$page1 = curl_exec($ch);
 
$url2 = substr($page1, strpos($page1, 'BvLTech1_______'));
$url2 = $server.substr($url2, 0, strpos($url2, '"'));
 
echo "$url2\n";
 
curl_setopt($ch, CURLOPT_URL, $url2);
$page2 = curl_exec($ch);
 
$url3 = substr($page2, strpos($page2, 'RNVL/BvLArchivio'));
$url3 = $server.substr($url3, 0, strpos($url3, '"'));
 
echo "$url3\n";
 
curl_setopt($ch, CURLOPT_URL, $url3);
 
$fh = fopen($file, 'w');
 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
curl_setopt($ch, CURLOPT_FILE, $fh);
curl_exec($ch);
 
fclose ($fh);
 
curl_close($ch);
tortuegenie est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 07h55.


 
 
 
 
Partenaires

Hébergement Web