News: PHP Video Tutorials Coming Soon! 18.12.08 Around 9PM GMT
Pages: [1] 2 3 ... 10
 1 
 on: January 06, 2009, 05:26:05 PM 
Started by absolut - Last post by absolut
thank you very much

 2 
 on: January 06, 2009, 10:57:47 AM 
Started by absolut - Last post by de.monkeyz
Just found out that doing unlink(__FILE__) will delete the file you're in, and will cause no errors.

 3 
 on: January 05, 2009, 12:15:00 AM 
Started by absolut - Last post by de.monkeyz
@ just supresses any errors so they're unaware that you're mailing yourself if it goes wrong.

You can't delete the file you're using (i.e the one you're mailing from) but you can delete every other file if you know their filename in relation to that using unlink.

unlink(dirname(__FILE__) . '/otherfile.php');

As for getting past not being able to delete the current file, just make it create a file like I said to do to stop it constantly mailing and do
if(file_exists('path/to/file')) die();

 4 
 on: January 04, 2009, 07:15:29 PM 
Started by absolut - Last post by absolut
Only thing I can think of atm is making it either connecting to a remote db, or sending an email to you with the request url to find the script. So for example:

$server $_SERVER['SERVER_NAME'];
if(
$server != 'localhost'# You don't want to send anything if it's their localhost
{
    
$url 'http://' $server$_SERVER['REQUEST_URI']; #Eg http://theirsite.com/index.php
    
@mail('myemailaddress@host.com''Your script was used!''Your script <script name> was used at the following address "' $url '"''From:scriptchecker@host.com\n\r');
}

That script isn't perfect, as they may not be allowed to mail if they use a free webhost. Or if mail is not configured. Also it will only send if it run, not when uploaded. Also it will send an email everytime. So you might want to make it generate a file on their server. And it checks if that file was made before it sends an email, or adds an entry to your db.
thanks, what the difference between @mail() and mail()? after knowing the url, I want to delete the uploaded files that I give, is it possible?

 5 
 on: January 04, 2009, 09:24:47 AM 
Started by absolut - Last post by de.monkeyz
Only thing I can think of atm is making it either connecting to a remote db, or sending an email to you with the request url to find the script. So for example:

$server $_SERVER['SERVER_NAME'];
if(
$server != 'localhost'# You don't want to send anything if it's their localhost
{
    
$url 'http://' $server$_SERVER['REQUEST_URI']; #Eg http://theirsite.com/index.php
    
@mail('myemailaddress@host.com''Your script was used!''Your script <script name> was used at the following address "' $url '"''From:scriptchecker@host.com\n\r');
}

That script isn't perfect, as they may not be allowed to mail if they use a free webhost. Or if mail is not configured. Also it will only send if it run, not when uploaded. Also it will send an email everytime. So you might want to make it generate a file on their server. And it checks if that file was made before it sends an email, or adds an entry to your db.

 6 
 on: January 04, 2009, 02:54:17 AM 
Started by absolut - Last post by absolut
I give a php script to my friend then I want to know the url if he upload it. is it possible? what will I put in the script that I will give?
could you please help me?

 7 
 on: January 03, 2009, 03:28:02 AM 
Started by ansh - Last post by ansh
THANKS MILLION TRILLION

 8 
 on: January 01, 2009, 05:52:08 AM 
Started by ansh - Last post by de.monkeyz
TBH The select box can be populated with php like so

<?php

//$result is a result set made by a previous query. With two fields, id and category_name

$select "<select id='my_ajax_select'>";

while(
$row mysql_fetch_assoc($result))
{
   
$select .= "<option value=\"{$row['id']}\">{$row['category_name']}</option>";
}
$select .= "</select>";

echo 
$select;
?>

Then the ajax you just need to use an onchange.

Code:
window.onload = function()
{
    var select = document.getElementById('my_ajax_select');
    select.onchange = function()
    {
       var id = select.value;
       //make request object, make params out of the id variable to request correct category info etc.
       request.onreadystatechange = function()
       {
               if(request.readyState == 4)
               {
                     //populate w/e with returned data.
               }
       }
    }
}

 9 
 on: January 01, 2009, 12:44:24 AM 
Started by ansh - Last post by ansh
 i dont know how to do it in ajax.

so need any tutorial as i searhed but didnt got it..


 10 
 on: December 31, 2008, 11:15:53 AM 
Started by ansh - Last post by IchBin
Have you tried to do it, or are you expecting someone to do it for you? Post your code if have something that is not working so we people can help if they able to.

Pages: [1] 2 3 ... 10