PHP - How To Retrieve The Poster Image From Imdb Of A Movie Given Its Id, Using Php?
Hi there here is what I am trying to do.
I have a site A poster can ask a question about a movie that he/she is unsure of Then people can answer If anyone's post is selected as the right answer then I want the poster image to show up in their comment box for the movie. When you answer a question about a movie You can enter The movie name IMDB link IMDB ID So what I want to know is, well I know that there is some javascript onlick function that takes the "select as right answer" clicking action by the Question asker and calls a script which outputs or echos the right answer message. Or this answer is correct message. I want to also summon the IMDB poster image for that commenter if he / she is selected Any ideas? Omar Similar TutorialsHi everyone, I need help with scraping. I have script for scraping IMDB, but I need a few more thing. I dont know how to scrape more Budget, Opening Weekend, and Gross. Rest information that I need I scrape on this way: Code: [Select] //code removed to discourage people from scraping IMDB Can somebody help me to scrape Budget, Opening Weekend and Gross also? hi, i have a form that requires image to be uploaded. i know how to store the form values in a database but i don't know how to store the image into the database. i want the user to upload picture and preview the data provided review (including the image) before submitting to the database. thanks I m trying to fetch a image from mysql (blob) with header..here is my coding..."<?php include("db.php"); $query=mysql_query("select * from table where id='3' "); $row=mysql_fetch_array($query); $r=$row['image']; header("content-type:image"); echo $r; ?>" i want to fetch another fields from the database....but when i try to echo another fields...the page shows error or it does not echo other fields of database....please help me...how can i resolve it...i want to fetch other fields from database,like'username'password'firstname'lastname and image...thanks in advance... i am making a website where i can submit films but i am confuse to understand the structure of that where people can also submit their views and i can diferent link of diffrent companiess for example i have some example http://tv.desitvforum.net/index.php?option=com_content&task=view&id=77865&Itemid=86 http://www.funbolo.com/more.asp?itemCode=1916 this type of page that i can easily insert links and their title and images on that page there is also one problem every time become different links of different sites in different counting so that's why m more confuse ho to set data base structure for that and how add these all details from panel and people can also post comment on that well thats simple but my bug problem is structure for this aNy Body in structure I confess I am not a php coder but have managed to build a youtube player which plays from a list which is generated by a flat file data base. http://www.d-sine.com/DEV/CHW/movies/index.php I have also (nearly) built an admin backend where users can edit the database and add, delete and update their movie player list. http://www.d-sine.com/DEV/CHW/movies/admin/ pass = password the problem I have is that when the list is edited it throws in a return (a blank line) into the database resulting in an error when the player is refreshed after the change. When this blank line is taken out all is fine, I have got so close its frustrating arrrgghh Can anyone help??? The code in full is attatched Open Source, so if it is any use to anyone, be my guest ;-) I'm in the process of writing an online movie trivia game in PHP, Ajax and jQuery, I have completed about 65 percent in what I want to achieve. I have it where users can add their own movie questions and once they are approved by me they will appear in the game. I eventually want to make the game play better and have where a person can log on via social media (Facebook, Google+, etc). Here's the link to the website: https://www.pepster.com/
Everything is original or have permission to use, I converted an old Flash trivia game that I developed in college and I have been spending the last month or two developing this website (along with my main website). I know haven't critique other websites, but I have notice there isn't much activity going on here lately, but I promise I will in the future. I'm look for input on game play, new features that you might like to see and over website design.
Best Regards,
John
Hi, I am not very good with php but this code was kindly given to me by mdjamato, except I added a variable $markGradeSum to add all the $markGrade. Problem is that I will get notice saying undefined variable $markGradeSum because the $markGradeSum is in the foreach loop which it needs to be in for the right calculation but where I want to output the variable is in the while loop in this line: Code: [Select] $output .= "<br><strong>Course:</strong> {$row['CourseId']} - {$row['CourseName']} <strong>Course Mark</strong> <strong>Grade</strong> <br><strong>Year:</strong> {$row['Year'] $markGradeSum}</p>\n"; Below is whole code: Code: [Select] <?php if($num ==0){ echo "<p>Sorry, No Records were found from this Search</p>";} else{ function outputModule($moduleID, $moduleName, $sessionData) { if(!count($sessionData)) { return false; } $markTotal = 0; $markGrade = 0; $weightSession = 0; $markGradeSum = 0; $grade = ""; $sessionsHTML = ""; $courseHTML = ""; foreach($sessionData as $session) { $sessionsHTML .= "<p><strong>Session:</strong> {$session['SessionId']} <strong>Session Mark:</strong> {$session['Mark']}</strong> <strong>Session Weight Contribution</strong> {$session['SessionWeight']}%</p>\n"; $markTotal += round($session['Mark'] / 100 * $session['SessionWeight']); $weightSession += ($session['SessionWeight']); $markGrade = round($markTotal / $weightSession * 100); $markGradeSum = round($markGrade); if ($markGrade >= 70){ $grade = "A";} else if ($markGrade >= 60 && $markGrade <= 69){ $grade = "B";} else if ($markGrade >= 50 && $markGrade <= 59){ $grade = "C";} else if ($markGrade >= 40 && $markGrade <= 49){ $grade = "D";} else if ($markGrade >= 30 && $markGrade <= 39){ $grade = "E";} else if ($markGrade >= 0 && $markGrade <= 29){ $grade = "F";} } $moduleHTML = "<p><br><strong>Module:</strong> {$moduleID} - {$moduleName} <strong>Module Mark:</strong> {$markTotal} <strong>Mark Percentage:</strong> {$markGrade} <strong>Grade:</strong> {$grade} </p>\n"; return $moduleHTML . $sessionsHTML; } $output = ""; $studentId = false; $courseId = false; $moduleId = false; while ($row = mysql_fetch_array($result)) { if($studentId != $row['StudentUsername']) { //Student has changed $studentId = $row['StudentUsername']; $output .= "<p><strong>Student:</strong> {$row['StudentForename']} {$row['StudentSurname']} ({$row['StudentUsername']})\n"; } if($courseId != $row['CourseId']) { //Course has changed $courseId = $row['CourseId']; $output .= "<br><strong>Course:</strong> {$row['CourseId']} - {$row['CourseName']} <strong>Course Mark</strong> <strong>Grade</strong> <br><strong>Year:</strong> {$row['Year'] $markGradeSum}</p>\n"; } if($moduleId != $row['ModuleId']) { //Module has changed if(isset($sessionsAry)) //Don't run function for first record { //Get output for last module and sessions $output .= outputModule($moduleId, $moduleName, $sessionsAry); } //Reset sessions data array and Set values for new module $sessionsAry = array(); $moduleId = $row['ModuleId']; $moduleName = $row['ModuleName']; } //Add session data to array for current module $sessionsAry[] = array('SessionId'=>$row['SessionId'], 'Mark'=>$row['Mark'], 'SessionWeight'=>$row['SessionWeight']); } //Get output for last module $output .= outputModule($moduleId, $moduleName, $sessionsAry); //Display the output echo $output; } } ?> How can I retrieve the variable so it doesn't come up with the notice but be able to display $markGradeSum to the places I want them in (one in foreach loop for calculation and other in while loop for output). Thank You I have a variable $form in the code below what I cant figure out how do it is call it and get the information it has out so I can display the errors: Code: [Select] function login($subuser, $subpass, $subremember){ global $database, $form; //The database and form object /* Username error checking */ $field = "user"; //Use field name for username if(!$subuser || strlen($subuser = trim($subuser)) == 0){ $form->setError($field, "* Username not entered"); } else{ /* Check if username is not alphanumeric */ if(!preg_match("^([0-9a-z])*$^i", $subuser)){ $form->setError($field, "* Username not alphanumeric"); } } if ($database->usernameBanned($subuser)) { $form->setError($field, "*Your Account has been banned"); } /* Password error checking */ $field = "pass"; //Use field name for password if(!$subpass){ $form->setError($field, "* Password not entered"); } /* Return if form errors exist */ if($form->num_errors > 0){ return false; } /* Checks that username is in database and password is correct */ $subuser = stripslashes($subuser); $result = $database->confirmUserPass($subuser, md5($subpass)); /* Check error codes */ if($result == 1){ $field = "user"; $form->setError($field, "* Username not found"); } else if($result == 2){ $field = "pass"; $form->setError($field, "* Invalid password"); } /* Return if form errors exist */ if($form->num_errors > 0){ return false; } Hello, I have a booking system which has time and date fields and if someone tries to book, for example, on 01/01/2011 at 09:00, when this slot is already taken, an error would be produced - which is fine. However I'm not sure in telling them what hours are available. There are 9 available times: 09,10,11,12,13,14,15,16,17:00. I will need to perform an sql query to gather all the times on the inputted date, I'm guessing a for loop would be the most efficient way? The only way I could think of is using multiple IF queries, for example: Code: [Select] <?php $sql = "SELECT `Hour` FROM `jobs` WHERE `Hour` = '09:00:00' AND Day ='$Day' AND Month ='$Month' AND Year ='$Year'"; $result = mysql_query($sql); if(mysql_num_rows($result) > 0){ $09Available = 'n'; // Time not available }else{ $09Available = 'y'; } $sql = "SELECT `Hour` FROM `jobs` WHERE `Hour` = '10:00:00' AND Day ='$Day' AND Month ='$Month' AND Year ='$Year'"; $result = mysql_query($sql); if(mysql_num_rows($result) > 0){ $10Available = 'n'; // Time not available }else{ $10Available = 'y'; } $sql = "SELECT `Hour` FROM `jobs` WHERE `Hour` = '11:00:00' AND Day ='$Day' AND Month ='$Month' AND Year ='$Year'"; $result = mysql_query($sql); if(mysql_num_rows($result) > 0){ $11Available = 'n'; // Time not available }else{ $11Available = 'y'; } ?> etc. etc.. How would I go about creating a more efficient method? Thank you, Jack. I have a form that ask user to enter other details but the primary key as this is automated and when they click on Submit button it takes the user to different form. now on this form I would like to retreive the primary that has just been added to the table. How can I do this? I'm doing this activity where a user chooses a base timezone and when the user clicks convert the current time in the selected GMT will be converted to GMT-11 to GMT+13. As of now, I have these codes: act09_view.php: Code: [Select] <?php session_start(); $s="GMT "; echo "Select the base time zone:</br>"; for($n=-11;$n<=13;$n++) { if ($n>=0) $s="GMT +"; $gmt[]=$s . $n . "</br>"; } echo "<select name='gmt'>"; foreach ($gmt as $value) { echo '<option value="' . $value . '">' . $value . '</option>\n'; } echo '</select>'; //$_SESSION['value']=$value; ?> <form action="act09_process.php"> </br><input type='submit' value='Convert'/> </form> act09_process.php: Code: [Select] <?php session_start(); //$value=$_SESSION['value']; //echo $value; date_default_timezone_set('Asia/Manila'); $gmttime=date('M j, Y g:i:s A'); echo "The current date and time at" . " is " . $gmttime; ?> I've tried using session variables. I think I executed them incorrectly. The output is supposed to look like this: I have two pages - add_product.php and show.php here is the code for add_product.php Code: [Select] <?php ini_set('display_errors',1); error_reporting(-1); require_once ('./includes/config.inc.php'); require_once (MYSQL); $add_cat_errors = array(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { // Check for a name: if (empty($_POST['product'])) { $add_cat_errors['product'] = 'Please enter the name!'; } // Check for a description: if (empty($_POST['prod_descr'])) { $add_cat_errors['prod_descr'] = 'Please enter the description!'; } // Check for a category: if (!isset($_POST['cat']) || !filter_var($_POST['cat'], FILTER_VALIDATE_INT, array('min_range' => 1))) { $add_cat_errors['cat'] = 'Please select a category!'; } // Check for a price: if (empty($_POST['price']) || !filter_var($_POST['price'], FILTER_VALIDATE_FLOAT) || ($_POST['price'] <= 0)) { $add_cat_errors['price'] = 'Please enter a valid price!'; } // Check for a category: if (!isset($_POST['directory']) || !filter_var($_POST['directory'], FILTER_VALIDATE_INT, array('min_range' => 1))) { $add_cat_errors['directory'] = 'Please select a directory!'; } // Check for a stock: if (empty($_POST['stock']) || !filter_var($_POST['stock'], FILTER_VALIDATE_INT, array('min_range' => 1))) { $add_cat_errors['stock'] = 'Please enter the quantity in stock!'; } if (empty($add_cat_errors)) { $query = "INSERT INTO product (product, prod_descr, catID, price, dirID, stock) VALUES (?, ?, ?, ?, ?, ?)"; // Prepare the statement: $stmt = mysqli_prepare($dbc, $query); // For debugging purposes: // if (!$stmt) echo mysqli_stmt_error($stmt); // Bind the variables: mysqli_stmt_bind_param($stmt, 'sssssi', $name, $desc, $_POST['cat'], $_POST['price'], $_POST['directory'], $_POST['stock']); // Make the extra variable associations: $name = strip_tags($_POST['product']); $desc = strip_tags($_POST['prod_descr']); // Execute the query: mysqli_stmt_execute($stmt); if (mysqli_stmt_affected_rows($stmt) == 1) { // If it ran OK. // Print a message: echo '<h4>The product has been added!</h4>'; // Clear $_POST: $_POST = array(); // Clear $_FILES: $_FILES = array(); } else { // If it did not run OK. trigger_error('The product could not be added due to a system error. We apologize for any inconvenience.'); } } // End of $errors IF. } else { // Clear out the session on a GET request: } // End of the submission IF. require_once ('./includes/form_functions.inc.php'); ?> <form enctype="multipart/form-data" action="add_image.php?prodID={$row['prodID']}" method="post" accept-charset="utf-8"> <input type="hidden" name="MAX_FILE_SIZE" value="524288" /> Product<br /><?php create_form_input('product', 'text', $add_cat_errors); ?> Description<br /><?php create_form_input('prod_descr', 'textarea', $add_cat_errors); ?> Category<br /><select name="cat"<?php if (array_key_exists('cat', $add_cat_errors)); ?>> <option>Select One</option> <?php // Retrieve all the categories and add to the pull-down menu: $q = 'SELECT catID, cat FROM category ORDER BY cat ASC'; $r = mysqli_query ($dbc, $q); while ($row = mysqli_fetch_array ($r, MYSQLI_NUM)) { echo "<option value=\"$row[0]\""; // Check for stickyness: if (isset($_POST['cat']) && ($_POST['cat'] == $row[0]) ) echo ' selected="selected"'; echo ">$row[1]</option>\n"; } ?> </select><?php if (array_key_exists('cat', $add_cat_errors)) echo $add_cat_errors['cat']; ?> Price<br /><?php create_form_input('price', 'text', $add_cat_errors); ?> Directory<br /><select name="directory"<?php if (array_key_exists('directory', $add_cat_errors)); ?>> <option>Select One</option> <?php // Retrieve all the categories and add to the pull-down menu: $q = 'SELECT dirID, directory FROM directory ORDER BY directory ASC'; $r = mysqli_query ($dbc, $q); while ($row = mysqli_fetch_array ($r, MYSQLI_NUM)) { echo "<option value=\"$row[0]\""; // Check for stickyness: if (isset($_POST['directory']) && ($_POST['directory'] == $row[0]) ) echo ' selected="selected"'; echo ">$row[1]</option>\n"; } ?> </select><?php if (array_key_exists('directory', $add_cat_errors)) echo $add_cat_errors['directory']; ?> </select> <br /> Stock<br /><?php create_form_input('stock', 'text', $add_cat_errors); ?> <input type="submit" value="Add This Product" class="button" /> </fieldset> </form> and here is the code for show.php Code: [Select] <?php ini_set('display_errors',1); error_reporting(-1); require_once ('./includes/config.inc.php'); require_once (MYSQL); $add_cat_errors = array(); if($id = isset($_GET['prodID'])) { $q = "SELECT `prodID`, `product`, `prod_descr`, `catID`, `dirID`, `price`, `stock` FROM product WHERE `prodID`='{$_GET['prodID']}'"; $r = mysqli_query($dbc, $q); while($row = mysqli_fetch_array($r)) { echo $row['product']; echo "<br />"; echo $row['prod_descr']; echo "<br />"; echo $row['catID']; echo "<br />"; echo $row ['dirID']; echo "<br />"; echo $row['price']; echo "<br />"; echo $row['stock']; } } What I want is to try and retrieve the id of the last record inserted in add_product and pass it into show.php, but I get this error message. Quote An error occurred in script 'C:\Users\David Morgan\Desktop\WEBSITES\hairz_&_graces\site\admin\add_image.php' on line 16: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given I am struggling to find out where I am going wrong at the moment, if anyone could please help me that would be really appreciated. Hi everyone,
I've been running a self-written php shopping cart for the last 8 years, with lots of success. Recently however, the credit card processor (Linkpoint) I use upgraded their gateway, and now I have a problem.
Basically, the last page of my checkout does a _POST to a specific url for their gateway. I send through a bunch of <input> variables, some of them hidden, but all of them check out okay. I have combed over their specs, made sure I'm not sending any bad characters, made sure I've got the right format for the fields they want, etc...
Right now the transaction is successful, the customer's card is charged, but Linkpoint's system is returning an error message: We are unable to process your request due to invalid data.
Long story short, their support staff has asked me to "send them the xml string" via email. I have no idea how to do this (even after spending a few hours online trying to figure it out).
Is there a simple way to generate the xml string that's being passed during the _POST? Some kind of php code I can incorporate into my final checkout page, run a test transaction, and maybe write the string out somewhere so I can get it to them?
Any help you guys could give me would be greatly appreciated. Thanks in advance! Danny I am presuming that I set a global variable so that I can retrieve it on a different page...My filename is userid; and I will need this in many different pages. I set it thusly: Code: [Select] mysql_select_db($db , $link) or die("Couldn't open $db: ".mysql_error()); $long=$_SERVER['PHP_SELF']; //get path $text = substr(strrchr($long, "/"), 1); //get file name+extension $UserID = trim($text, " .php"); //remove extension, leaving userid Globals["UserID"]; and in a different file try to retrieve it thusly: echo "user is ".$GLOBALS["UserID"]; but all I ever see is "user is"------any help appreciated. What php method is good for getting file from a .xml sheet ? I have 3 dropdown menus which have the same name <select name="dropdown">, how to get the value from 3 of them by using php for loop and array? I did try to put array on them before, but seem it can't work. My codes : <?php for ( $counter = 1; $counter <= 3; $counter ++) { if (isset($_POST['submit'])) { //Form has been submitted. $dropvalue = $_POST['dropdown[$counter]']; echo $dropvalue; } } ?> <form action="test8.php" name="frmtest8" method='post'> <select name="dropdown[1]"> <option value="1st">first</option> <option value="2nd">second</option> <option value="3rd">third</option> </select> <select name="dropdown[2]"> <option value="1st">first</option> <option value="2nd">second</option> <option value="3rd">third</option> </select> <select name="dropdown[3]"> <option value="1st">first</option> <option value="2nd">second</option> <option value="3rd">third</option> </select> <input type="submit" name="submit" value="Send" /> </form> It gives error message Parse error: parse error in C:\wamp\www\plekz\test8.php on line 23 I guess the error is because of $_POST['dropdown[$counter]']; I cannot put the two symbols [] inside $_POST[' '] right? How to call the array if cannot put the two symbols? on page load pop up comes for selecting tv or movies (session is started in conn.php) if tv is selected session['select'] = 'tv_sotime' same for movies Now i want to change the selection I kept a link 'CHANGE' for selection i will unset session['select'] by passing variable on session.php but when i load /entertainment.php the pop up should not come Thank U... index.php Code: [Select] <? include("conn.php"); //require('_drawrating.php'); $pagename="Entertainment"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?=$settings->ScriptName?> | <?=$pagename?></title> <link rel="shortcut icon" href="images/favicon.ico" /> <link rel="shortcut icon" type="images/png" href="images/favicon.png" /> <link rel="shortcut icon" type="images/png" href="images/favicon.gif" /> <link rel="stylesheet" href="style.css" type="text/css" media="all" /> <link rel="stylesheet" href="css/cnelstyle.css" type="text/css" media="all" /> <link media="screen" rel="stylesheet" href="css/colorbox.css" /> <script src="js/jquerylatestmin.js" type="text/javascript"></script> <script src="js/jquery.colorbox-min.js" type="text/javascript"></script> <script type="text/javascript"> $(function() { $(window).bind('load', function(e) { $.colorbox({ 'width' : 300, 'height' : 130, 'transitionIn' : 'none', 'transitionOut' : 'elastic', 'centerOnScroll' : 'true', 'overlayOpacity' : 0.2, 'overlayColor' : '#000', 'modal' : 'true', href:"select.php"}); }); }); </script> </head> <body> <? //require_once("fb.php")?> <div id="wrap"> <? include('header.php'); include("session.php"); ?> <div class="wraper"> <div class="middle"> <div class="ad"><?=stripslashes($adsense->Ads7)?></div> </div> <div class="clr"></div> </div> </div> <div class="footer"> <div class="wraper"> <?php include("footer.php"); ?> </div> </div> </body> </html> tv_sotime.php Code: [Select] <?php include("conn.php"); $pagename="TV SHOWTIME"; $_SESSION['select'] = 'tv_sotime'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> <?=$settings->ScriptName?> | <?=$pagename?> </title> <link rel="shortcut icon" href="images/favicon.ico" /> <link rel="shortcut icon" type="images/png" href="images/favicon.png" /> <link rel="shortcut icon" type="images/png" href="images/favicon.gif" /> <link rel="stylesheet" href="css/cnelstyle.css" type="text/css" media="all" /> <link rel="stylesheet" href="style.css" type="text/css" media="all" /> <link rel="stylesheet" href="jscss/main.css" /> <script type="text/javascript" src="jscss/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="jscss/main.js"></script> </head> <body> <? //include("customjqmodalbox.php"); require_once("fb.php"); ?> <div id="wrap"> <? include('header.php')?> <div class="wraper"> <div class="middle"> <div class="middle_content"><a href="session.php?curr=c">Change</a></div> <div id="page"> <ul class="mytabs" id="tabs"> <li class="title"> <h2><strong>What's on Today?</strong></h2> <? //date('l M d Y')?> </li> <!-- <li class="todaydate"> <h2></h2> </li>--> <li class="current"><a href="tab-1.html">Movies</a></li> <li><a href="tab-2.html">Reality</a></li> <li><a href="tab-3.html">Sports</a></li> </ul> <div class="mytabs-container" id="tabs-container"> Loading... </div> </div> <!-- page --> <div class="ad"> <?=stripslashes($adsense->Ads7)?> </div> <div class="ss"> <h3 id="cat_head">Categories</h3> <ul> <li><a href="#">Drama</a></li> <li><a href="#">TV Programs</a></li> <li><a href="#">Special Programs for special Day</a></li> </ul> <img src="images/cineaxis.png" alt="" /> </div> </div> </div> <div class="clr"></div> </div> </div> <!-- warp --> <!--<div class="fb-like-box" data-href="http://www.facebook.com/CineAxis" data-width="198" data-height="274" data-show-faces="true" data-border-color="#E8E8E8" data-stream="false" data-header="false"> </div>--> <div class="footer"> <div class="wraper"> <?php include("footer.php"); ?> </div> </div> </body> </html> Code: [Select] <? include("conn.php"); //session_start(); if(isset($_GET['curr']) == 'c') { unset($_SESSION['select']); //session_destroy(); header("Location:index.php"); } if(isset($_SESSION['select'])) { if($_SESSION['select'] == 'tv_sotime') { $page = 'tv_sotime.php'; header("Location:$page"); } if($_SESSION['select'] == 'movie_sotime') { $page2 = 'movie_sotime.php'; header("Location:$page2"); } } ?> I have a form where you can pick all the days in the week. When the form is posted my code finds the date of the day you picked that most recently went by. Then the code takes that date, and echos the date of every day of the week that you picked that comes after that date for a year. But for some reason he thinks we're in 2009, even though i know the date puts out that we're in 2010. Here's the code: <?php //function if(isset($_POST['submit'])) { function nextWeeksDay($date_begin,$nbrweek) { $nextweek=array(); for($i = 1; $i <= $nbrweek; $i++) { // 52 week in one year of course $nextweek[$i]=date('d-m-y', strtotime('+'.$i.' week',$date_begin)); } return $nextweek; } //Get what user posted as day, and find the date of the past day gone. $roday = $_POST['day']; echo $roday; echo date('d-m-y',strtotime('last ' . $roday)); $sistdag = date('d-m-y',strtotime('last ' . $roday)); /// end function /// example of a select date // var $date_begin = strtotime($sistdag); //D Day Month Year - like function format. $nbrweek=52; // call function $result=nextWeeksDay($date_begin,$nbrweek); // Preview for($i = 1; $i <= $nbrweek; $i++) { echo '<br> - '.$result[$i]; } } ?> All help appreciated! Hello, I am trying to figure out how to grab the latest aim status update from "http://lifestream.aol.com/stream/iragedxt" But I can only see the Current Status if I am logged into my aim account on the website so is there a way I can log into my aim account on lifestream.aol.com and then I believe its to use curl to grab the text from the other website? if so could someone please help me with this? Thanks, John |