Jump to content

Search the Community

Showing results for tags 'website'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 20 results

  1. Simply put, I every night I have to pull a HUGE xml file (5mb 4500+ records). with this data ( small sales site), I create a webpage using the data provided. Pretty simple. However, I first used XML and converted it to arrays. This was problematic for functions and manipulating etc.. or picking out discounts and specific items etc. So Now I use the xml file, and convert it to sql - this as you know is very time consuming (longest time is about 10-12min using INSERT UPDATE ON DUPLICATE). So I have to use a cronjob to perform this. I would rather have the page dynamicly loaded when user is visiting. Now SQL works nicely as all the manipulation features are fast. However, I still think it feels sluggish. And it feels sloppy. I do not want to learn XSLT (LAZY?), I am comfortable with PHP. I can already parse the xml file fast. Just need a way to manipulate the data. mainly sorting, and picking out specific items in the xml - then sort those results. One method I did use was to cache what I manipulated and then overnight I pull the new feed, I delete the cache. Hopefully this is not answered already, gonna feel like an idiot. What would you pro's recommend? Leave it at the SQL? Or keep pursuing the XML?
  2. Regarding the messages that pop up when one clicks on the Mark Forum Read link. Why do we have to endure (every time!) the message that we have to reply Ok to and then a soon-to-follow message confirming that it is done? We click. We expect it to happen. So why the enforced conversation? Perhaps if something DIDN'T happen the conversation might be helpful.
  3. Hello everybody! I have been asked by a customer to develop a GTP website (Get To Pay, those websites where people earn money from clicking on ads). I managed to write the backend, signup and login but I am unsure how the ads part, with built-in user-tracking works and fallback link works. I would really appreciate any kind of help. Thank you very much! P.S. For the user tracking I was thinking of sessions with matching ip and user agents together with an anti-proxy online service (e.g. MaxMind, Proxystop, ...)
  4. I am trying to create a CMS management website, but I can't seem to get the update function to work. Everything else works fine but not the update function. Can anyone please tell me why or what the problem is? I have spent too long trying to fix it and have failed. It is correctly linked to the database when I hit the edit button all i get is UPDATE_CONTENT_FORM($_GET['ID'])?>where the text boxes should be is . Please help, I am really stuck. (sorry about spelling ) code in CMS_Class.php Class modernCMS{ var $host='localhost'; var $username='lmcmanus13'; var $password='k0gl0zfh3g1ccm4v'; var $db='lmcmanus13'; function connect(){ $con = mysql_connect($this->host, $this->username, $this->password); mysql_select_db($this->db,$con); } function get_content($id =''){ if ($id != ""): $id = mysql_real_escape_string($id);//helps to protect database from beening hacked $sql = "SELECT * FROM `CMS_Content` WHERE id ='$id'"; else: $sql = 'SELECT * FROM `CMS_Content` WHERE 1'; endif; //$query = 'SELECT * FROM `CMS_Content` WHERE 1'; $result = mysql_query($sql) or die(mysql_error()); if (mysql_num_rows($result)!=0): while($row= mysql_fetch_assoc($result)){ echo '<h1><a href="Animals.php?id=' . $row['id'] . '">' . $row['Title'] . '</h1>'; echo '<p>' . $row['Body'] . '</p>'; } else: echo '<p> we are sorry there seems to be a problem with your request</p>'; endif; echo $return='<p><a href ="Animals.php">Back</a></p>'; } function add_content($_POST){ $Title= mysql_real_escape_string($_POST['Title']); $Body= mysql_real_escape_string($_POST['Body']); if(! $Title || ! $Body): if(!$Title=""): echo"<p>The Title is required<p>"; endif; if(!$Body=""): echo"<p>The Body is required<p>"; echo '<a href="add-content.php">Try Again</a>'; endif; else: $sql="INSERT INTO `CMS_Content`(`id`, `Title`, `Body`) VALUES ('null','$_POST[Title]','$_POST[Body]')"; $result = mysql_query($sql) or die(mysql_error()); echo "<meta http-equiv='refresh' content='0;url=added.php'>"; endif; } function manage_content (){ echo '<div id ="manage">'; $sql = 'SELECT * FROM `CMS_Content`'; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)): echo '<h1><a id=' . $row['id'] . '">' . $row['Title'] . '</h1>' ?> <div> <span ><a href="update-content.php?id=<?php= echo= $row['id']?>">Edit</a>|<a href="?delete=<?php echo $row['id']; ?>">Delete</a></a></span> </div> <?php endwhile; echo '</div>';//closes the manages div } Function delete_content($id){ if(!$id){ return false; }else{ $id=mysql_real_escape_string($id); $sql="DELETE FROM CMS_Content WHERE id='$id'"; $result = mysql_query($sql) or die(mysql_error()); echo "<meta http-equiv='refresh' content='0;url=deleted.php'>"; } function update_content_form($id) { $id = mysql_real_escape_string($id); $sql = "SELECT * FROM CMS_Content WHERE id = '$id'"; $res = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_assoc($res) ?> <form action="Animals.php" method="post" > <input type="hidden" name="update" value="true" /> <input type="hidden" name="id" value="<?php=$row['id']?>" /> <div> <label for="title">Title:</label> <input type="text" name="Title" id="Title" value="<?php=$row['Title']?>" /> </div> <div> <label for="body">Body:</label> <textarea name="body" id="body" rows="8" cols="40"><?php=$row['Body']?></textarea> </div> <input type="submit" name="submit" value="Update content" /> </form> <?php function update_content($p) { $title = mysql_real_escape_string($s['title']); $body = mysql_real_escape_string($s['body']); $id = mysql_real_escape_string($p['id']); if(!$title | !$body): if(!$title): echo "<p>The Title is Required</p>"; endif; if(!$body): echo "<p>The body is Required</p>"; endif; echo '<p><a href=" update_content.php?id=' . $id . '">Try Again</a></p>'; else: $sql = "UPDATE CMS_Content SET title = '$title', body = '$body' WHERE id = '$id'"; $res = mysql_query($sql) or die(mysql_error()); echo "Updated Successfully!"; endif; } } }//end of class } ?> code in Animals.php <h1> Our Animals </h1> <ul> <li><a href="manage-content.php">Manage Content</a></li> <li><a href="add-content.php">Add Content</a></li> </ul> <?php if(isset($_POST['add'])): $obj->add_content($_POST); elseif(isset($_POST['update'])): $obj->update_content_form($_POST); endif; ?> Code in update-content.php <h1> Our Animals j,j</h1> <h1> Update Content </h1> <?=$obj->update_content_form($_GET['id']) ?>
  5. From my experience, using Google's sitemap generator to generate a sitemap is not that good. It creates page that you do not want to show up. I am wondering what the best method is for creating a sitemap of a website so that only certain pages of the website show up on Google?
  6. Hello, I am working on creating an XML document. I am trying to accomplish following format, but the code I wrote is giving me different result. I need some help on which type of loop I can use, so I can store all the Env in one element as a attribute. Output I am trying to accomplish this: <Applications> <App AppName="NotePad++"> <Env Prod="server1,server2" DEV="devserver1,devserver2" /> </App> <App AppName="7Zip"> <Env Prod="server3,server4" DEV="devserver3,devserver4" /> </App> </Applications> But, I am getting this: <?xml version="1.0" ?> <Applications> <App AppName="NotePad++"> <Env Prod="server1" /> </App> <App AppName="NotePad++"> <Env Prod="server2" /> </App> <App AppName="NotePad++"> <Env DEV="devserver1" /> </App> <App AppName="NotePad++"> <Env DEV="devserver2" /> </App> <App AppName="7Zip"> <Env Prod="server3" /> </App> <App AppName="7Zip"> <Env Prod="server4" /> </App> <App AppName="7Zip"> <Env DEV="devserver3" /> </App> <App AppName="7Zip"> <Env DEV="devserver4" /> </App> </Applications> Here is the code I wrote: Foreach ($application as $app) { Foreach ($serverlist as $serverenv) { if ($serverenv['appid'] == $app['id']) { $appchild = $doc->createElement( "App" ); $appattr = $main->appendChild($appchild); $appattr->setAttribute("AppName", $app['appname']); $envchild = $doc->createElement("Env"); $envattr = $appchild->appendChild($envchild); $envattr->setAttribute($serverenv['Environment'], $serverenv['servername']); } } } echo $doc->saveXML();
  7. Hey there I have to make a php driven website that uses the CRUD operations to modify a simple MySQL database anyone willing to help me with this in detail? PM me if possible please thanks
  8. Hi, This is my first post and I would like to kick it off with a question I am trying to write a function that grabs the most relevant image from a website, however I encounter a few problems for which I need a bit of help for. To get into what I am trying to accomplish I suggest reading the article on : shareaholic This article describes quite in depth what you should do to grab the most relevant image from a website. Most functionality as described in that article are functional in my own program. just 32KB of images are fetched to get the headers so that i can calculate the width & height and aspect ratio. the array is sorted, big on top, small on bottom All OG Meta tags and Twitter Tags are found and stored in an array todo: compile a list of most used DIV ID for content, wordpress is using 'content' and other CMS's 'main' . etc etc With the information I should be able to grab the most relevant image from most websites, BUT... The thing that I encounter is that the biggest image is not always the most relevant image plus some ad images on certain websites have the perfect aspect ratio and are quite big, so I get wrong results. Did anyone here ever tried to do the same thing? and if so, how did you work around 'my' problem? Perhaps my approach is totally not correct. Thanks in advance, W//
  9. I looked at several community forums, and I am unable to figure it out on how to retain select option value after validation fails. Here is the code that works for me, but values disappear when submit button is submitted. <select id="service" name="service" class="searchoption"> <option value="">-- Select Service Name --</option> <?php $resultservice = mysqli_query($con,"Select * from services") ?> <?php while ($line = mysqli_fetch_array($resultservice)) { ?> <option value="<?php echo $line['serviceid'];?>"> <?php echo $line['service'];?> </option> <?php } ?> </select> Here is what I tried and doesn't work for me: <select id="service" name="service" class="searchoption"> <option value="">-- Select Service Name --</option> <?php $resultservice = mysqli_query($con,"Select * from services") ?> <?php while ($line = mysqli_fetch_array($resultservice)) { ?> <option value="<?php echo $line['serviceid']; if ($_POST['service'] == $service) {echo 'selected="selected"'} echo $line['serviceid']; ?>"> <?php echo $line['service'];?> </option> <?php } ?> </select>
  10. i need help with a login i have on my site. I'm new to this so i dont know if i'll get any help
  11. Hi, Could someone explain me how the websites stats & values are made like in: http://www.sitevalor.com or http://www.websiteoutlook.com ? Do i need a special class/library for this ? Thanks.
  12. Hi, For a project I need to create a visual/graphical bin-packing algorithm program and I was planning to use Java with JavaFX to make it a normal GUI computer app - however, as I don't like Java that much and I have way more experience in PHP and jQuery, I was wondering if you guys think it would be possible to make this project as a website using PHP and jQuery because I haven't worked with PHP for a long time and I'm not sure if the appropriate tools are available to make something like this. Basically this is what I want to do: Ask user how many bins he wants and with what sizes + a set of numbers they would like to use to fill the bins with Draw/show the bins on one side of the page and the numbers on the other side Have the ability to drag numbers into any bin Once the bin is full, it gets filled with a red background The ability to write the bin-packing algorithm itself in PHP and have a button that can do it all for the user automatically Do you think something similar to this would be possible at all as a website or would I be better off using JavaFX to create an application? Please note that this is just a whole concept I had in mind, so I wasn't assuming what's actually doable and what's not within the time frame I got (until the first week of May). I would really appreciate any thoughts on this Thanks!
  13. Hi everybody and congratulations for being part of this forum. Well the case is that being a beginner in this thing called php, I am looking for an elegant, functional way to detect active categories in a Joomla!-based site. The idea is to apply certain css rules to an entire site when certain categories are active. In fact, specific css styles for each active category. The administrator in charge of the site will not have any control over the css files and their implementation, so I have to leave the site prepared in terms of styling. The site will have a good number of categories to be activated and deactivated whenever the webmaster consider the opportunity. Do you know some approach to the problem? Some practical example or idea. Best regards.
  14. how can i change gateway from affiliategateways.com to www.cpalead.com ?
  15. Hello. I've just finished building my first website, and I'd appreciate some critique. Specifically, I'd like to get some feedback on the code (you can find it on the site, under the Source tab). I do realize it's pretty messy, and of poor quality (and not supported by Explorer), and pretty broken too, but I'd like to hear your opinions nonetheless. Here it is: http://www.nocommontheme.co.nf/ I also have a couple question, if you don't mind: On average, how long would it take a professional web developer/programmer to build a website similar to mine? It took me around 3 weeks; is that too long? Generally, how should I structure my website? As in, what should go in the index, and how do I distribute/divide/link the files? In what areas do I need to improve the most? Organization? Based solely on the code I've wrote, would you call me a beginner, or an intermediate? Sorry if these questions sound a little childish, and thanks in advance for any feedback.
  16. Hello, guys! I have a really big issue right now, I've been trying to solve this for weeks but I can't find the solution. I have a website (it's kind of a hosting site, for example www.randomhost.com) which has an administrator's section. So if someone creates an account they can post something on their own subpage (user.randomhost.com) via admin's section. The user also has to input their facebook page in the settings (not their personal page but something like a fan-page or a group-page) AND their personal page and of course all the data needed to log into facebook with both accounts (fan-page and personal page). If someone posts something to their own subpage (user.randomhost.com), I want that exact same post to be created on the given fan-page or group-page and seen posted by the user's given personal account. A tried to make it as clear as possible. I can't find the solution, I hope you guys can help. Thanks in advance. VC
  17. Hi Guys, I'm an amateur coder working on a huge project probably way above my capabilities and thus continue to run into problems. So, I seek your help! In my developing system, I'm making a dynamic website so you can control the front-end from the back-end. To edit the front-end you have a page Manage Layout which allows you to edit the HTML of the home page. Then you just type in my custom elements like, [menu], etc. I'm using preg_replace to change these into the scripts I require. The HTML of the homepage is contained in a database, then when it's executed on the homepage I do the preg replace etc. What I'm doing for my [menu] is: Now, the problem occurs. It executes this 100%, the preg_replace carries it out perfectly, BUT instead of it executing where I've placed it in the overall position on the page, it puts everything on the first line after the <body> tag... The preg_replace simply replaces [menu] with createMenu(); so I would've thought that my function would be executed wherever I had [menu]??? I'm not entirely sure what I've said is clear but lets hope so. Cheers. ABOVE:The menu is being placed on the first line, rather than in the div where I have [menu] (which is consequently to the right of the CrossFit St Marys Logo)
  18. I'm still a little bit new to PHP, and I want to ammend the beginning of a text file, moving the previous content toward the end; reading around online the conensus I seem to be finding is that this is not possible with the functions as they are, so I plan to move the conents of a first 'master' file to a second 'hold' file, so I can then ammend the master file with the conents of the hold file afterward; however I'm not sure if it is possible to open two files at once; using some sample code I found online I hashed together this piece of code: /*******************/ /* WRITE TO FILE */ /*******************/ /*pass master news file to the hold file*/ flock($fq, LOCK_EX); //lock file fseek($fq,0); fwrite($fq, $fp, strlen($fp)); flock($fq, LOCK_UN); //unlock file fclose($fq); /*generate new news code*/ $date = date('jS F Y'); $outputstring = "<p><em class="newsheader">".$header."</em> - ".$date."\t"."<br>".$newsbody."</p><br>"; flock($fp, LOCK_EX); //lock file fseek($fp,0); fwrite($fp, $outputstring, strlen($outputstring)); flock($fp, LOCK_UN); //unlock file fclose($fp); echo '<p>News write successful</p>'; The master file is replaced fine, however, the hold file ends up containing "Resource id #1", is it not possible to hold open two files at once?
  19. I'm working on a website, ive incorporated user accounts from http://php-login-script.com/ and now im trying to figure out how to enable photo uploading. I only want users with accounts to be able to upload photos, I want the photos they upload to be on their home page. Does anybody know how to do this? It would be a lot of help
  20. When I press any buttons to delete, add or subtracts (etc) things on my website, it always go to the top, like if it's refreshing the site. Any idea how I can avoid this ? Is it possible overall?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.