PHP - An Example Of Really Horrible Website Design From A Major Company
I make my share of programming design blunders, as many of you know from helping me debug a few, so I am hesitant to point fingers, but I just had an experience so horrible, with so many errors on a website owned by Snapfish (which should have some programming resources) that I had to write it up.
Similar Tutorialserr, dunno if i managed to put it in the right thread but if i didn't, please tell me. thank you.
getting back on topic, my father asked me to create a website for a school. i know how to make a website but the problem is, how do i start? should i ask about their objectives or something? color of the webpage etc? in short, i don't know the practicalities and processes used in making a website for a certain client. you could say this would be my first time in doing this (kind of like an on-the-job training) so...any ideas? i would very much appreciate any help given.
Ok. So I have an HTML website with 14 pages and an external CSS. This website is for a movie rental place like BlockBuster, but local and much smaller. I have to update it everyday , http://brucegregory.net/westmorelandvt , and as you can see I will have to move every block down 1 to put a new movie up. What I think would help: 1. Change all my pages to PHP with an admin panel. 2.I need help with the admin panel and a code that makes my movies on the index page move to the right once or move down to the left once every time I add a new movie. Can someone please help? Hi all! I'm a real noob and this is my first time making a website and I haven't hosted it yet. I'm trying to make a website that is fast and secure. My pages look something like this. Code: [Select] <?php include("header.php");include("sidebar.php"); ?> HTML CODES <?php include("footer.php"); ?> 1. Are these php files cached after their first load? When I go to another page, those parts seem to stay still. 2. Is this code secure? And now I'm starting to make product pages which will be around 40 pages. So I'm considering something like this... Code: [Select] <?php include("header.php");include("sidebar.php"); ?> <a href="index.php?page=a">Page A</a> <?php $page = $_GET['page']; if (file_exists('pages/'.$page.'.php')) { include('pages/'.$page.'.php'); } ?> <?php include("footer.php"); ?> 3. Is it better to make every page like this since it will load header, sidebar, footer only once? 4. How should I protect from the user input data, by making an array of allowed files or by prohibiting "." and "/" ? Thank you in advance. Hi, I own a website called www.gpstudios.com, a flash games site. I didn't design it myself, but since having it built a year ago, I understand pretty much all of the inne workings. I'm a game coder so php makes good sense to me. Anyway, i woudl like to change the way a game info (instructions, description) is fetched. Currently, we have 650 games in our database. The way all the info is gotten is through mySQL. So, what I would like to do is take these lengthy instructions/description strings and put them each into a text file, within the folder destination of the game. Currently though, we don't even have a folder destination for each game, which is also a problem. Some games have extra files, which our site-developers didn't account for. There are several games that we've had to manually put into folders because of this problem (two .xml files cannot be named the same in the same folder) Also, if you go onto my website and click on a game, you get sent to playgame.php?id=xxx The main thing I would like to change though (which I have attempted before, but not succeeded with) would be to change the url adress of the games to something more like: www.gpstudios.com/games/game_name/ This is how most game websites do it. When I tried to do this myself, what I did was to simply create an index.php within the folder of one of the aforementioned games, and within this folder I wrote something as simple as: include("../../../playgame.php?id=xxx"); But upon loading this page, I would receive a load of error messages regarding all the other includes and requires in the playgame.php. So by inserting playgame.php?id=xxx in this deep folder, it destroys all other directory links elsewhere. I investigated and found that inserting set_include_path($_SERVER['DOCUMENT_ROOT']) would fix the problem with all these links, but it didnt - while the page loads, it appears to ignore anything that isn't in the root directory, including images. I tried the include method with loads of different files, and they just wouldn't load correctly if they used anything outside the root directory. And my final wish would be to do all of this automatically. To simply write a php file that I would run once and it would generate all the directories for me. It would need to copy every single description and instructions from mySQL and put them within text files within directories which are named after the game. I would then need to automatically create a load of index.phps for each individual game with some simple code similar to: include("../../../playgame.php?id=xxx"); Obviously it would be silly to create a load of unique index files with a hard copy of playgame.php, incase I want to give my site a makeover at some stage. I'm asking alot aren't I? Well I know that if I was given the code from another games website, I would understand it and it would be easy to implement, but unfortunately, despite searching, downloading and installing over 10 Flash Game arcade scripts, none of them used this method... despite their demo page showing that they do. Mainly, all I need to know is how to is how to generate a php/text file, and then I need to know what method I would use for getting the playgame.php running correctly from within a different folder. I'm pretty sure I could do the rest on my own then. Thanks! I get the "Parse error: syntax error, unexpected T_ENDIF in /hsphere/local/home/x/x/links/wp-content/themes/x/single.php on line 58" error. I have highlighted line 58 below. What is wrong? Code: [Select] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title><?php the_title(); ?> | X</title> <meta name="author" content="X" /> <meta name="description" content="X" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" /> <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats please --> <style type="text/css" media="screen"> @import url( <?php bloginfo('stylesheet_url'); ?> ); </style> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="" /> <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" /> <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" /> </head> <div id="wrap"> <ul id="navbar"> <li><a href="http://x" alt="Index">Index</a></li> <li><a href="http://x/articles/" alt="Articles">Articles</a></li> <li><a href="http://x/links/" alt="Links">Links</a></li> <li><a href="http://x/contact/" alt="Contact">Contact</a></li> <li><a href="http://x/colophon/" alt="Colophon">Colophon</a></li> </ul> <img src="http://x/images/links.jpg" class="shadow" alt="Links of Plenty" width="640" height="320" /> <h1>Title</h1> <h4>Tagline</h4> <br> <div id="main"> <div id="content"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <?php if( in_category('ll') ) : ?> <h2 class="ll"><a href="<?php the_linked_list_link('url') ?>" rel="bookmark" title="Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <?php else : ?> <h2 class="title"> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <?php endif; ?> <div class="meta"> <p>Posted on <?php the_time('M') ?> <?php the_time('d') ?> <?php the_time('Y') ?> | <a href="http://www.instapaper.com/hello2?url=<?= rawurlencode(get_permalink()) ?>&title=<?= rawurlencode(get_the_title()) ?>">Add to Instapaper</a> | <a href="http://twitter.com/share?url=<?php the_permalink() ?>">Share on Twitter</a></p> </div> <br> <div class="entry"> <?php the_content(__('Continue Reading &#187;')); ?> <?php wp_link_pages(); ?> <a href="<?php the_permalink() ?>" rel="bookmark">⌘</a> </div> <br><p align="center"><a href="http://x/links/archives/">Browse by subject, year or month</a></p> </div> LINE 58 <?php endif; ?> </div> </div> <p id="footer"><a href="http://feeds.feedburner.com/x">Articles feed</a>. <a href="http://feeds.feedburner.com/x">Links feed</a>. <a href="http://feeds.feedburner.com/x"><a href="http://x/colophon/index.html#license">License</a>. Powered by <a href="http://www.wordpress.org">Wordpress</a> and <a href="http://x/">Coffee</a>. Built with <a href="http://macrabbit.com/espresso">Espresso</a>. <a href="http://x/links/wp-login.php">Admin</a>.</p> </div> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'x']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </body> </html> Hi, can anybody shed some light on the sort of topics i should look into for the following... and any brief code for this! A system to be used, by music shops, and record companies, to allow communication between them. Enable shops to place orders with the appropriate record company when stocks get low. It should also be used to communicate sales from shops to the record company for the purpose of compiling charts. Finally customers should be informed of release dates of artists in their favoured genre of music by text. thanks in advance Hi Guys,
I'm actually a .net programmer, but was asked by a local company to make some improvements / add new features to an internal web app they use to help them manage their project pipeline.
I've been working with them for about a year and learning PHP as I go along. The site was originally built in house by a keen programming hobbyist so between him and me the code is probably a bit non-standard.
I'm looking for an experienced PHPer (with the usual web dev addons: JS/JQuery, CSS, HTML, MYSQL) who would be interested in putting in some hours/days to help move the thing along and happy to pay £150/day or equivalent hours if preferred.
The project is in a Git Repository on Kiln (owned by FogCreek, who do Fogbugz if you've heard of that) but I could move it to GitHub no probs. Current dev site is hosted on Vidahost.
Thanks,
Fergus
i am making a comparison site for products say i have a table ! A ! B ! C ! ---------------------------------------------------------------------- product 1 ! 1.34 ! 2.78 ! 7.90 ! ---------------------------------------------------------------------- product 2 ! 1.56 ! 3.90 ! 8.00 ! ---------------------------------------------------------------------- product 3 ! 1.22 ! 2.99 ! 9.00 ! ---------------------------------------------------------------------- product 4 ! 1.09 ! 3.00 ! 8.50 ! ---------------------------------------------------------------------- say i wanted to buy product 1 and 2 from the cheapest company A/B or C how would i go about doing this ? any guidance would be helpful cheers matt I would like assistance in displaying a company name in my web search results.
Below is my code:
<html> <head></head> <body> <?php if (!isset($_POST['q'])) { ?> <img src="/wvb-logo-slogen.png" border="0" /> <h2>Search</h2> <form method="post" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>"> <input type="text" name="q" size="30" /> </form> <?php } else { ?> <img src="/wvb-logo-slogen.png" border="0" /> <h2>Search Results</h2> <?php try { // create object // $swish = new Swish('/usr/local/apache/htdocs/swish/index.swish-e'); $swish = new Swish('/var/www/html/pdf2/index.swish-e'); // get and run query from command-line $queryStr = htmlentities($_POST['q']); $result = $swish->query($queryStr); ?> Found <?php echo $result->hits; ?> match(es) for '<?php echo $queryStr; ?>'. <?php // iterate over result set // print details for each match while($r = $result->nextResult()) { ?> <p> <?php echo $r->swishreccount; ?> <strong> <a href="<?php echo '/pdf2', ltrim($r->swishdocpath, '.') ; ?>"> <?php echo $r->swishdocpath; ?> </a> </strong> (sco <?php echo $r->swishrank; ?>) <br/> <?php echo $r->swishdocpath; ?><br /> <?php //Split a filename by . $filenames = explode(".", $r->swishdocpath); //get 3 chars from $filenames to $country $country = substr($filenames[1],1,3); echo 'Country name: '.$country."<br />"; //$filenames[2] = explode(".", $r->swishdocpath); $year = substr($filenames[2],0,4); echo 'Year: '.$year; //$filenames = explode(".", $r->swishdocpath); $wvbnumber = substr($filenames[1],1,12); echo 'WVB Number: '.$wvbnumber; ?> </p> <?php } } catch (Exception $e) { die('ERROR: ' . $e->getMessage()); } } ?> </body> </html>As you can see I am able now display the WVB number, country name and year. But my question to anyone is how would I display the company name that it corresponds to? The names of the company are located in a .csv file called active_colist.csv and it is under the /var/www/html directory. This is what my /var/www/html directory looks like: [root@zeus wvbadmin]# cd /var/www/html [root@zeus html]# ls -l total 2140 -rw-r--r--. 1 root root 2110323 May 14 23:39 active_colist.csv -rw-r--r--. 1 root root 6678 Apr 30 13:25 favicon.ico -rw-r--r--. 1 root root 17256 May 5 16:02 h1 -rw-r--r--. 1 root root 113 Apr 29 16:45 hello.php -rw-r--r--. 1 root root 19 Apr 24 23:53 info.php drwxr-xr-x. 2 root root 12288 May 12 15:30 pdf2 lrwxrwxrwx. 1 root root 20 May 5 15:46 pdf3 -> /home/wvbadmin/pdf3/ -rw-r--r--. 1 root root 1227 May 6 16:33 pdfsearch2.php -rw-r--r--. 1 root root 1204 May 6 15:13 pdfsearch3.php -rw-r--r--. 1 root root 1625 May 19 23:27 pdfsearch.php -rw-r--r--. 1 root root 1838 Apr 30 13:10 search.php -rw-r--r--. 1 root root 10077 May 12 11:38 wvb-logo-slogen.png What is in the .csv file is the first 12 characters that correspond to the company name. What PHP code would I use to grab the first 12 characters of search results match them up with what is in the .csv file and display the proper company name? This is what is inside of the .csv file: WVB_NUMBER,PRIMARY_SHORT_COMPANY_NAME,CURR_ISO_CNTRY_OF_INCORP "AIA000030001","THE NATIONAL BANK OF ANGUILLA","AIA" "AIA000030003","ANGUILLA ELECTRICITY COMPANY","AIA" "AIA000030005","KMT-HANSA","AIA" "ALB000040001","BURSE E TIRANES","ALB" "ANT000020000","RORENTO","ANT" "ANT000030001","INTRUM JUSTITIA","SWE" "ANT000030002","ORTHOFIX INTERNATIONAL","ANT" "ANT000030004","HAL TRUST","ANT" "ARE000030001","MASHREQBANK","ARE" "ARE000030002","COMMERCIAL BANK OF DUBAI","ARE" Any assistance would be greatly appreciated. Hi, my name is Pete Mardell, a development manager for Smart Recruit Online.
We have recently teamed up with a gaming company based in Norwich and are looking to find two new developers to work on our award winning platform. We are specifically looking for a php web developer (Junior or Senior) and a front end web developer (Junior / Senior) to work together on projects to improve our platform and services.
You will be working remotely from our head office in Milton Keynes at Norwich in a software warehouse with other talented developers and will have graphic designer resources available to use to create masterpieces.
Please apply at the links below if interested:
PHP Developer: https://www.smartrec...css3jquery-5483
Front End Developer: https://www.smartrec...in-norwich-7057
Kind Regards,
Pete
We're a London-based start-up company called md8 LTD. Right now we are looking for a UK-based senior server-side and client-side developer to build the main application of our ground breaking debating website. Please see our pdf for more information: https://truck.it/p/2rQYrhOIQO Here is my code so far... I can't login using this php, i am new to php and am trying my hardest to figure this out... i have been on this for 4 days and am about to pull all of my hair out... can anyone please help me... //******** start of login.php ******** <?php require_once('connectvars.php'); // Start the session session_start(); // Clear the error message // $error_msg = ""; // If the user isn't logged in, try to log them in if (!isset($_SESSION['user_id'])) { if (isset($_POST['submit'])) { // Connect to the database $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); if (!$dbc) { die('Could not connect: ' . mysqli_error()); } echo 'Connected successfully'; // Grab the user-entered log-in data $user_email = mysqli_real_escape_string($dbc, trim($_POST['email'])); $user_pass = mysqli_real_escape_string($dbc, trim($_POST['password'])); if (!empty($user_email) && !empty($user_password)) { // Look up the username and password in the database $query = "SELECT tb_user_id, tb_user_email FROM tb_users WHERE tb_user_email = '$user_email' AND tb_user_password = SHA('$user_pass')"; $data = mysqli_query($dbc, $query); if (mysqli_num_rows($data) == 1) { // The log-in is OK so set the user ID and username session vars (and cookies), and redirect to the home page $row = mysqli_fetch_array($data); $_SESSION['user_id'] = $row['tb_user_id']; $_SESSION['email'] = $row['tb_user_email']; setcookie('user_id', $row['tb_user_id'], time() + (60 * 60 * 24 * 30)); // expires in 30 days setcookie('email', $row['tb_user_email'], time() + (60 * 60 * 24 * 30)); // expires in 30 days $home_url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/index.php'; header('Location: ' . $home_url); } else { // The username/password are incorrect so set an error message $error_msg = 'Sorry, you must enter a valid username and password to log in1.'; } } else { //*********** This is the error i keep getting // The username/password weren't entered so set an error message $error_msg = 'Sorry, you must enter your username and password to log in2.'; } } } // Insert the page header $page_title = 'Log In'; require_once('header.php'); // If the session var is empty, show any error message and the log-in form; otherwise confirm the log-in if (empty($_SESSION['user_id'])) { echo '<p class="error">' . $error_msg . '</p>'; ?> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <fieldset> <legend>Log In</legend> <label for="email">Email Address:</label> <input type="text" name="email" value="<?php if (!empty($user_email)) echo $user_email; ?>" /><br /> <label for="password">Password:</label> <input type="password" name="password"/> </fieldset> <input type="submit" value="Log In" name="submit" /> </form> <?php } else { // Confirm the successful log-in echo('<p class="login">You are logged in as ' . $_SESSION['email'] . '.</p>'); } ?> <?php // Insert the page footer require_once('footer.php'); ?> Hi, I am having some major issues. My site provides sheet music available for downloading for free. When a user clicks on a sheet to download, a new window opens up. This user views our sponsor's website for 30 seconds. Once the time is up, they can download the free sheet. Now for the issues: I found a download script that I'm putting to the test. When clicking download, it asks where you want to save the file and downloads the file just fine. After some testing, i found that if the user tries to download the sheet again, my entire php/html code displays on the page, as well as a bunch of nonreadable characters (I'm guessing this is from the .pdf file that is supposed to be downloaded). I need to modify my code to stop this from happening. I've tried to exit() the code or die() after the sheet downloads, but I must be doing it wrong because nothing seems to work. I also tried a redirect to send them to a different page once they download the file. That doesn't work either. The next issue is the bottom page is supposed to display our sponsor's website, which it does. However, the frame that contains the website is not 100% in height as it is specified to be. Something in my code is causing it to stop extending all the way. If you would like to see exactly what is happening for yourself, you can go he http://www.sheetmusichaven.com/download.php?sheet=98%20Degrees-I%20Do%20Cherish%20You-SheetMusicHaven.pdf&artist=98%20Degrees&title=I%20Do%20Cherish%20You I'm using the latest version of Firefox, PHP 5. And for the code. I warn you it is ugly >< <?php session_start(); include_once('inc/connect.php'); $sheet = $_GET['sheet']; $artist = stripslashes($_GET['artist']); $title = stripslashes($_GET['title']); $hyphen = " - "; $url = "http://www.youtube.com"; $timetodownload = $_POST['timetodownload']; $todayquery = mysql_query("SELECT `todayviews` FROM `websites` WHERE `active`='yes'"); $todayresult = mysql_fetch_assoc($todayquery); $todayviews = $todayresult['todayviews']; $result = mysql_query("SELECT `url` FROM `websites` WHERE `active`='yes' && `dailyviews`>'$todayviews' && `credits`>0"); $i = 0; while($row = mysql_fetch_array($result)) { while($i<1){ $url = $row['url']; $i++; } } if(strlen($artist)+strlen($title)>80){ $artist = ""; $hyphen = ""; } $ip = $_SERVER['REMOTE_ADDR']; // Time Goes Here // $ipcheck = mysql_query("SELECT ip FROM downloading WHERE ip='$ip'"); // $ipcount = mysql_num_rows($ipcheck); // if ($ipcount!=0) // { // $error1 = "<div id='regerror'>Username already taken!</div>"; // } // $ipquery = "INSERT INTO downloading VALUES ('','$ip','$time')"; // mysql_query($ipquery); $timesdownloaded = 0; if(isset($timetodownload)&&$timesdownloaded<1){ ############################################################### # File Download 1.31 ############################################################### # Visit http://www.zubrag.com/scripts/ for updates ############################################################### # Sample call: # download.php?f=phptutorial.zip # # Sample call (browser will try to save with new file name): # download.php?f=phptutorial.zip&fc=php123tutorial.zip ############################################################### // Allow direct file download (hotlinking)? // Empty - allow hotlinking // If set to nonempty value (Example: example.com) will only allow downloads when referrer contains this text define('ALLOWED_REFERRER', ''); // Download folder, i.e. folder where you keep all files for download. // MUST end with slash (i.e. "/" ) define('BASE_DIR','admin/uploads/'); // log downloads? true/false define('LOG_DOWNLOADS',true); // log file name define('LOG_FILE','downloads.log'); // Allowed extensions list in format 'extension' => 'mime type' // If myme type is set to empty string then script will try to detect mime type // itself, which would only work if you have Mimetype or Fileinfo extensions // installed on server. $allowed_ext = array ( // archives 'zip' => 'application/zip', // documents 'pdf' => 'application/pdf', 'doc' => 'application/msword', // images 'gif' => 'image/gif', 'png' => 'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', ); #################################################################### ### DO NOT CHANGE BELOW #################################################################### // If hotlinking not allowed then make hackers think there are some server problems if (ALLOWED_REFERRER !== '' && (!isset($_SERVER['HTTP_REFERER']) || strpos(strtoupper($_SERVER['HTTP_REFERER']),strtoupper(ALLOWED_REFERRER)) === false) ) { die("Internal server error. Please contact system administrator."); } // Make sure program execution doesn't time out // Set maximum script execution time in seconds (0 means no limit) set_time_limit(0); if (!isset($sheet) || empty($sheet)) { die("Please specify file name for download."); } // Nullbyte hack fix if (strpos($sheet, "\0") !== FALSE) die(''); // Get real file name. // Remove any path info to avoid hacking by adding relative path, etc. $fname = basename($sheet); // Check if the file exists // Check in subfolders too function find_file ($dirname, $fname, &$file_path) { $dir = opendir($dirname); while ($file = readdir($dir)) { if (empty($file_path) && $file != '.' && $file != '..') { if (is_dir($dirname.'/'.$file)) { find_file($dirname.'/'.$file, $fname, $file_path); } else { if (file_exists($dirname.'/'.$fname)) { $file_path = $dirname.'/'.$fname; return; } } } } } // find_file // get full file path (including subfolders) $file_path = ''; find_file(BASE_DIR, $fname, $file_path); if (!is_file($file_path)) { die("File does not exist. Make sure you specified correct file name."); } // file size in bytes $fsize = filesize($file_path); // file extension $fext = strtolower(substr(strrchr($fname,"."),1)); // check if allowed extension if (!array_key_exists($fext, $allowed_ext)) { die("Not allowed file type."); } // get mime type if ($allowed_ext[$fext] == '') { $mtype = ''; // mime type is not set, get from server settings if (function_exists('mime_content_type')) { $mtype = mime_content_type($file_path); } else if (function_exists('finfo_file')) { $finfo = finfo_open(FILEINFO_MIME); // return mime type $mtype = finfo_file($finfo, $file_path); finfo_close($finfo); } if ($mtype == '') { $mtype = "application/force-download"; } } else { // get mime type defined by admin $mtype = $allowed_ext[$fext]; } // Browser will try to save file with this filename, regardless original filename. // You can override it if needed. if (!isset($_GET['fc']) || empty($_GET['fc'])) { $asfname = $fname; } else { // remove some bad chars $asfname = str_replace(array('"',"'",'\\','/'), '', $_GET['fc']); if ($asfname === '') $asfname = 'NoName'; } // set headers header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Type: $mtype"); header("Content-Disposition: attachment; filename=\"$asfname\""); header("Content-Transfer-Encoding: binary"); header("Content-Length: " . $fsize); // download // @readfile($file_path); $file = @fopen($file_path,"rb"); if ($file) { while(!feof($file)) { print(fread($file, 1024*8)); flush(); if (connection_status()!=0) { @fclose($file); die(); } } @fclose($file); } // log downloads if (!LOG_DOWNLOADS) die(); $f = @fopen(LOG_FILE, 'a+'); if ($f) { @fputs($f, date("m.d.Y g:ia")." ".$_SERVER['REMOTE_ADDR']." ".$fname."\n"); @fclose($f); } $timesdownloaded++; if(isset($timetodownload)==($_POST['timetodownload'])){ $timetodownload = ""; echo "<meta http-equiv=\"refresh\" content=\"0;url=index.php?letter=0\">"; } if($timesdownloaded>0){ header("Location: index.php"); } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="description" content="Free Piano Sheet Music - Sheet Music Haven" /> <meta name="keywords" content="free,piano,sheet,music,download,keyboard,haven,lyrics,notes,chords,score,top,modern,popular,jazz,classical,sheetmusichaven" /> <meta name="author" content="Sheet Music Haven - Free Piano Sheet Music. Download all types of piano sheet music for free. Popular sheets are added often" /> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" /> <title>Downloading <?php echo $sheet; ?> - Sheet Music Haven</title> <link rel="stylesheet" type="text/css" href="styles/style.css" /> <style> iframe { padding: 0px; spacing: 0px; } body{ margin: 0px; color: #000000; } #bggreen{ width: 99%; height: 88%; background-color: #6aa504; margin-left: auto; margin-right: auto; text-align: center; } #countdown{ color: #4296ce; font-size: 18px; } .sheetbar a{color: #000000; font-family: "Arial", Helvetica, sans-serif; } #logo{ position: relative; width: 320px; height: 65px; text-align: center; float: left; top: 19px; } #timer{ position: relative; width: 65%; height: 59px; float: left; text-align: center; top: 3px; background-color: #ececec; border-style: solid; border-color: #93DB70; } </style> <script type="text/javascript"> var time = 2; function startCountdown(){ var t = setTimeout("countdown()", 1000); } function countdown(){ var sHeet = "<?php echo $sheet;?>"; var artist = "<?php echo $artist;?>"; var tItle = "<?php echo $title;?>"; --time; if(time == 0){ document.getElementById("countdown").innerHTML = "<form action='download.php?sheet=<?php echo $sheet; ?>' method='POST'><input type='image' src='img/download.png' alt='Download' name='timetodownload' value='Download'><\/form>"; }else{ document.getElementById("countdown").innerHTML = time; var t = setTimeout('countdown()', 1000); } } </script> </head> <body onload="startCountdown();" bgcolor="#343331"> <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> <?php echo "<tr><td style='background:#343331;height:80px;border-bottom:#aaaaaa solid 2px;'>"; echo "<div id='bggreen' class='sheetbar'> <div id='logo'><a href='index.php'><img src='img/logosmall.png'></a><br /> <a href='suggestions.php' style='color: #ececec; font-size: 14px;'>Report Errors</a></div> <div id='timer'> It is our sponsor's that keep this website running. Please view their website while you wait for:<br /> <span style='color: #6aa504;'>".ucwords($artist).$hyphen.ucwords($title)."</span> <br /> <div id='countdown'>2</div> </div> </div>".$error; echo "</td></tr>"; ?> <tr><td> <iframe src="<?php echo $url;?>" width="100%" height="100%" frameborder="0" marginwidth="0" marginheight="0"> <p>Your browser does not support iframes.</p> </iframe> </td></tr> </table> </body> </html> Europe's biggest gaming company are looking to take on up to 10 PHP Developers to join their expanding development team working on new game releases.
They can offer relocation assistance and most interviews take place purely over Skype, or they can fly you over if required.
Its an English speaking company and could be making you an offer in the next week!
Please email me @ stuart.day@quantica.co.uk asap.
I am in the middle of creating an E-Commerce website in PHP (using EasyPHP) and I have run into some problems I have a file called Logout.php which is designed to log registered database users out of a session. However when I go to view the page, I get this ASP.NET IIS7 message: HTTP Error 500.24 - Internal Server Error An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode. This is obviously a php file I have developed, but I do not understand why it is doing this. I have attached the entire project to the message (once unzipped, look for "logout.php") to demonstrate what I am doing, help would be very appreciated please. I have a script that I've given the user some additional options to either get a random proxy from a URL or list that they have supplied. While getting from the URL is no problem. I banging my head against the wall trying to figure out why the program won't get a random proxy from the list. After submitting their query their proxy list gets written to a temporary file. Everything writes fine and the URL where they are written is the exact format that I need. This works: //Where the user submits a URL <?PHP $proxypage = file('theirproxyurl.php'); ?> Although the page exists in the exact same format as the above link when I write their proxies to a file within the server - it does not work. For example: //Where the user submits a list of proxies - they get written to a file <?PHP $proxypage = file('proxieswrittentofile.php'); ?> Even if I paste the LINK (Note: the page exists with the exact same format) directly in the program where the users proxies were written to it still doesn't work. <?PHP //This doesn't work: $proxypage = file('pasted-working-link-in-exact-same-format.php'); ?> <?PHP //I tried the full URL - it doesn't work either $proxypage = file('http://SUBDOMAIN.fullURLtowrittenproxypage.php'); ?> The only thing that's different is that the file where the proxies are being written is on a sub-domains. Aside from that the pages are absolutely identical down to the <br /> tags. Would sub-domains be an issue for the file function? Hello everyone, it's my first post here. I was recommend this community for it's professionalism and "friendlyness". During my stay here, please excuse my english. I know it can be unpleasant for you to read a thread with terrible grammar, I hate it in my native language, I'll do my best. Okay, so I'm having two major issues for my website to operate like I'd like it to, I've done everything I knew about, and I can't think about anything else Google didn't help me much either this time. First one is that I seem to have a cookies/sessions problem. Well, I use Liberty Reserve to allow my members to top up their account. So I send my form to their SCI and when I either cancel or complete a transaction, I return to my website but I'm not logged in anymore! So the auto-add to balance system can't work. Alright, when I saw this I was only using sessions, so I added cookies so I could rely on them too. And there again, same thing. Doubled, tripled checked all the LR settings and everything, I know they are right. But what's really, really, weird to me and what's really doing my head in is that I'm not actually logged out, because if I use another tab/window I'm still logged in. In other words, it's only the window coming back from Liberty Reserve that won't log in. The cookies are still here and so is the session so... Another terrible thing is that it used to work when I was on my previous host (just moved to a dedicated server, which may be causing the problems, it's the first time I administrate a dedi). This is blocking my entire website from working. And my second problem is with the function mail() -there again 'caused' by new server-. I don't get any error message, or anything. The e-mails with cPanel/WHM work great. Though, I have done several tests and it never reaches my Gmail, Hotmail or Yahoo account. It did work with a Yopmail inbox though. So, I was focusing on 'why isn't it sending it' but since I just noticed it worked with Yopmail, I'm sure it is sending it and have no ideas why wouldn't it work with other e-mail service providers. I hope you understood what I meant and that, hopefully, you guys can help me out with those totally handicapping issues. Thank you, Regards. -Ben. I'm trying to make a League of Legends (a video game) community website, both as a personal project and for practice. Now the game has a lot of champions, each of whom have 5 unique abilities. Now, I thought about manually inputting all the details about each champion into a MySQL database, but that would long and tedious, and I don't really have the time for it now. Also, the game patches very oftern (like, once every 2 weeks) which changes many of the stats, etc. of the champion, and it is not possible for me to keep manually updating these every time there is a patch. Fortunately, there is a League of Legends Wiki which has all the data I need in their specific champion pages, which they keep updated per patch. So I was wondering if there was any way to get the data from the divs in the wiki, and have it display on my site. What I want to do in my website is that whenever someone types a champion's name (in a post or whatever), I want it to display a hover-over dialog with some of the champions details. And a lot of other features such as that. In plain English I need a way to : > Tell PHP to go to the wiki's source code on a specific page > Find a specific div container > Get X data from there > Pass X data into a function to display the hover-over I think this way, I would not have to maintain a database as I can leech off the wiki's data. I have not coded anything like this before, so I would like a few pointers as to how to achieve this. Any help will be appreciated! I tried searching on google but couldn't find any relevant information, please redirect me to relevant source or help me with the code. I want to pass a domain name in text field which will be scanned and then the script will display entire site map. Not external links or links on a page. Sorry it is not easy for me to explain. Eg. if i pass abc.com Script will display abc.com/12/adn.php abc.com/asd/asd/ etc Whatever their url format is. All the links on that domain. hello My database is in a same server with seperate domain name , then I want to insert from website1 mysql data on website2 mysql data. can anyone help me? |