Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zane

  1. put the Urls inside an array.. then use foreach to do your DOM scraping. Also, the solution I provided had nothing to do with PHP, ... take a look at DOM selecting... or CSS selecting for a better understanding.
  2. If you only want the H4, then shouldn't you just be able to select it? $html('div#game_440 h4', 0)->getPlainText();
  3. I'm using a G570 atm, I've had it since September of 2011. The only thing that has happened so far is that the hinge near the power button broke and I had to send it in for repair. It seems to run OK. It's nothing special really. I'm pretty sure I've used some Gateways and HPs that performed better than this laptop. Regardless, it was quite cheap when I got it, so I get what I pay for I guess. ~$430 My biggest pet peeve with Lenovo is their technical support. No matter which number you call for support, you will be given another number to call. Also, I found out that there are two completely separate support offices for the Thinkpad and Ideapads. If you call the thinkpad number and so much as mention G Series, they will forfeit their assistance immediately and tell you to call the Ideapad center, an office which typically has no native English speakers. Also, if you ever send your laptop in for repair, stay on their ass about it. They shipped it back to me via 2-day Fedex, but I found out later they sent it to the wrong city. I had to call Lenovo back to request they change it to the correct one... to my surprise, they got it wrong again. It wasn't until Fedex finally called me saying the address didn't exist that i was able to resolve it. Nontheless, it took WAY more than 2 days to get it back, it was close to 7. One more pet peeve I have about their support service. If you have the limited warranty, then no matter how many times you call to use it, they will incessantly ask you to upgrade your warranty. Every CSR I talked to (which was not a native English speaker) spent the majority of their time trying to sell me more warranty rather than help me use my current one. When I repeatedly told them I wasn't interested, they started offering me employee discounts. So if you're looking for a good discount on an extended warranty, ... pretend you don't want it and you'll get 15% off most likely. I didn't have the money to accept the "great deal" they offered, but my argument was that I haven't even used my warranty once at the time and now they're offering me more it. It's almost as if they were selling me a newspaper one section at a time. So after paying to get the front page, they try to sell you the others before you've even read the first one. It's absolutely the worst support service I've ever witnessed. Even the online chat is useless, because the person on the other end is automated. Either they are automated, or there is some asshole issuing macros upon seeing a certain word, like "hardware"
  4. Where is the code where you are actually mail()ing this information? Furthermore, your headers (Subject, From, Attachment, etc) should not be within the body, they should be in a variable of their own. For instance, for your current code. $mailBody = null; $mailHeaders = null; //Headers $mailHeaders .= "--".$bound."\r\n"; $mailHeaders .= "Content-Type: application/xml name =\"$fname\"\r\n"; $mailHeaders .= "Content-Transfer-Encoding: base64 \r\n"; $mailHeaders .= "Content-Disposition: attachment; filename=\"$fname\""."\r\n"."\r\n"; $mailHeaders .= $at_con."\r\n"."\r\n"; $mailHeaders .= "--".$bound."\r\n"; $mailHeaders .="Content-Type: multipart/alternative \r\n"; $mailHeaders .= "Content-type: text/html; charset=iso-8859-1"; $mailHeaders .= "Content-Transfer-Encoding: 8bit"."\r\n"; // Body $mailBody .= " Names Changed to protect the guilty "; $mailBody .="</pre> <table border="'1'">Service Provider Name :Not HereCustomer Ref Number:{$fieldArray[0][0]}"; $mailBody .="Contact Name :{$fieldArray[0][1]}Customer :{$fieldArray[0][2]}"; $mailBody .="Contact No :{$fieldArray[0][3]}Target ID :{$fieldArray[0][4]}"; $mailBody .= "Query Date :{$fieldArray[0][5]}Job Date :{$fieldArray[0][6]}"; $mailBody .= "QUERY TYPE :"; $mailBody .= "QUERY INFO :{$fieldArray[0][7]}"; $mailBody .= "DETAILS OF THE ISSUE :"; $mailBody .= "{$fieldArray[0][8]}"; $mailBody .= "</table> <p>Please do not reply to this email unless there is a technical issue.</p>"."\r\n"."\r\n" ;<br>$mailBody .= "--".$bound."--"."\r\n"."\r\n
  5. It should be as easy as this $threads[] = Threadi_ThreadFactory::getReturnableThread(array($worker,'fetchAWebsite')); $threads[0]->start('http://www.google.de'); $threads[] = Threadi_ThreadFactory::getReturnableThread(array($worker,'fetchAWebsite')); $threads[1]->start('http://www.aoemedia.de');
  6. I gotta an old buddy/roomate up in Halifax.
  7. Or better yet, along with the resources, craft up a poll... displaying the results after a vote.
  8. you should be joining on IDs/inedexes... not a varchar field. Not saying it won't work, but there is definitely more room for errors if you join on varchar. For instance, a single space could keep it from working whereas an id is simply a number.
  9. If I were doing this, I would make an array containing the urls for product What have you done so far?
  10. Wouldn't something like this be a little more efficient? $days = range(1, 364); $months = array_chunk($days, 26); $currentMonth = 0; $currentDay = 253; foreach ($months as $month => $daylist) { $checkMonth = array_search ($currentDay, $daylist); if ( $checkMonth !== false) { $currentMonth = key($month) + 1; break 1; } } ?>
  11. Typically, this is how you use it $query = mysql_query("SELECT 'id', 'title', 'post' FROM 'posts'") or die("Your error is: \n" . mysql_error());
  12. it May have something to do with that whitespace at the end.
  13. It most likely doesn't work because your input fields have no name attributes. Moreover, I agree with AyKay and casper, use a PHP script to mail things.
  14. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=350924.0
  15. Ok, this is what I understand so far: - You want to listen for the click of the back button on the browser - You have a 3rd party script that lets you do this - Third, I see this if(bajb_backdetect.FrameLoaded == 1 && checkVar != "HistoryLoad") { BBiFrame.src = "blank.html?HistoryLoad"; } - And four, you want to redirect to more than one page? If that's the case, then could you not just setup an array, give it a random index, and then redirect? EDIT: This is pretty much a shot in the dark, but wouldn't the onbeforeunload() function be what you're looking for? http://msdn.microsoft.com/en-us/library/ms536907%28v=vs.85%29.aspx
  16. I did not jump to conclusions. I'm telling you that the average user, here or anywhere else, that has any sense at all, will unlikely download your attachment. No one wants to download your file just like no one wants to wait 30 seconds on a file hosting server to get a hot download. The key to getting quality help is to provide everything possible and/or needed to asses the question. When you go to the mechanic do you ask the mechanic to go pick up your car and fix it? No, you either drive it there or have it towed so the mechanic can see it instantly, without any obstacles. This same thing was said just earlier today Regardless. I changed the extension anyway.. just to see ... something. What I found was a third party javascript file. Here, I'll even post it for you /*! * Back Button Detection Object V 1.0.1 * http://www.brookebryan.com/ * * Copyright 2010, Brooke Bryan * * Date: Thu 27 Jan 2011 13:37 GMT */ var bajb_backdetect = { Version: '1.0.0', Description: 'Back Button Detection', Browser: { IE: !!(window.attachEvent && !window.opera), Safari: navigator.userAgent.indexOf('Apple') > -1, Opera: !!window.opera }, FrameLoaded: 0, FrameTry:0, FrameTimeout: null, OnBack: function(){ /*alert('Back Button Clicked');*/ }, BAJBFrame: function(){ var BAJBOnBack = document.getElementById('BAJBOnBack'); if(bajb_backdetect.FrameLoaded > 1) { if(bajb_backdetect.FrameLoaded == 2) { bajb_backdetect.OnBack(); history.back(); } } bajb_backdetect.FrameLoaded++; if(bajb_backdetect.FrameLoaded == 1) { if(bajb_backdetect.Browser.IE) { bajb_backdetect.SetupFrames(); } else { bajb_backdetect.FrameTimeout = setTimeout("bajb_backdetect.SetupFrames();",700); } } }, SetupFrames: function() { clearTimeout(bajb_backdetect.FrameTimeout); var BBiFrame = document.getElementById('BAJBOnBack'); var checkVar = BBiFrame.src.substr(-11,11); if(bajb_backdetect.FrameLoaded == 1 && checkVar != "HistoryLoad") { BBiFrame.src = "blank.html?HistoryLoad"; } else { if(bajb_backdetect.FrameTry { bajb_backdetect.FrameTry++; bajb_backdetect.FrameTimeout = setTimeout("bajb_backdetect.SetupFrames();",700); } } }, SafariHash: 'false', Safari: function() { if(bajb_backdetect.SafariHash == 'false') { if(window.location.hash == '#b') { bajb_backdetect.SafariHash = 'true'; } else { window.location.hash = '#b'; } setTimeout("bajb_backdetect.Safari();",100); } else if(bajb_backdetect.SafariHash == 'true') { if(window.location.hash == '') { bajb_backdetect.SafariHash = 'back'; bajb_backdetect.OnBack(); history.back(); } else { setTimeout("bajb_backdetect.Safari();",100); } } }, Initialise: function() { if(bajb_backdetect.Browser.Safari) { setTimeout("bajb_backdetect.Safari();",600); } else { document.write(''); } } }; bajb_backdetect.Initialise(); Now, we can all see that you're using the Back Button Detection Object... supposedly found at http://www.brookebryan.com/ What exactly is the problem I ask now? If it has anything to do with this script, which I have sneaking suspicion it does, then this thread belongs in Third Party Scripts.
  17. The second foreach needs to be WITHIN the first one. The ending ul needs to be in there too foreach ($_N_america as $country => $list) { echo "$country</pre> <ul>"; foreach ($list as $k => $v) { echo "$k - $v\n"; } echo '</ul>';<br
  18. if (mysql_num_rows($Recordset1) > 0) { // no results echo 'No results found.'; } Take a good hard look at that code of yours, after awhile, hopefully, you'll notice you have the logic backwards.
  19. I shouldn't have to change the extension on anything, especially if you're the one asking for help. Why can't you just post your code within code tags like the rest of the population here. Even if changing the extension does fix it on my end, it still sounds rather fishy. I'm surprised I even downloaded it to begin with; curiosity got the best of me. Post the relevant code or you will not receive quality help. Questions shouldn't be instructions.
  20. If you really want to trim every bit of whitespace from your PHP, then so be it, there's no harm in it. But if you expect to show someone your code or ask for help with it and expect a decent answer, then do not trim it. If 7000 people request a PHP script, it is requested through Apache, the PHP script isn't downloaded like a javascript include. There really is no point in your friends concept.... other than obfuscation --- which is NOT security (As you'll constantly be preached in any Security course) Also, 7000 people isn't very many people. On average, this forum alone receives 106,140.88 page views. This includes a very diverse amount of requests. Some people are posting, some are reading, some are skimming, some are editing, the list goes on and on. If you look at the source code for SMF (the forum software we use), you won't see this reckless and ridiculous practice of having no whitespace. I believe you're friend strips it out so his code looks more complex than it is. Sure, his filesize may be lower, but no one will ever read it, unless they're just into that kind of thing. You could minify your car in the same way, but it wouldn't be a very comfortable vehicle. Take out the seats, the roof, the doors, windows, windshield, etc.... and the car will still run. It wouldn't be very aerodynamic though.
  21. So this is what happens when you download that attachment.. Although it says it is a zip file, named mail.zip, index.php is downloaded instead... When viewed with wordpad, this pops up. In short, I see no example whatsoever.
  22. you need quotes for associative keys. $_REQUEST['cid']
  23. I'm not sure why we haven't created a public announcement, but we are definitely aware of the situation. And it looks as though you have already started the SOPA/PIPA protest with your OP. I guess we could add a Pro/Anti poll to it and move it to Announcements sooner or later. Because nothing speaks more than numbers in a poll.
  24. Usually I start by just drawing and writing. Write a few variables name and draw lines from one to another... or draw a few boxes to represent pages. Mainly, I think of my target data beforehand and draw out its path to my target goal. When I was learning Java, we would simply write the object name in a box (or circle), draw a line coming down from the bottom of it, and attach the various methods and properties it contained, using different shapes for each type (circle for methods, block for properties)
×
×
  • 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.