Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About bschultz

  • Rank
    Advanced Member
  • Birthday 07/20/1974

Profile Information

  • Gender
  • Location
    Minnesota, USA

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. This is always echoing FIRST...even for today (12/30)...any ideas why? <?php $year = date('Y'); $yearplus = ($year + 1); $first = date('m-d', strtotime("12-25")); $second = date('m-d', strtotime("01-01")); if (date('m-d') <= $first || date('m-d') >= $second) { $first_monday = date('Y-m-d', strtotime("January 2 $year last Monday")); echo "FIRST"; } else { $first_monday = date('Y-m-d', strtotime("January 2 $yearplus last Monday")); echo "SECOND"; } echo $first_monday; exit; ?>
  2. The broadcast industry (radio and TV) has a special calendar. The week starts on Monday. Week #1 is ALWAYS the week with January 1st. So, if January 1st is on a Sunday, week #1 will include December 26th through January 1st. This differs from the ISO standard used by PHP. I don't know where to start to write a function to give me the broadcast calendar week numbers for a given date. Google didn't have much...and Stack Overflow had a couple examples...but none of them worked. They all showed today being week #53, where today (December 30) is in week #1. Any help would be appreciat
  3. This is fixed. Turns out one of the pages that the 4th page was calling via GET does NOT require a password, and it has all the content I need. I exploded the string it returned and got all the info I needed. Thanks.
  4. Maxxd, when using a browser, there is a button to press to go from page 1 to page 2. This button is just a link, so the second curl request uses this link as the URL. Using Firefox Developer Tools - Network, page #4 makes two GET calls to two other pages (which includes the SQL Selects), then the content loads on page #4 Here are the two external page requests curl ',%20%27Virtual%20News%20Network%20MF%27,%20%2710/19/2020%27,%20%2710/19/2020%27&DT=1603034713365' -H 'User-Agent: Mozill
  5. 4 pages deep means login page (page 1). Simulate a link click to page 2. Simulate a link click to page 3. Simulate a link click to page 4. Pages 2 and 3 have no javascript or Ajax coding. Page 4 does! Pages 2 and 3 have some coding that is tied to the login to display certain info. As far as I can tell, page 4 uses AJAX to set some database calls...thus without the AXAX info passed via CURL, I get AJAX:0 error. I'm assuming the AJAX:0 error is in the code of the page...but when I visit that page via a browser, it works...so no error. What code would you like me to post? Page 1,
  6. I'm trying to login and scrape a page 4 pages deep. I can get to the fourth page...but that page only returns AJAX ERROR:0. I know NOTHING about AJAX calls via Curl. Can someone please help me with what to look for in the source code of the 4th page (when using a browser) to what I'm supposed to pass along via CURL? If you need the source code or login credentials to see what's happening in the background, I can generate a temp password for you. Thanks!
  7. Upon further investigation, there is a cookie being set by a JQuery script...which in turn sets the rowid. So, how can I get CURL to interact with Java? Headless browser? I've never had much success with headless browsers before. Any tips? Thanks!
  8. But the rowid isn't set until you submit the form...so parse-url returns NULL. The flow of the login is: login page -> formprocessing page -> landing page. In the script, I'm sending a POST to the form processing page. Once that is done, the form processing page sets the rowid. I can see the rowid in my browser, but CURL doesn't know that value.
  9. My real job is as a radio announcer. We are required to play advertising commercials for various programs that we broadcast. I wrote a script a few years ago to automatically login to the providers website (PHP, Curl) and download the mp3's that we are supposed to play each day. Now, the provider has updated their website and changed the login process. It used to be (in a browser) that when you logged in, you were taken to a landing page with a unique "rowid" in the in URL. Once you knew that rowid, you could simply go to that page, and bypass the login process. Not very secure...but
  10. I have a given date on a webpage, that I'm scraping to insert into a DB. The date is in this format: Sun, Feb 9<br />3:00 PM ET I need to insert this into the DB in this format: 2020-02-09 15:00:00 It will always be this year...How can I change this data to be inserted correctly? I'm trying this...and it's inserting as 1969 $date = 'Sun, Feb 9<br />3:00 PM ET': $healthy = array("<br />", " ET", "Sun.", "Mon.", "Tue.", "Wed.", "Thu", "Fri.", "Sat.", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); $yummy = array(" ", "2
  11. I got it working...left the dollar sign out of the function call getplayer('qb1'); and then an if / elseif statement inside the function: if ($position == 'qb1') { $new_position = $qb1; } elseif ($position == 'qb2') { $new_position = $qb2; } Thanks....
  12. I've tried that...the echo of the sql shows the name is blank
  13. I have a php file with a bunch of variables declared. I now need a function to put data on a separate page that pulls variables from the required page. So, on the required page, I have a variable set like this: $qb1 = "John Doe"; The function on the new script is called like this: getplayer($qb1); I've tried this without the dollar sign in the function like this: getplayer(qb1); and then adding the $dollar sign in the rest of the function code...but it never populates the sql query correctly. I'm guessing this is a case for variable variables or something similar, but I don't know
  14. I'm replacing Wordpress with my own content management system. Wordpress is just too bloated for my liking. The url's for the mp3's are embedded into the stories. Our final Beaver Fever Friday of the year was yesterday. What a show. It's always nice to get to know these seniors over their careers. Here are the interviews if you missed them: Christa Benson - Track <a href="http:///beaverradionetwork.com/audio/1011/brnpodcasts/BFF2019/ChristaBenson.mp3">Christa Benson - Track</a><br /><br /> Cody Cook - MGolf <a href="http:///beaverradionetwork.com/audio/10
  • 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.