SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member bigu_c's Avatar
    Join Date
    Nov 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using JavaScript with PHP, what PHP code I need?

    Hello,

    Currently I'm using this code to break iframe:

    HTML Code:
    <script language="JavaScript" type="text/javascript"><!--
    if (top.location != self.location) top.location = "";
    //--></script>
    But that code make my site loaded then redirect to my site.

    I saw some sites using this (I checked by viewing source code):

    HTML Code:
    <script type="text/javascript"> 
    	if (top.location != self.location)
    		top.location.replace(self.location);
    	PHPSESSID = 'leg64j7u0db185qjkps8vum7o0';
    </script>
    Can anyone tell me what PHP they're using in this case?

    Thanks.
    9HWD.com - The HD Wallpapers Network.
    FB covers

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,870
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by bigu_c View Post
    Hello,

    Currently I'm using this code to break iframe:

    HTML Code:
    <script language="JavaScript" type="text/javascript"><!--
    if (top.location != self.location) top.location = "";
    //--></script>
    But that code make my site loaded then redirect to my site.

    I saw some sites using this (I checked by viewing source code):

    HTML Code:
    <script type="text/javascript"> 
    	if (top.location != self.location)
    		top.location.replace(self.location);
    	PHPSESSID = 'leg64j7u0db185qjkps8vum7o0';
    </script>
    Can anyone tell me what PHP they're using in this case?

    Thanks.
    There is no PHP code there only JavaScript - you can't see PHP using view source. If PHP was used to generate the JavaScript there's no way to tell what code is being used.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Member bigu_c's Avatar
    Join Date
    Nov 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know PHP coding, but I saw this line:

    Code:
    PHPSESSID = 'leg64j7u0db185qjkps8vum7o0';
    So they can use PHP Session for this case.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •