View Single Post
02-09-2007, 12:12 AM
#30
Sketch is offline Sketch
Sketch's Avatar
Status: Member
Join date: Aug 2005
Location: Melbourne, Australia
Expertise:
Software:
 
Posts: 419
iTrader: 0 / 0%
 

Sketch is on a distinguished road

  Old

This is all so complex. Are you just trying to add + 1 to a counter? And nothing needs to be returned to the user??

PHP Code:
<?php
/*
Clients Page
*/

//Curl script, run on clients page
function runpage($url) {
  
$ch curl_init();
  
curl_setopt ($chCURLOPT_URL$url);
  
curl_setopt ($chCURLOPT_HEADER0);
  
ob_start();
  
curl_exec ($ch);
  
curl_close ($ch);
  
$string ob_get_contents();
  
ob_end_clean();
  return 
$string;   
}

//Call this on the clients page
runpage('http://www.yourdomain.com/yoursite.php?uid='.$uid);
?>
Then on your page have the following
PHP Code:
<?php 
/*
Site Address
http://www.yourdomain.com/yoursite.php
*/

include(mysql_connect.php);

$uid=$_GET['uid'];
$query="FROM `blah` where uid="$uid" INSERT "+1"";

mysql_query($query);

?>
And your done.

The curl script will call your page, and pass it the relevant uid. Then your page can do its work and your password will never be shared.