Log in

View Full Version : Can you please help? Don't know the name of script!



runningscared
07-02-2008, 08:21 PM
Hi,
I have been looking all day on your site for a script and I don’t know the name of it to save my life. I went to this web page called www.roadtechs.com and on the middle of the page where it says welcome to Roadtechs.com beneath that it has a scripts for example says: 130 new jobs posted so far today and they have been viewed 5748 times. Do you have this script on your site? Where can I download it? Can you please help me?:mad:

Nile
07-03-2008, 03:37 AM
This is not a simple javascript code, or even a complex javascript code. Although I couldn't figure out what language they're using, but I know it's server side scripting. If anything I'd use MySQL and PHP.
Search Google for tutorials. :)

magicyte
07-03-2008, 03:42 PM
They are using AJAX and JavaScript, possibly some ASP.

-magicyte

runningscared
07-03-2008, 03:51 PM
Do you know what it's call? How can I find the name of it?

Nile
07-03-2008, 07:45 PM
You can't find the name of it, you can make your own. Like I said it requires a database.

rangana
07-04-2008, 12:24 AM
You can try to play on php session (http://us.php.net/session):


<?php
session_start();
if(isset($_SESSION['views']))
$_SESSION['views']+=1; // store session data
else
$_SESSION['views']=1;
?>

We've got a number of jobs which is viewed <?php echo $_SESSION['views']; ?> times.

thetestingsite
07-04-2008, 12:32 AM
@rangana:

That would only work for the current visitor and every time a new visitor went to the site would get the following (the first time):



We've got a number of jobs which is viewed 1 times.


@magicyte:
Why use any kind of Javascript, when all you need is the server-side language and a database (whether it be a flat file or an actual db server).

@runningscared:

As Nile stated, its not a matter of it being a script, but something that you would need to write the php script to be something like the following:



<?php
include('db_connect.php'); //connect to db
$jobs = mysql_query("SELECT * FROM `jobs_table`");

echo 'We have <b>'.mysql_num_rows($jobs).'</b> Total Jobs';
?>


Hope this helps.

Nile
07-04-2008, 12:34 AM
Ahh, someone understands me. :)

rangana
07-04-2008, 12:42 AM
@ragana:

That would only work for the current visitor and every time a new visitor went to the site would get the following (the first time):


You missed rangana:p

Anyway, yes, you're right.


<?php
session_start();
if(isset($_SESSION['views']))
$_SESSION['views']+=1; // store session data
else
$_SESSION['views']=1;
?>

We've got a number of jobs which is viewed
<?php if ($_SESSION['views']==1) echo $_SESSION['views'].' time'; else echo $_SESSION['views'].' times';?>

thetestingsite
07-04-2008, 12:43 AM
You missed rangana:p

oops. fixed now :)