I'm caching it to the database now.

I'm caching it to the database now.
OK. Here is the code to do like ?user=Invent on the php file.
There's probably an easier/better way to do it, but I cba finding out if there is.PHP Code:<?php
$curl = curl_init( );
curl_setopt( $curl, CURLOPT_URL, 'http://www.habboxforum.com/login.php?do=login' );
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, 'login post data' );
curl_setopt( $curl, CURLOPT_COOKIEJAR, 'cookie' );
curl_setopt( $curl, CURLOPT_COOKIEFILE, 'cookie' );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 );
$store = curl_exec( $curl );
curl_setopt( $curl, CURLOPT_URL, 'http://www.habboxforum.com/ajax.php?do=usersearch' );
curl_setopt( $curl, CURLOPT_POSTFIELDS, 'securitytoken=1213389717-511b74fba4f58d0a451b18e3c4cc913038c2bc77&do=usersearch&fragment='. $_GET[ "user"] );
$store = curl_exec( $curl );
$ex = explode( "<user userid=\"", $store );
$ex = explode( "\">", $ex[1] );
curl_setopt( $curl, CURLOPT_URL, 'http://www.habboxforum.com/member.php?u='. $ex[0] );
$content = curl_exec( $curl );
curl_close( $curl );
echo $content;
?>
--
Also, Caleb, if you cache it won't that just mean the data is innacurate?
Update the cache every so often.OK. Here is the code to do like ?user=Invent on the php file.
There's probably an easier/better way to do it, but I cba finding out if there is.PHP Code:<?php
$curl = curl_init( );
curl_setopt( $curl, CURLOPT_URL, 'http://www.habboxforum.com/login.php?do=login' );
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, 'login post data' );
curl_setopt( $curl, CURLOPT_COOKIEJAR, 'cookie' );
curl_setopt( $curl, CURLOPT_COOKIEFILE, 'cookie' );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 );
$store = curl_exec( $curl );
curl_setopt( $curl, CURLOPT_URL, 'http://www.habboxforum.com/ajax.php?do=usersearch' );
curl_setopt( $curl, CURLOPT_POSTFIELDS, 'securitytoken=1213389717-511b74fba4f58d0a451b18e3c4cc913038c2bc77&do=usersearch&fragment='. $_GET[ "user"] );
$store = curl_exec( $curl );
$ex = explode( "<user userid=\"", $store );
$ex = explode( "\">", $ex[1] );
curl_setopt( $curl, CURLOPT_URL, 'http://www.habboxforum.com/member.php?u='. $ex[0] );
$content = curl_exec( $curl );
curl_close( $curl );
echo $content;
?>
--
Also, Caleb, if you cache it won't that just mean the data is innacurate?
visit my internet web site on the internet
http://dong.engineer/
it is just videos by bill wurtz videos you have been warned
Yeah, I know it'll be updated but I thought the point of the API was to offer real-time information.
Also, I'm on MSN![]()
It is updated every five minutes. That saves the strain on mine and Habbox's server.
Its running at least 50% faster due to this. Any ideas?
My signature script uses exactly the same type of code.
It also updates every 5 mins.
visit my internet web site on the internet
http://dong.engineer/
it is just videos by bill wurtz videos you have been warned
Yet.
Sorry Caleb for crashing on your thread.
Want to hide these adverts? Register an account for free!