| | |
Call Home Function (Like paid scripts have)
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Do you mean
$_SERVER['HTTP_REFERER'] ? you could get the domain which the user came to this page from from this variable, however this is not perfect, it can be spoofed and hidden quite easily. AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
•
•
Join Date: Jul 2008
Posts: 147
Reputation:
Solved Threads: 25
I wasn't referencing base64 encoding as that can be quickly decoded by anyone familiar enough to pick out what base64 looks like and I don't believe you can base64 encode a chunk of the source code inside a php file without doing something obscure to it like passing it through an eval statement or such.
I was referencing something like Zend Guard or ionCube PHP encoder.
As far as your function:
answer.php
Now if you were to use curl, you could actually have curl post an almost infinite amount of information to your server and then verify or log it etc.
This is very basic and untested but you should be able to grasp the general concept. If you wanted to get more advanced you could post xml and return xml or JSON etc.
I was referencing something like Zend Guard or ionCube PHP encoder.
As far as your function:
php Syntax (Toggle Plain Text)
<?php function call() { if( ini_get( 'allow_url_fopen' ) == '1' ) { $response = file_get_contents( 'http://yourdomain.com/answer.php' ); if( $response != 'TRUE' ) { //Cause some catastrophic death? exit(); } } else { //Maybe implement a curl fail over if the curl extension is installed. //But allow_url_fopen *SHOULD* be enabled by default; } }
answer.php
php Syntax (Toggle Plain Text)
<?php //Something to log $_SERVER variables as necessary. //maybe referrer or maybe we are validating a key passed as a GET variable? //if we're happy return true echo 'TRUE';
Now if you were to use curl, you could actually have curl post an almost infinite amount of information to your server and then verify or log it etc.
This is very basic and untested but you should be able to grasp the general concept. If you wanted to get more advanced you could post xml and return xml or JSON etc.
![]() |
Other Threads in the PHP Forum
- Previous Thread: Server Address vs DNS
- Next Thread: Which is better for storing user data?
| Thread Tools | Search this Thread |
# .htaccess 5.2.10 access alexa apache api array beginner broken cakephp checkbox class clean clients cms code convert cron curl database date directory display dissertation dropdown dynamic echo$_get[x]changingitintovariable... email encode error fairness file folder form forms function functions google hack href htaccess html htmlspecialchars image include indentedsubcategory ip javascript joomla legislation limit link local login mail memberships menu methods multiple multipletables mysql mysqlquery network newsletters oop open passwords paypal pdf persist php provider query radio random redirect remote script search secure server sessions simple sockets source space spam sql system table tutorial upload url user variable video voteup web youtube





