GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   php/apache question (https://gfy.com/showthread.php?t=777298)

alex79 10-17-2007 10:52 AM

php/apache question
 
i execute the below command from apache (php script):
Code:

<?
$command="wget http://domain.com/file.php > /dev/null";
passthru("$command");       
?>

the problem is that after execution on my server is copied 0kb file with the name file.php... i don't want nothing to be copied on my server (this is why i puted there /dev/null)..
what i'm doing wrong? how can i fix this, so no file to be copyed on my server?

calmlikeabomb 10-17-2007 01:14 PM

Simple solution is to execute two commands.
PHP Code:

<?php

$command
="wget http://domain.com/file.php; rm -f file.php";

shell_exec($command);    

?>


xroach 10-17-2007 01:16 PM

why not just

file_get_contents("http://domain.com/file.php");

?

mike-al 10-17-2007 01:25 PM

man wget


All times are GMT -7. The time now is 09:06 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123