Skip to content

Commit 517ab6f

Browse files
authored
Peticion PHP a PHP tipo GET
1 parent f73c9ab commit 517ab6f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

peticiones/php/peticion_php_get.php

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
// hacer una peticion con GET desde un PHP a otro PHP
3+
$url = 'http://'.$_SERVER['SERVER_NAME'].'/contabilidad/Comprobantes/services/obtener_numero_comprobante.php?fecha='.urlencode($fecha).'&tipo=EGRESO';
4+
$curl = curl_init($url);
5+
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
6+
$resultado = curl_exec($curl);
7+
print_r($resultado);
8+
9+
?>

0 commit comments

Comments
 (0)