Click here to Skip to main content
15,886,137 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: The joys of PHP mail() Pin
Dr.Walt Fair, PE21-Jan-11 15:33
professionalDr.Walt Fair, PE21-Jan-11 15:33 
GeneralRe: The joys of PHP mail() Pin
Fatih P.7-Feb-11 3:10
Fatih P.7-Feb-11 3:10 
AnswerRe: The joys of PHP mail() Pin
chiryphp29-Jan-11 14:46
chiryphp29-Jan-11 14:46 
Questionhtaccess without changing actual url Pin
salman ansari19-Jan-11 20:22
salman ansari19-Jan-11 20:22 
Questionuploading file via post Pin
0b4m418-Jan-11 23:13
0b4m418-Jan-11 23:13 
AnswerRe: uploading file via post Pin
Niall Barr19-Jan-11 2:32
professionalNiall Barr19-Jan-11 2:32 
GeneralRe: uploading file via post Pin
0b4m419-Jan-11 3:27
0b4m419-Jan-11 3:27 
GeneralRe: uploading file via post Pin
Niall Barr19-Jan-11 5:10
professionalNiall Barr19-Jan-11 5:10 
No - that works on my system, as long as the CSV file isn't too big. (OK with 150k, not with 30M)

This is the version of your code I tried out.

<?php
function datapost($URLServer,$postdata)
		{

	$agent = "Mozilla/5.0";
	$cURL_Session = curl_init();
	curl_setopt($cURL_Session, CURLOPT_URL,$URLServer);
	curl_setopt($cURL_Session, CURLOPT_USERAGENT, $agent);
    curl_setopt($cURL_Session, CURLOPT_HTTPGET, FALSE);
	//curl_setopt($cURL_Session, CURLOPT_POST, 1);
    curl_setopt($cURL_Session, CURLOPT_POSTFIELDS,$postdata);
	curl_setopt($cURL_Session, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($cURL_Session, CURLOPT_FOLLOWLOCATION, 1);
	$result = curl_exec($cURL_Session);

	return $result;
}


	$postdata = array();
	$postdata['Id'] = '12340';
	$postdata['profileName'] = 'tsunami';
    $postdata['file'] = file_get_contents('http://localhost/tmp/test.csv');

	$postdata['submit'] = urlencode('submit');

    $source= datapost("http://localhost/tmp/posthere.php",$postdata);

    echo $source;

?>


My test posthere.php is
<?php

foreach($_POST as $k=>$v)
{
	echo "$k => ".strlen($v)."<br/>";
}

?>

GeneralRe: uploading file via post Pin
0b4m419-Jan-11 5:49
0b4m419-Jan-11 5:49 
GeneralRe: uploading file via post Pin
Niall Barr19-Jan-11 6:04
professionalNiall Barr19-Jan-11 6:04 
GeneralRe: uploading file via post Pin
0b4m419-Jan-11 6:11
0b4m419-Jan-11 6:11 
GeneralRe: uploading file via post Pin
Niall Barr22-Jan-11 1:31
professionalNiall Barr22-Jan-11 1:31 
GeneralRe: uploading file via post Pin
0b4m425-Jan-11 4:11
0b4m425-Jan-11 4:11 
QuestionWhich PHP framework to use? [modified] Pin
skqi15-Jan-11 20:08
skqi15-Jan-11 20:08 
AnswerRe: Which PHP framework to use? Pin
chiryphp16-Jan-11 13:49
chiryphp16-Jan-11 13:49 
GeneralRe: Which PHP framework to use? Pin
skqi29-Jan-11 1:22
skqi29-Jan-11 1:22 
QuestionComments postings on websites - need help pls... Pin
bdesi14-Jan-11 7:23
bdesi14-Jan-11 7:23 
AnswerRe: Comments postings on websites - need help pls... Pin
shamly15-Jan-11 6:01
shamly15-Jan-11 6:01 
GeneralRe: Comments postings on websites - need help pls... Pin
cjoki17-Jan-11 4:55
cjoki17-Jan-11 4:55 
GeneralRe: Comments postings on websites - need help pls... Pin
shamly17-Jan-11 5:14
shamly17-Jan-11 5:14 
AnswerRe: Comments postings on websites - need help pls... Pin
effayqueue19-Mar-11 2:48
effayqueue19-Mar-11 2:48 
QuestionHelp running php scripts locally and/or conversion to executable format Pin
ldsdbomber14-Jan-11 1:34
ldsdbomber14-Jan-11 1:34 
AnswerRe: Help running php scripts locally and/or conversion to executable format Pin
cjoki14-Jan-11 4:40
cjoki14-Jan-11 4:40 
QuestionSear Engines (Google search / Yahoo Search ) Pin
bdesi13-Jan-11 21:54
bdesi13-Jan-11 21:54 
AnswerRe: Sear Engines (Google search / Yahoo Search ) Pin
Gerben Jongerius14-Jan-11 2:51
Gerben Jongerius14-Jan-11 2:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.