Jump to content

lordphate

Members
  • Posts

    154
  • Joined

  • Last visited

    Never

Everything posted by lordphate

  1. Your right, the message was base64 encoded, so I used fwrite($fh,print_r(base64_decode($message),TRUE)); Your code works w00t Thanks!!
  2. I tried this, and sadly it didn't work I'm not sure why it's not working. For some reason it's just not picking it up
  3. Hi Everyone, I'm building a script to pull a URL from an email being read by a PHP script using php://stdin Currently I have the ability to check for email addresses (which works with no problems), and basic Regex stuff like : if(preg_match("/\b5.5.0\b/i",$message)) { ... and preg_match_all("/\bFrom [\w\.-]+@[\w\.-]+\.\w{2,4}\b/i",$headers,$emails); however when it comes down to retrieving a URL from the message I can't get past it if(preg_match('/https?\:\/\/[^\" ]+/i',$message,$url)) { Any ideas on what i'm doing wrong ? here is a sample email: Click the link below to fill out the request: https://words.morewords.domain.tld/word/addme?a=email@domain.tld&id=1n4Hlb4iO3Nl34g1 Thanks in advance!!
  4. I do not have sample records, I have NO access to the database. This is all through an API (which is out of my control as well). $approvedCondition = array( 'QueryText' => "SELECT * FROM ContactCustomProfileField WHERE ContactID NOT IN (SELECT ContactID FROM ContactCustomProfileField WHERE FieldID=4964744)", 'PageSize' => 1, 'PageNumber' => 1 ); $approvedRequest = new soapval('request', 'QueryRequest', $approvedCondition, false, 'tns'); $approvedParam = array('request' => $approvedRequest); $approvedResponse = $client->call('Query', array('parameters' => $approvedParam)); $approvedResult = $approvedResponse['QueryResult']; foreach ($approvedResult[Records][Record] as $approved){ $republicCondition = array( 'QueryTexxt' => "SELECT * FROM ContactCustomProfileField WHERE ContactID={$approved} AND FieldID=4953960 AND Value LIKE '%' ORDER BY DateUpdated DESC", 'PageSize' => 20, 'PageNumber' => $_GET["page"]+1 ); $republicRequest = new soapval('request', 'QueryRequest', $republicCondition, false, 'tns'); $republicParam = array('request' => $republicRequest); $republicResponse = $client->call('Query', array('parameters' => $republicParam)); $republicResult = $republicResponse[QueryResult][Records][Record]; print_r($republicResponse);exit; foreach($republicResult as $republican) { //---Get The Profile---// $profileCondition = array( 'QueryText' => "SELECT * FROM ContactProfile WHERE ContactID=$republican[ContactID]", 'PageSize' => 100, 'PageNumber' => 1 ); $profileRequest = new soapval('request', 'QueryRequest', $profileCondition, false, 'tns'); $profileParam = array('request' => $profileRequest); $profileResponse = $client->call('Query', array('parameters' => $profileParam)); $profile = $profileResponse["QueryResult"]["Records"]["Record"]; ... I even tried two separate queries
  5. Hi Everyone I'm having an issue where I am trying to retrieve only profiles that have not been approved. I cannot edit the DB, so I cannot rework that portion at all (otherwise i would have rebuilt the DB to begin with). The table is formed like: ContactID (int) FieldID (int) Value (string) DateUpdated (timestamp) ----- Here is my query: "SELECT * FROM ContactCustomProfileField WHERE ContactID NOT EXISTS (SELECT ContactID FROM ContactCustomProfileField WHERE FieldID=4964744) AND FieldID=4953960 AND Value LIKE '%' ORDER BY DateUpdated DESC"; I also tried: SELECT * FROM ContactCustomProfileField WHERE ContactID NOT IN (SELECT ContactID FROM ContactCustomProfileField WHERE FieldID=4964744) AND FieldID=4953960 AND Value LIKE '%' ORDER BY DateUpdated DESC FieldID 4964744 is the "Approved" field. It is only inserted during the approval process. Before the approval process that field (for that particular ContactID) is not in the database. Once approved or denied, a insertion is made that makes FieldID 4964744 for the ContactID with the Value of 'Approved' or 'Denied' Any Ideas ? Thanks!
  6. Maybe i could use this instead: include(DOC_ROOT."/themes/".$GLOBALS["THEME"]."/system/article_categories.inc.php"); while(list($key,$val) = each($categories)) { $category["name"] = $val; $category["id"] = $key $categories[] = $category; }//while
  7. Okay so i'm doing an articles script and i want just categories, and i want it file based [the categories] so i figured i'd do something like $categories[0] = "Category 1"; $categories[1] = "Category 2"; now for my main script can i do include(DOC_ROOT."/themes/".$GLOBALS["THEME"]."/system/article_categories.inc.php"); foreach($categories as $cat) { $category["name"] = $cat; $category["id"] = current($categories); } I know this may be a really easy question, but i've had like 2 hours of sleep this week AND getting married tomorrow lol...thanks guys ?
  8. Umm truthfully i have NO idea what you mean...i'm such a n00b at javascript
  9. Hey Guys, this also includes a bit of PHP, but i'm having issues with the javascript part: function module_categories(){ admin_validate(); $theme = $GLOBALS["Get"]->val("theme"); if(empty($theme)) $theme = $GLOBALS["THEME"]; $data["theme"] = $theme; $data["title_id"] = "38"; $data["module"] = $module; $data["modules"] = admin_get_modules(); $data["link"] = "index.php?section=cars_categories&theme=".$data["theme"]; $data["section"] = "setup"; $data["subsection"] = 4; include(DOC_ROOT."/themes/".$data["theme"]."/system/cars.inc.php"); $jscode = ""; while(list($key,$val) = each($categories)){ $jscode.= "HS_Categories[".$key."] = \"".hs_ereg_replace('"','\"',$val)."\";\n"; }//while while(list($key,$val) = each($subcategories)){ $jscode.= "HS_SubCategories[".$key."] = new Array;\n"; while(list($k,$v) = each($val)){ $jscode.= "HS_SubCategories[".$key."][".$k."] = \"".hs_ereg_replace('"','\"',$v)."\";\n"; }//while }//while while(list($key2,$val2) = each($subsubcategories)){ $jscode.= "HS_SubSubCategories[".$key2."] = new Array;\n"; while(list($k2,$v2) = each($val2)){ $jscode .= "HS_SubSubCategories[".$key2."][".$k2."] = new Array;\n"; while(list($k3,$v3) = each($v2)){ $jscode.= "HS_SubSubCategories[".$key2."][".$k2."][".$k3."] = \"".hs_ereg_replace('"','\"',$v3)."\";\n"; } }//while }//while $data["javascript"] = <<<JAVASCRIPTCODE <script language="JavaScript"> <!-- var HS_Categories = new Array; var HS_SubCategories = new Array; var HS_SubSubCategories = new Array; var Category = 0; var SubCategory = 0; var SubSubCategory = 0; function HS_InitCategories(){ $jscode }//HS_InitCategories function HS_PopulateSubCategoriesSimple(){ var FormHandler = document.classifieds_search; Category = FormHandler.category.options[FormHandler.category.selectedIndex].value; for(var i=FormHandler.subcategory.options.length-1; i>=0; i--){ FormHandler.subcategory.options[i] = null; }//for FormHandler.subcategory.options[0] = new Option("Please, select...","0"); var k=1; for(var Item in HS_SubCategories[Category]){ FormHandler.subcategory.options[k] = new Option(HS_SubCategories[Category][item],Item); k++; }//for }//HS_PopulateSubCategoriesSimple function HS_PopulateSubCategories(){ var FormHandler = document.cls_categories; Category = FormHandler.categories.options[FormHandler.categories.selectedIndex].value; for(var i=FormHandler.subcategories.options.length-1; i>=0; i--){ FormHandler.subcategories.options[i] = null; }//for var k=0; for(var Item in HS_SubCategories[Category]){ if(HS_SubCategories[Category][item] != "EMPTY"){ FormHandler.subcategories.options[k] = new Option(HS_SubCategories[Category][item],Item); k++; }//if }//for FormHandler.edit_category.value = HS_Categories[Category]; FormHandler.edit_subcategory.value = ""; HS_SubCategory = 0; }//HS_PopulateSubCategories function HS_EditSubCategory(){ if(Category){ var FormHandler = document.cls_categories; SubCategory = FormHandler.subcategories.options[FormHandler.subcategories.selectedIndex].value; FormHandler.edit_subcategory.value = HS_SubCategories[Category][subCategory]; }//if }//HS_EditSubCategory function HS_PopulateSubSubCategoriesSimple(){ var FormHandler = document.classifieds_search; Category = FormHandler.category.options[FormHandler.category.selectedIndex].value; SubCategory = FormHandler.subcategory.options[FormHandler.subcategory.selectedIndex].value; for(var i=FormHandler.subsubcategory.options.length-1; i>=0; i--){ FormHandler.subsubcategory.options[i] = null; }//for FormHandler.subsubcategory.options[0] = new Option("Please, select...","0"); var k=1; for(var Item in HS_SubSubCategories[Category][subCategory]){ FormHandler.subsubcategory.options[k] = new Option(HS_SubSubCategories[Category][subCategory][item],Item); k++; }//for }//HS_PopulateSubSubCategoriesSimple function HS_PopulateSubSubCategories(){ var FormHandler = document.cls_categories; Category = FormHandler.categories.options[FormHandler.categories.selectedIndex].value; SubCategory = FormHandler.subcategories.options[FormHandler.subcategories.selectedIndex].value; for(var i=FormHandler.subsubcategories.options.length-1; i>=0; i--){ FormHandler.subsubcategories.options[i] = null; }//for var k=0; for(var Item in HS_SubSubCategories[Category][subCategory]){ if(HS_SubSubCategories[Category][subCategory][item] != "EMPTY"){ FormHandler.subsubcategories.options[k] = new Option(HS_SubSubCategories[Category][subCategory][item],Item); k++; }//if }//for FormHandler.edit_category.value = HS_Categories[Category]; FormHandler.edit_subcategory.value = HS_SubCategories[Category][subCategory]; FormHandler.edit_subsubcategory.value = ""; HS_SubSubCategory = 0; }//HS_PopulateSubSubCategories function HS_EditSubSubCategory(){ if(SubCategory){ var FormHandler = document.cls_categories; SubSubCategory = FormHandler.subsubcategories.options[FormHandler.subsubcategories.selectedIndex].value; FormHandler.edit_subsubcategory.value = HS_SubSubCategories[Category][subCategory][subSubCategory]; }//if }//HS_EditSubCategory function HS_AddCategory(){ var FormHandler = document.cls_categories; var CategoryName = FormHandler.new_category.value; var CatID = HS_Categories.length+1; HS_Categories[CatID] = CategoryName; HS_SubCategories[CatID] = new Array; FormHandler.categories.options[FormHandler.categories.options.length] = new Option(CategoryName,CatID); FormHandler.new_category.value = ""; }//HS_AddCategory function HS_AddSubCategory(){ if(Category){ var FormHandler = document.cls_categories; var SubCategoryName = FormHandler.new_subcategory.value; var SubCatID = HS_SubCategories[Category].length+1; HS_SubCategories[Category][subCatID] = SubCategoryName; FormHandler.subcategories.options[FormHandler.subcategories.options.length] = new Option(SubCategoryName,SubCatID); FormHandler.new_subcategory.value = ""; }//if }//HS_AddSubCategory function HS_AddSubSubCategory(){ if(SubCategory){ var FormHandler = document.cls_categories; var SubSubCategoryName = FormHandler.new_subsubcategory.value; var SubSubCatID = HS_SubSubCategories[Category][subCategory].length+1; HS_SubSubCategories[Category][subCategory][subSubCatID] = SubSubCategoryName; FormHandler.subsubcategories.options[FormHandler.subsubcategories.options.length] = new Option(SubSubCategoryName,SubSubCatID); FormHandler.new_subsubcategory.value = ""; }//if }//HS_AddSubCategory function HS_UpdateCategory(){ if(Category){ var FormHandler = document.cls_categories; var CategoryName = FormHandler.edit_category.value; HS_Categories[Category] = CategoryName; var Selected = FormHandler.categories.selectedIndex; FormHandler.categories.options[selected] = new Option(CategoryName,Category); FormHandler.categories.selectedIndex = Selected; }//if }//HS_UpdateCategory function HS_UpdateSubCategory(){ if(Category && SubCategory){ var FormHandler = document.cls_categories; var SubCategoryName = FormHandler.edit_subcategory.value; HS_SubCategories[Category][subCategory] = SubCategoryName; var Selected = FormHandler.subcategories.selectedIndex; FormHandler.subcategories.options[selected] = new Option(SubCategoryName,SubCategory); FormHandler.subcategories.selectedIndex = Selected; }//if }//HS_UpdateSubCategory function HS_UpdateSubSubCategory(){ if(Category && SubCategory && SubSubCategory){ var FormHandler = document.cls_categories; var SubSubCategoryName = FormHandler.edit_subsubcategory.value; HS_SubSubCategories[Category][subCategory][subSubCategory] = SubSubCategoryName; var Selected = FormHandler.subsubcategories.selectedIndex; FormHandler.subsubcategories.options[selected] = new Option(SubSubCategoryName,SubSubCategory); FormHandler.subsubcategories.selectedIndex = Selected; }//if }//HS_UpdateSubCategory function HS_DeleteCategory(){ if(Category){ var FormHandler = document.cls_categories; HS_Categories[Category] = "EMPTY"; FormHandler.categories.options[FormHandler.categories.selectedIndex] = null; FormHandler.edit_category.value = ""; FormHandler.edit_subcategory.value = ""; Category = 0; SubCategory = 0; for(var i=FormHandler.subcategories.options.length; i>=0; i--){ FormHandler.subcategories.options[i] = null; }//for }//if }//HS_DeleteCategory function HS_DeleteSubCategory(){ if(Category && SubCategory){ var FormHandler = document.cls_categories; HS_SubCategories[Category][subCategory] = "EMPTY"; FormHandler.subcategories.options[FormHandler.subcategories.selectedIndex] = null; FormHandler.edit_subcategory.value = ""; SubCategory = 0; }//if }//HS_DeleteSubCategory function HS_DeleteSubSubCategory(){ if(Category && SubCategory && SubSubCategory){ var FormHandler = document.cls_categories; HS_SubSubCategories[Category][subCategory][subSubCategory] = "EMPTY"; FormHandler.subsubcategories.options[FormHandler.subsubcategories.selectedIndex] = null; FormHandler.edit_subsubcategory.value = ""; SubSubCategory = 0; }//if }//HS_DeleteSubCategory function HS_UpdateData(){ var CatsLine = ""; var SubCatsLine = ""; var SubSubCatsLine = ""; var TotalCats = 0; var Rules = new Array(); var Error = 0; var FormHandler = document.cls_categories; for(var Item in HS_Categories){ if(HS_Categories[item] != "EMPTY"){ CatsLine+= Item+"|"+HS_Categories[item]+"==|=="; Rules[item] = 0; TotalCats++; for(var SubItem in HS_SubCategories[item]){ SubCatsLine+= Item+"|"+SubItem+"|"+HS_SubCategories[item][subItem]+"==|=="; if(HS_SubCategories[item][subItem] != "EMPTY") Rules[item] = 0; }//for for(var SubSubItem in HS_SubSubCategories[item][subItem]){ SubSubCatsLine+= Item+"|"+SubItem+"|"+SubSubItem+"|"+HS_SubSubCategories[item][subItem][subSubItem]+"==|=="; if(HS_SubSubCategories[subItem][subSubItem] != "EMPTY") Rules[subItem] = 0; }//for }//if else{ for(var SubItem in HS_SubCategories[item]){ SubCatsLine+= Item+"|"+SubItem+"|EMPTY==|=="; }//for for(var SubSubItem in HS_SubSubCategories[item]){ SubSubCatsLine+= Item+"|"+SubSubItem+"|EMPTY==|=="; }//for }//else }//for for(var Rule in Rules){ if(Rules[Rule] == 0){ Error = 1; }//if }//for if(TotalCats == 0) Error = 2; FormHandler.res_categories.value = CatsLine; FormHandler.res_subcategories.value = SubCatsLine; FormHandler.res_subsubcategories.value = SubSubCatsLine; FormHandler.submit(); }//HS_UpdateData //--> </script> JAVASCRIPTCODE; $data["onload"] = "HS_InitCategories();"; $data["categories"] = $categories; $data["subcategories"] = $subcategories; $data["subsubcategories"] = $subsubcategories; $layout[0] = "cars_categories"; admin_output($layout,$data); }//module_categories the error i'm getting is: Error: HS_SubSubCategories[item] is undefined at this area for(var SubSubItem in HS_SubSubCategories[item][subItem]){ SubSubCatsLine+= Item+"|"+SubItem+"|"+SubSubItem+"|"+HS_SubSubCategories[item][subItem][subSubItem]+"==|=="; if(HS_SubSubCategories[subItem][subSubItem] != "EMPTY") Rules[subItem] = 0; }//for Any one have any clue
  10. Hey Everyone I'm looking for some advice about how to go about doing a facebook-like photo captions, they use a single form [from what i can tell] and allow you to add captions to a maximum of 60 photos [i think this is just a set limit for them, never could upload more than 60 in a single album]. http://www.arshem.net/facebook-captions.jpg -- WARNING BIG IMAGE 800k How would you go about making the form for that ? Here's what i was THINKING, but not sure FORM CODE $form = ' <form name="photo_caption" action="index.php" method="post"> <input type="hidden" name="handler" value="gallery"> <input type="hidden" name="action" value="edit_caption"> foreach($photos as $photo) { $form .= '<textarea cols=40 rows=4 name="caption[]" id="'.$photo["pho_id"].'">'; } $form .= '<input type="submit" value="Edit Captions">'; echo $form; think that will work so far ? [$photos will be a variable set after the photos are uploaded] Here is the php [and yes i'm not double checking my code, i'll recheck when i'm actually coding it for my site]. foreach($_POST["caption"] as $caption) { mysql_query("UPDATE gallery SET caption='".$caption."',update='".time()."' WHERE pho_id='".$_POST["pho_id"]); }//foreach I have a feeling i can't do $_POST["pho_id"]..what could i use instead ? Thanks! Brandon
  11. Hey everyone, I had a quick question, what would be the best way to implode dynamically generated textfields [generated through ajax]. The dynamic textfield would have a "name"+ count <input type="textfield" name="textfield0"... Basically i'm wanting to implode each "textfield#" seperated by || or something close to that. I was thinking a foreach ? But then i can't figure out how to get the number of textfields Any help would be appreciated [bTW i'm not looking for the actual answer, just a suggestion on how to go about doing this, i'm trying to learn ajax, and it's through me for a loop ]
  12. Hey Always <script type="text/javascript"> var http = false; if(navigator.appName == "Microsoft Internet Explorer") { http = new ActiveXObject("Microsoft.XMLHTTP"); } else { http = new XMLHttpRequest(); } function replace() { http.open("GET", "hello.html", true); http.onreadystatechange=function() { if(http.readyState == 4) { document.getElementById('pageone').innerHTML = http.responseText; } } http.send(null); } function replace2() { http.open("GET", "statistics.html", true); http.onreadystatechange=function() { if(http.readyState == 4) { document.getElementById('pageone').innerHTML = http.responseText; } } http.send(null); } </script></head> <body> <p><a href="javascript:replace()">page one</a></p> <p><a href="javascript:replace2()">page one</a></p> <div id="pageone"> Hello, world! </div> </body>
  13. Hey Kane, If you are using a CMS, then you may have some issues with the "pre-existing" code, however not all CMS's are a PITA Basically you would need to edit the form, when you have a <textarea> box you would need to assign an ID to it, for example <textarea id="box1" name="box1"> you could then use ajax to use getelementbyid('box1') or something similar to find the box that you need to "submit without refreshing". You will need more than just an id and the 1 piece of code i've given you, i suggest looking at http://www.malsup.com/jquery/form/ they are not using the "id" in the <form> tag. I hope this helps Remember to mark it Solved if it does
  14. I always use indecisive tags like <span id="yourid"> </span> or even paragraphs <p id="yourid"> , there are alot of options, but you need to make sure you javascript isn't LOOKING for a div, if it is then you would need to change it as well.
  15. Hey everyone, I'm learning a bit about ajax, jquery, and how it works out. I'm having a small issue. I'm using a jquery MultiFile upload http://www.fyneworks.com/jquery/multiple-file-upload/ And it does as it should, and i'm trying to do the backside of things However when i do [code] print_r($_FILES["photos"]); i receive this : Array ( [name] => Array ( [0] => [1] => HappyThanksgiving.jpg [2] => 0823081640.jpg [3] => 0814081510.jpg [4] => 0709081918.jpg ) [type] => Array ( [0] => [1] => image/jpeg [2] => image/jpeg [3] => image/jpeg [4] => image/jpeg ) [tmp_name] => Array ( [0] => [1] => C:\wamp\tmp\phpCFCA.tmp [2] => C:\wamp\tmp\phpCFDA.tmp [3] => C:\wamp\tmp\phpD00A.tmp [4] => C:\wamp\tmp\phpD02A.tmp ) [error] => Array ( [0] => 4 [1] => 0 [2] => 0 [3] => 0 [4] => 0 ) [size] => Array ( [0] => 0 [1] => 87633 [2] => 261160 [3] => 264875 [4] => 242486 ) ) Ideas on why it would group by name, type, tmp_name, error, and size ? I've never seen this before :|
  16. Hey everyone, i'm having some issues here.. The following code is where i want to use the explode to enter new titles into the theme titles. $titles_explode = explode(" -: : | : : - ",file_get_contents("data/titles.inc.php")); foreach($titles_explode as $title) { $data = explode("___",$title); $titles_file = DOC_ROOT."/themes/".$theme."/titles.inc.php"; include($titles_file); $title_str = "<?php "; $title_str .= go_through_array("\$titles",$titles); $title_str .= '$titles["'.$title[0].'"] = "'.$title[1].'";'; $title_str .= '?>'; $file_handler = fopen($titles_file,"w"); fwrite($file_handler,$title_str); fclose($file_handler); }//foreach_titles here is whats in data/titles.inc.php files-: : | : : -|site_name|::Files___ files_upload-: : | : : -site_name|::Files Upload___ files_edit-: : | : : -site_name|::Files Edit___ files_manage-: : | : : -site_name|::Files Manage___ files_view-: : | : : -|site_name|::Files View and heres' what its outputting [after the go_through_array function is where its messing up] $titles["files-: : | : : -|site_name|::Files"] = " files_upload-: : | : : -site_name|::Files Upload"; $titles[" "] = " "; $titles["f"] = "i";
  17. it should be showing the results of $res["post_title"] = $row["title"]; $res["post_time"] = $row["posted"]; $res["post_author"] = get_MemberName($row["author"]); [which is almost identical to the one above]. It would be in the "Last Post" area. the last post comes from: while($res = mysql_fetch_assoc($result)) { ---this line--- $sql_query = "SELECT * FROM learning_forummessage WHERE idMessage='".$res["last_post"]."'"; $query = mysql_query($sql_query,$conn); while($row = mysql_fetch_array($query)) { also this is my updated code: if($member) { $sql_query = "SELECT * FROM learning_forumthread WHERE idForum='".$idForum."'"; $result = mysql_query($sql_query,$conn); while($res = mysql_fetch_assoc($result)) { $sql_query = "SELECT * FROM learning_forummessage WHERE idMessage='".$res["last_post"]."'"; $query = mysql_query($sql_query,$conn); while($row = mysql_fetch_array($query)) { $res["post_title"] = $row["title"]; $res["post_time"] = $row["posted"]; $res["post_author"] = get_MemberName($row["author"]); }//while $res["forum"] = get_ForumName($idForum); $thread[] = $res; }//while }//if same results as previous picture
  18. Okay i KNOW this is something too simple, but i'm sick, and i've been looking at code for the last 14 hours [not this particular piece ] if($member) { $sql_query = "SELECT * FROM learning_forumthread WHERE idForum='".$idForum."'"; $result = mysql_query($sql_query,$conn); while($res = mysql_fetch_array($result)) { $sql_query2 = "SELECT * FROM learning_forummessage WHERE idMessage='".$res["last_post"]."'"; $result2 = mysql_query($sql_query2,$conn); while($row = mysql_fetch_array($result2)) { $res["post_title"] = $row["title"]; $res["post_time"] = $row["posted"]; $res["post_author"] = get_MemberName($row["author"]); }//while $res["forum"] = get_ForumName($idForum); $thread[] = $res; }//while }//if this is what it outputs:
  19. Heres' what i used to make cookies to make sure its not that , that is causing the issue: $curl = curl_init(); curl_setopt($curl, CURLOPT_URL,$LOGINURL); curl_setopt($curl, CURLOPT_USERAGENT, $agent); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $POSTFIELDS); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($curl, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt($curl, CURLOPT_COOKIESESSION, TRUE); curl_setopt($curl, CURLOPT_COOKIEFILE, "cookie.txt"); curl_setopt($curl, CURLOPT_COOKIE, 1); $store = curl_exec ($curl); curl_setopt($curl, CURLOPT_URL,$values["video"]); curl_setopt($curl, CURLOPT_USERAGENT, $agent); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_COOKIE, 1); curl_setopt($curl, CURLOPT_COOKIESESSION, TRUE); curl_setopt($curl, CURLOPT_COOKIEFILE, "cookie.txt"); $flv = curl_exec($curl); print($flv);exit; fwrite($flash,$flv); fclose($flash);
  20. How do i do that with curl ? [or fsock ?] I thought i was doing that with curl, but apparently i'm not :|
  21. Corbin, I've tried cookies, i've tried user agents. I'm guessing it records IP addresses on the site, and then checks to see if your still on the site. Because if you just go to the site you will see that you can download without an issue [even on different browsers]. But if you go off the site, and try to use the download URL, it gives you the 403 error. Thats' why i was wondering if curl was able to stay on the site while accessing another part of their site ? I've also tried referrals.
  22. James, there is nothing wrong with jQuery. this is an ajax issue. PLease open a thread there you'll get more help
×
×
  • 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.