Hi,
I want to create a redirect function in cakephp while having cloak
redirect (using iframe) or normal redirect,
plus I want to records the statistics of views for every attempt.

Here's the link that I want to redirect where it's cloaked.
http://www.hoturl.im/recommends/url/testing

Below are codes that i write:

So where can I place a query to insert date for every views?
I seriously don't have any idea to do this one.

And i also attach my db structure for references and thanks a lot!

This file is recommends/URL.CTP

<head>
       <meta content="text/html; charset=utf-8" http-equiv="Content-
Type"/>
       <?php e($html->css('empty')); ?>
</head>

<?php
foreach ($recommends as $recommend):
if($recommend['Recommend']['cloacked'] == 1){
$this->layout = 'empty';
?>
<iframe height="100%" frameborder="0" width="100%" marginwidth="0"
marginheight="0" name="body" src="<?php echo $recommend['Recommend']
['url'] ?>"/>
</iframe>
<?php
}else{
header("Location:" .$recommend['Recommend']['url']);
}
endforeach; ?>


I want to insert hits to statistics table in this /recommends/url.ctp
that contains:
-id
-click date
-click counts
-recommend_id

Your comment is appreciated. Thanks!



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to