Jump to content

PhoenixTwo

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

PhoenixTwo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Anyone have any ideas, or can guide me in the right direction?
  2. Hi Adam, Basically, the guys at work go to a supplier website, log in, make a search in the supplier product page. Their search results appear in the following format for example: results found: [5].. search query: iphone qty price suppliercode manufacturerpartnumber itemtitle itemdescription 12 $950 abc123 321cba 16gb iphone a little about the product 1 $200 ..... ..... ..... ........ etc etc... What I am aiming to try and do is create a script which once a search query is entered, logs in to these 3 supplier sites automatically with the relevant username and password, create the search query within the site, and extract the search result lines ONLY (in this case, starting from 12, $950 etc.. until the end of the search results). If I was able to access the supplier database, it would be much easier to just do a dump of the entire product lists into a database of my own, but I very much doubt they will give me access to that. Any Ideas?
  3. Hi all, I was just wondering if anyone can guide me in the right direction. I'm trying to help out the fellas at work. They have a few suppliers websites, which are each visited about a thousand times a day (literally!). They log on to these sites with their username and password, and they do a search on certain products. What I have been kindly asked to do for them is the following: create a search page. When the search is made, the script logs in to all three sites with each sites' credentials, does the search, pulls only the search results data down to the local page and all three sites have been searched at once Is that even possible?? ??? ??? Or is there a way of creating a script which runs every 30 minutes or so, does a search on all three sites to extract everything, and dumps it all into a database locally? I have seen a website which runs every 10 minutes, extracts all data from a website (I'm not 100% sure what the script does, but it does not retrieve anything from a database) and dumps into a local database and people search off this page globally. I would be very appreciative if anyone can help me out with this.
  4. Hi all! Just want to thank everyone in advance for their help, and that everyone has a great day/night (in my case).. My problem is this... (take it easy on me guys, I'm still a n00b to these "sessions").. I have three pages, one called order.php, one called search.php, and the other called view.php... order.php and view.php both have the session_start() declarations at the beginning, as search.php does not seeing as it is 'included' in the view.php page. the functionality of these 3 pages are as follows, search.php searches a db, retrieves data, and allows to call a JS function which brings together some variables, and creates a url with order.php?var1=hi&var2=bye, for example... now in the order.php page, for some reason, without actually declaring a session array (in this case, SESSION['cart'][$productid]), that session array automatically reads the _GET product key and stores it in that session... (i've tried calling it, and it's already stored in the session). im trying to create a session array kind of like a shopping cart.. where if that productid gets stored in a session with a quantity count, and retrieves it and can update if the product gets ordered more than once in one session... although if i do _SESSION['cart'][$productid]++, it gets incremented by one from what it is supposed to.. oh, and another thing.. the code i created before i started hacking at it trying to get it right, actually worked as it was supposed to in IE, but the problems arose in FF. if anyone needs more explanation, i can do so as my explanation skills are obviously all over the place apologies for that... so in summary.. session->array->productid reads the variable from the url, and when updating the quantity, it actually doubles up because it reads it from the url, and then i add the quantity from the get also.. hopefully someone out there can help me as i am ready to pull my hair out... Thanking you all in advance
  5. Hi there, I have come to a brick wall within my coding. I have written a search page and I want to expand on it. What I am trying to do is check to see whether the search string is a date (format: XX/XX/XXXX) and if that comes out true, then search the database for that particular date. The dates within the database are in three different fields (dd, mm, and yyyy). Can someone please show me the way of checking to see whether the string is a date or not, and then going through the proper search routine. Thanking you all kindly in advance for the help.
  6. I really do apologise. I think I was more curious of your game/design and started blabbering on about other stuff which were unnecessary. Either way, thank you very much for your help. It was definitely very useful in the least
  7. Is there still some sort of example we/I can look at? It would be of great assistance to me in getting my head around how to code the damn thing.
  8. Hi jesirose, What was the game called? And is it even still online? Just curious so I can see how you made it. Either way, within the game, the higher the gold mine, the quicker your gold goes up. That is the route I was thinking of. Not just keeping it completely consistent. So the DB update of (gold+5) every so often kind of gets thrown out the window (no offence). And I was thinking maybe have multiple users, so keeping it one number wouldn't quite work in this case. I was actually thinking (or maybe just asking for a more professional opinion), let's say we have 3 users/players. Maybe some kind of loop? It reads the first players increment number, then reads the total gold of the same player, adjusts the gold accordingly, and moves on to the next player. Is that even possible to query databases within a loop? (Can you tell I'm kind of new to the world of PHP?)
  9. Hmmm, that is very interesting. I don't know if we're quite on the same page, but here goes... If I made a calculations page, seperate to the normal game page, and using cron, ran the calculations page every x number of seconds, that "COULD" be considered as real-time? Or am I just on a totally different planet altogether? LoL Cheers
  10. Wow, I must say I am very impressed with the speed of the replies. Bravo! I have absolutely no idea what a cron is, let alone how to use it. The theory GingerRobot explained seems to be the most logic to use at this very point in time. I have not really had much experience with the time functions on PHP as yet. Are there any specific functions or formulae which enable me to calculate last active time to the new active time? Or would you, or anyone else for that matter, be able to guide me in the right direction on how to get the ball rolling on this matter? Thanking you all very much kindly.
  11. Hi there, I am kind of new to the PHP world. I say new as in I have a bit of experience with it, know basics and stuff.. But I am no PHP-Genius.. Anywho, the following is my situation: I am building a random project for myself as a pastime. It is kind of like a little game. Although I hit a brick wall. I have a variable called GOLD, and the amount of gold increases as time goes by. Think of it as resources in most RTS games. If you don't use it, it increases. My question is this: If I gave the number a maximum value, for instance, 500. And I started off with 10. Increase rate is 5 an hour. Is there a way that if i go offline (I close the page), and come back to it two hours later, it will calculate it to be 20 (start-off is 10, and five per hour for two hours)?? But I kind of need it as real-time. So if I am offline for let's say, two hours and 20 minutes, it uses the buffer in-between also. What I am trying to get at is, it is not calculated hourly, but more by the seconds. So if the increase rate was 60 per hour, the calculations will still be done every second, although will only increase when it hits 60 seconds. And yes, if possible, I would like it to be automatically adjusted into a MySQL database. Sorry if I seem to have gone around in circles, I just wanted to give you guys as much information as possible so you guys know what I am talking about. Thanking you all in advance. Mark
×
×
  • 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.