Mirroring other site

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

felipao

New Member
Impact
0
Hi,

I'm working on getting a specific content from another site. Into ours. It's a partnership between both of our community sites, but I'll have to figure a way to get the content.

We want to utilize the Face Generator found here in our site, but just that main frame, not the navigation bar and stuff.

I heard about asp tear, and some other programs that help you transfer content dynamically, but I don't think that's necessary here.

I just grabbed the source code, and modified everything so that it will all get the source from the original website.


Now to my question problem. After I submit the form, I get it working (it reads my form submission and I get a new face generated), but I get the reply not on my server but on the other site, with all of his content.

How would I go about getting the form result posted within my layout, although the processing is done through the other site? What would the specific doe be?

If you want to see my source code, let me know.

Thanks for input and help!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
This shouldn't be too hard. I notice the page generates the picture dynamicly from variables that are sent in a regular URL string.


For instance, this url:

http://www.mzitalia.com/modules/FaceGenerator/face5.php?playerid=7869516&playername=MZItaliaUser&stilecollo=2&
colorecollo=e7d104&stilespalla=4&colorespalla=d90c06&stilefantasia=9999&
colorefantasia=9b249b&coloremaglia=d7cfe7&sponsortecnico=14&coloresponsortecnico=8

Brings up the picture of the player I just created.
face5.php


You can edit the variables right there in the URL to make changes without using the form.

To put this feature on my site, I would copy the form from the original site and have it post the data back to a "results" page on my site. The results page would include a <img src=" tag with a URL constructed from the form data submitted by the user.

results.php:
Code:
<?
echo "Here's your picture!<br>";
echo "<img src=\"http://www.mzitalia.com/modules/FaceGenerator/face5.php?playerid=$playerid&playername=$playername&stilecollo=$stilecollo&colorecollo=$colorecollo&stilespalla=$stilespalla&colorespalla=$colorespalla&stilefantasia=stilefantasia&colorefantasia=$colorefantasia&coloremaglia=$coloremaglia&sponsortecnico=$sponsortecnico&coloresponsortecnico=$coloresponsortecnico";
?>
 
0
•••
Hmm, that's what I thought. Thanks for spelling it out for me (and others).

Sorry to be so simple and ignorant, but how would i get the script to give me back a result from the submitted form? (i.e. the new image based on the entries of the form)?

I do understand that the image generated has all those variables in it (as you mentioned and showed on the link), but how do i make the script read the form, give me the result code, and allow me to put it somehwere (ideally on the same place where the player image already is)? Because that's what the original site does, but not when i copied the code and adjusted it in my site. It sends me back to the original site with all the layout and stuff.
 
0
•••
I setup a sample of what I was talking about on my site,
http://www.mpke.com/delete/pic.php

Is that what you're trying to do? If not, maybe I misunderstand your goal. If you want it to save the picture to your server (write a file) then that will take other type of programming, maybe using PHP's fopen function and writing the data to a file.
 
0
•••
The source code:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<base href="http://www.mzitalia.com/">
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY>
  
  My site... text text text.


<table width="100%" border="0" cellspacing="0" cellpadding="2">
  <tr>
    <td valign="top"> <form action="http://www.mpke.com/delete/pic.php" method="get" name="form" id="form">
	<input type="Hidden" Name="name" Value="FaceGenerator">
      <p>Codice Giocatore 
          <input type="Text" Name="playerid" size="10"value="8382238">
          <br>
Nome Giocatore<input type="Text" Name="playername" size="15" value="MZItalia User">
<br><br>
Colore Maglie:      
      <table width="100" border="0" cellspacing="0" cellpadding="2">
        <tr>
          <td><input name="coloremaglia" type="radio" value="000000">            <img src="modules/FaceGenerator/preview/black.jpg" width="20" height="12"></td>
          <td><input name="coloremaglia" type="radio" value="ffffff">            <img src="modules/FaceGenerator/preview/white.jpg" width="20" height="12"></td>
          <td><input name="coloremaglia" type="radio" value="ff0000">            <img src="modules/FaceGenerator/preview/red.jpg" width="20" height="12"></td>
          <td><input name="coloremaglia" type="radio" value="00ff00">            <img src="modules/FaceGenerator/preview/green.jpg" width="20" height="12"></td>
          <td><input name="coloremaglia" type="radio" value="0000ff">            <img src="modules/FaceGenerator/preview/blue.jpg" width="20" height="12"></td>
          <td><input name="coloremaglia" type="radio" value="ffff00">            <img src="modules/FaceGenerator/preview/yellow.jpg" width="20" height="12"></td>
          <td><input name="coloremaglia" type="radio" value="ff00ff">            <img src="modules/FaceGenerator/preview/purple.jpg" width="20" height="12"></td>
          <td><input name="coloremaglia" type="radio" value="00ffff">            <img src="modules/FaceGenerator/preview/cyan.jpg" width="20" height="12"></td>
		  <td><input name="coloremaglia" type="radio" value="">            <img src="modules/FaceGenerator/preview/random.jpg" width="20" height="12"></td>
        </tr>
        <tr>
          <td colspan="8">
            <input name="coloremaglia" type="radio" value="value" checked>
            <input type="Text" Name="coloremaglia2" size="8" maxlength="6" value="f675c5"></td>
          </tr>
      </table>
      <p>          Stile Collo:
      <table width="100" border="0" cellspacing="0" cellpadding="2">
        <tr>
          <td><input name="stilecollo" type="radio" value="1" >            <img src="modules/FaceGenerator/preview/collo1.jpg" width="35" height="54"></td>
          <td><input name="stilecollo" type="radio" value="2" >            <img src="modules/FaceGenerator/preview/collo2.jpg" width="35" height="54"></td>
          <td><input name="stilecollo" type="radio" value="3" >            <img src="modules/FaceGenerator/preview/collo3.jpg" width="35" height="54"></td>
          <td><input name="stilecollo" type="radio" value="4">            <img src="modules/FaceGenerator/preview/collo4.jpg" width="35" height="54"></td>
          <td><input name="stilecollo" type="radio" value="5">            <img src="modules/FaceGenerator/preview/collo5.jpg" width="35" height="54"></td>
          <td><input name="stilecollo" type="radio" value="6">            <img src="modules/FaceGenerator/preview/collo6.jpg" width="35" height="54"></td>
        </tr>
        <tr>
          <td><input name="stilecollo" type="radio" value="7">            <img src="modules/FaceGenerator/preview/collo7.jpg" width="35" height="54"></td>
          <td><input name="stilecollo" type="radio" value="8">            <img src="modules/FaceGenerator/preview/collo8.jpg" width="35" height="54"></td>
          <td><input name="stilecollo" type="radio" value="9"checked>            <img src="modules/FaceGenerator/preview/collo9.jpg" width="35" height="54"></td>
          <td><input name="stilecollo" type="radio" value="10">            <img src="modules/FaceGenerator/preview/collo10.jpg" width="35" height="54"></td>
          <td><input name="stilecollo" type="radio" value="11">            <img src="modules/FaceGenerator/preview/collo11.jpg" width="35" height="54"></td>
         
		  <td><input name="stilecollo" type="radio" value="">
		  <img src="modules/FaceGenerator/preview/collorandom.jpg" width="35" height="54"></td>
        </tr>
      </table>
      <table width="100" border="0" cellspacing="0" cellpadding="2">
        <tr>
          <td><input name="colorecollo" type="radio" value="000000">
              <img src="modules/FaceGenerator/preview/black.jpg" width="20" height="12"></td>
          <td><input name="colorecollo" type="radio" value="ffffff">
              <img src="modules/FaceGenerator/preview/white.jpg" width="20" height="12"></td>
          <td><input name="colorecollo" type="radio" value="ff0000">
              <img src="modules/FaceGenerator/preview/red.jpg" width="20" height="12"></td>
          <td><input name="colorecollo" type="radio" value="00ff00">
              <img src="modules/FaceGenerator/preview/green.jpg" width="20" height="12"></td>
          <td><input name="colorecollo" type="radio" value="0000ff">
              <img src="modules/FaceGenerator/preview/blue.jpg" width="20" height="12"></td>
          <td><input name="colorecollo" type="radio" value="ffff00">
              <img src="modules/FaceGenerator/preview/yellow.jpg" width="20" height="12"></td>
          <td><input name="colorecollo" type="radio" value="ff00ff">
              <img src="modules/FaceGenerator/preview/purple.jpg" width="20" height="12"></td>
          <td><input name="colorecollo" type="radio" value="00ffff">
              <img src="modules/FaceGenerator/preview/cyan.jpg" width="20" height="12"></td>
  		  <td><input name="colorecollo" type="radio" value="">            <img src="modules/FaceGenerator/preview/random.jpg" width="20" height="12"></td>
		  <td></td>

        </tr>
        <tr>
          <td colspan="8">
            <input name="colorecollo" type="radio" value="value" checked>
            <input type="Text" Name="colorecollo2" size="10" maxlength="6" value="8d8cdc"></td>
          </tr>
        </table>
      Stile Spalle:
      <table width="100" border="0" cellspacing="0" cellpadding="2">
        <tr>
          <td><input name="stilespalla" type="radio" value="9999" >            
          <img src="modules/FaceGenerator/preview/f-spalla0.jpg" width="35" height="54"></td>
          <td><input name="stilespalla" type="radio" value="1" checked>            <img src="modules/FaceGenerator/preview/f-spalla1.jpg" width="35" height="54"></td>
          <td><input name="stilespalla" type="radio" value="2" >            <img src="modules/FaceGenerator/preview/f-spalla2.jpg" width="35" height="54"></td>
          <td><input name="stilespalla" type="radio" value="3" >            <img src="modules/FaceGenerator/preview/f-spalla3.jpg" width="35" height="54"></td>
          <td><input name="stilespalla" type="radio" value="4" >            <img src="modules/FaceGenerator/preview/f-spalla4.jpg" width="35" height="54"></td>
          <td><input name="stilespalla" type="radio" value="5" >            <img src="modules/FaceGenerator/preview/f-spalla5.jpg" width="35" height="54"></td>

		  <td><input name="stilespalla" type="radio" value="">
		  <img src="modules/FaceGenerator/preview/f-spallarandom.jpg" width="35" height="54"></td>
        </tr>
      </table>
         <table width="100" border="0" cellspacing="0" cellpadding="2">
           <tr>
             <td><input name="colorespalla" type="radio" value="000000">
                 <img src="modules/FaceGenerator/preview/black.jpg" width="20" height="12"></td>
             <td><input name="colorespalla" type="radio" value="ffffff">
                 <img src="modules/FaceGenerator/preview/white.jpg" width="20" height="12"></td>
             <td><input name="colorespalla" type="radio" value="ff0000">
                 <img src="modules/FaceGenerator/preview/red.jpg" width="20" height="12"></td>
             <td><input name="colorespalla" type="radio" value="00ff00">
                 <img src="modules/FaceGenerator/preview/green.jpg" width="20" height="12"></td>
             <td><input name="colorespalla" type="radio" value="0000ff">
                 <img src="modules/FaceGenerator/preview/blue.jpg" width="20" height="12"></td>
             <td><input name="colorespalla" type="radio" value="ffff00">
                 <img src="modules/FaceGenerator/preview/yellow.jpg" width="20" height="12"></td>
             <td><input name="colorespalla" type="radio" value="ff00ff">
                 <img src="modules/FaceGenerator/preview/purple.jpg" width="20" height="12"></td>
             <td><input name="colorespalla" type="radio" value="00ffff">
                 <img src="modules/FaceGenerator/preview/cyan.jpg" width="20" height="12"></td>
				 <td><input name="colorespalla" type="radio" value="">            <img src="modules/FaceGenerator/preview/random.jpg" width="20" height="12"></td>
           </tr>
           <tr>
             <td colspan="8">
               <input name="colorespalla" type="radio" value="value" checked>
               <input type="Text" Name="colorespalla2" size="10" maxlength="6" value="3822cf"></td>
             </tr>
        </table>
         Stile Maglia:
         <table width="100" border="0" cellspacing="0" cellpadding="2">
           <tr>
             <td><input name="stilefantasia" type="radio" value="9999" >               <img src="modules/FaceGenerator/preview/fantasia0.jpg" width="35" height="54"></td>
             <td><input name="stilefantasia" type="radio" value="1" >               <img src="modules/FaceGenerator/preview/fantasia1.jpg" width="35" height="54"></td>
             <td><input name="stilefantasia" type="radio" value="2" >               <img src="modules/FaceGenerator/preview/fantasia2.jpg" width="35" height="54"></td>
             <td><input name="stilefantasia" type="radio" value="3" >               <img src="modules/FaceGenerator/preview/fantasia3.jpg" width="35" height="54"></td>
             <td><input name="stilefantasia" type="radio" value="4" >               <img src="modules/FaceGenerator/preview/fantasia4.jpg" width="35" height="54"></td>
			 <td><input name="stilefantasia" type="radio" value="5" >               <img src="modules/FaceGenerator/preview/fantasia5.jpg" width="35" height="54"></td>
           </tr>
           <tr>
             
             <td><input name="stilefantasia" type="radio" value="6" checked>               <img src="modules/FaceGenerator/preview/fantasia6.jpg" width="35" height="54"></td>
             <td><input name="stilefantasia" type="radio" value="7" >               <img src="modules/FaceGenerator/preview/fantasia7.jpg" width="35" height="54"></td>
             <td><input name="stilefantasia" type="radio" value="8" >               <img src="modules/FaceGenerator/preview/fantasia8.jpg" width="35" height="54"></td>
             <td><input name="stilefantasia" type="radio" value="9" >               <img src="modules/FaceGenerator/preview/fantasia9.jpg" width="35" height="54"></td>
			 <td><input name="stilefantasia" type="radio" value="10" >               <img src="modules/FaceGenerator/preview/fantasia10.jpg" width="35" height="54"></td>
			 <td><input name="stilefantasia" type="radio" value="" >               <img src="modules/FaceGenerator/preview/fantasiarandom.jpg" width="35" height="54"></td>
           </tr>
         </table>
         <table width="100" border="0" cellspacing="0" cellpadding="2">
           <tr>
             <td><input name="colorefantasia" type="radio" value="000000">
                 <img src="modules/FaceGenerator/preview/black.jpg" width="20" height="12"></td>
             <td><input name="colorefantasia" type="radio" value="ffffff">
                 <img src="modules/FaceGenerator/preview/white.jpg" width="20" height="12"></td>
             <td><input name="colorefantasia" type="radio" value="ff0000">
                 <img src="modules/FaceGenerator/preview/red.jpg" width="20" height="12"></td>
             <td><input name="colorefantasia" type="radio" value="00ff00">
                 <img src="modules/FaceGenerator/preview/green.jpg" width="20" height="12"></td>
             <td><input name="colorefantasia" type="radio" value="0000ff">
                 <img src="modules/FaceGenerator/preview/blue.jpg" width="20" height="12"></td>
             <td><input name="colorefantasia" type="radio" value="ffff00">
                 <img src="modules/FaceGenerator/preview/yellow.jpg" width="20" height="12"></td>
             <td><input name="colorefantasia" type="radio" value="ff00ff">
                 <img src="modules/FaceGenerator/preview/purple.jpg" width="20" height="12"></td>
             <td><input name="colorefantasia" type="radio" value="00ffff">
                 <img src="modules/FaceGenerator/preview/cyan.jpg" width="20" height="12"></td>
			 <td><input name="colorefantasia" type="radio" value="">
				 <img src="modules/FaceGenerator/preview/random.jpg" width="20" height="12"></td>
           </tr>
           <tr>
             <td colspan="8">
               <input name="colorefantasia" type="radio" value="value" checked>
               <input type="Text" Name="colorefantasia2" size="10" maxlength="6" value="ed10a4"></td>
             </tr>
        </table>
		<br>Sponsor: <br><select name="sponsortecnico" id="sponsortecnico">
           <option value="9999" >Nessuna</option>
           <option value="">Casuale</option>
           <option value="1" >Adidas</option>
           <option value="2" selected>Asics</option>
           <option value="3" >Champion</option>
           <option value="4" >Diadora</option>
           <option value="5" >Erreà</option>
           <option value="6" >Galex</option>
           <option value="7" >Kappa</option>
           <option value="8" >Kelme</option>
           <option value="9" >Legea</option>
           <option value="10" >Lotto</option>
           <option value="11" >Macron</option>
           <option value="12" >Nike</option>
           <option value="13" >Puma</option>
           <option value="14" >Reebok</option>
           <option value="15" >Umbro</option>

           </select>
		   <table width="100" border="0" cellspacing="0" cellpadding="2">
        <tr>
          <td><input name="coloresponsortecnico" type="radio" value="1" >            
		  <img src="modules/FaceGenerator/preview/black.jpg" width="20" height="12"></td>
          <td><input name="coloresponsortecnico" type="radio" value="2" >            
		  <img src="modules/FaceGenerator/preview/white.jpg" width="20" height="12"></td>
          <td><input name="coloresponsortecnico" type="radio" value="3" >            
		  <img src="modules/FaceGenerator/preview/red.jpg" width="20" height="12"></td>
          <td><input name="coloresponsortecnico" type="radio" value="4" checked>            
		  <img src="modules/FaceGenerator/preview/green.jpg" width="20" height="12"></td>
          <td><input name="coloresponsortecnico" type="radio" value="5" >            
		  <img src="modules/FaceGenerator/preview/blue.jpg" width="20" height="12"></td>
          <td><input name="coloresponsortecnico" type="radio" value="6" >            
		  <img src="modules/FaceGenerator/preview/yellow.jpg" width="20" height="12"></td>
          <td><input name="coloresponsortecnico" type="radio" value="7" >            
		  <img src="modules/FaceGenerator/preview/purple.jpg" width="20" height="12"></td>
          <td><input name="coloresponsortecnico" type="radio" value="8" >            
		  <img src="modules/FaceGenerator/preview/cyan.jpg" width="20" height="12"></td>
		 <td><input name="coloresponsortecnico" type="radio" value="">
		 <img src="modules/FaceGenerator/preview/random.jpg" width="20" height="12"></td>

        </tr>
      </table>
           <br>

    <input type="Submit" Name="submit" Value="Invia">
            </p>
    </form><br></td>
    <td width="200" valign="top">
	<? if (!isset($playername)) { ?>
	<img src="modules/FaceGenerator/face5.php?playerid=8382238&playername=MZItalia User&stilecollo=9&colorecollo=8d8cdc&stilespalla=1&colorespalla=3822cf&stilefantasia=6&colorefantasia=ed10a4&coloremaglia=f675c5&sponsortecnico=2&coloresponsortecnico=4" title="face">
	<? } else { 
	echo "<img src=\"http://www.mzitalia.com/modules/FaceGenerator/face5.php?playerid=$playerid&playername=$playername&stilecollo=$stilecollo&colorecollo=$colorecollo&stilespalla=$stilespalla&colorespalla=$colorespalla&stilefantasia=stilefantasia&colorefantasia=$colorefantasia&coloremaglia=$coloremaglia&sponsortecnico=$sponsortecnico&coloresponsortecnico=$coloresponsortecnico\">";
	} ?>
	</td>
  </tr>
  </table>

  My site... text text text.

  </BODY>
</HTML>
 
0
•••
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover
URLs.com
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back