Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

need help with changing header meta data


Recommended Posts


Ive looked all over the net on help here, Im not a total PHP noob but cant get my head round this.


Ive setup an oscommerce site for a guitar manufacturer. The guitars are normally shown horizontal but when a user clicks for a pop-up my client wants the image to be rotated vertical. IVe used the following imagerotate() function in the pop up window, the only problem is reclassifying the header content/type as image/jpeg. The headers are already sent through the application_top.php include. You can see the error here: http://www.guerillaguitars.net/catalog_gal...mage.php?pID=48


and the code im using in 'popup_image.php' is this:


 $Id: popup_image.php,v 1.18 2003/06/05 23:26:23 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions

 Copyright © 2003 osCommerce

 Released under the GNU General Public License



 $products_query = tep_db_query("select pd.products_name, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'");
 $products = tep_db_fetch_array($products_query);
<!-- <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> -->
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo $products['products_name']; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<script language="javascript"><!--
var i=0;
function resize() {
 if (navigator.appName == 'Netscape') i=40;
 if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);
<body onload="resize();">
[color="#FF0000"]<?php $fileName = DIR_WS_IMAGES . $products['products_image'];

$original = imagecreatefromjpeg($fileName);

$angle = 90.0;
$rotated = imagerotate($original, $angle, 0);
[b]header('Content-type: image/jpeg');[/b]


I would really appreciate some help.

Link to comment
Share on other sites

I am new as well.. I manually entered my Meta Tags, description and the like in the Index.php. It took while but was wondering does the PHP index file will work similar to the index.html I normally work with. The reason I ask because if it works a little bit with PHP I will stop and wait for the spiders to do their thing.


Can they crawl in the index php files?


Is this ok to do?


Thanks, Craig

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...