Extracting code from one page for another

Discussion in 'PHP' started by NewComputer, Feb 20, 2010.

  1. #1
    I own the rights to the following page: http://www.westcoastvirtualtours.com/tours/pop-up.php?tour_id=2656

    What I am trying to accomplish is taking the code for the tour and the drop down and putting it in another page on my site so that it is not an external link to another website.

    The page I will be using the code in is a WordPress site. I just want users to be able to view that virtual tour without clicking a link to an external site. I am willing to pay for someone to help me with this.
     
    NewComputer, Feb 20, 2010 IP
  2. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #2
    danx10, Feb 20, 2010 IP
  3. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #3
    I don't own the server or have access to it, but I own the rights to that info and the tour and pictures.
     
    NewComputer, Feb 20, 2010 IP
  4. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #4
    On your wordpress site create a php file and name it: e.g. worldtour.php, and place the follow code inside it - and save it.

    <?php
    $id = $_GET['tour_id'];
    ?>
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="950" height="550" align="middle">
          <param name="allowScriptAccess" value="sameDomain" />
    
          <param name="movie" value="http://www.westcoastvirtualtours.com/tours/show_tour.swf?tourId=<?php echo $id; ?>" />
          <param name="quality" value="high" />
          <param name="wmode" value="transparent" />
          <param name="bgcolor" value="#999999" />
          <embed src="http://www.westcoastvirtualtours.com/tours/show_tour.swf?tourId=<?php echo $id; ?>" quality="high" wmode="transparent" bgcolor="#999999" width="950" height="550" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />    
    </object>
    PHP:
    Then simply access it like http://www.your-wordpress-site.com/worldtour.php?tour_id=2656

    Payment is not required - but donations are accepted.
     
    Last edited: Feb 20, 2010
    danx10, Feb 20, 2010 IP
  5. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #5
    danx,

    I am trying to have that file incorporate into my, I assume if I have that code in a php file I could then do an include into wordpress?
     
    NewComputer, Feb 20, 2010 IP
  6. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #6
    It get parse errors everywhere...

    Anyways, there has to be a way to do this. I just basically want to embed that page into my site so that the end user isnt whisked away to another website.
     
    NewComputer, Feb 20, 2010 IP
  7. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #7
    I've just tested the code i pasted, and it works fine...

    I'm not familiar with wordpress (never had the need to use it). But i'd assume your getting them errors because your including it in the wrong place, - (it's probably clashing with other wp-code).

    Just copy the code in a new php file, and open it in a js popup or something. (that way you'd avoid the integration trouble, and it would seem to any average visitor as if its hosted by you, not a remote site).

    Unless a WP-wiz can help you. :rolleyes:
     
    danx10, Feb 21, 2010 IP
  8. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #8
    What I was looking for instead was a way to embed the code in my site so that it would remain within my WP template...
     
    NewComputer, Feb 21, 2010 IP