Help with curl (change header and footer)

Started on the old forum in November 2009 · view the original in the archive · old links redirect here

#curl #help-me-please

3 replies · 1,016 views · started 17 years ago · 1 min read

3 participants
Quintin Junior · 20 posts #1

Can someone please help me? I figured how you open pages with curl, but now, i want to be able to strip the top head, and </body></html> peace, and want to be able to change links within the page etc.

<?php
 if(isset($_REQUEST['name'])) $num= $_REQUEST['name'];
 if(isset($_REQUEST['surname'])) $msg= $_REQUEST["surname"];
 $Curl_Session = curl_init('http://example.com');
 curl_setopt ($Curl_Session, CURLOPT_POSTFIELDS, "name=$name&surname=$surname");
 curl_exec ($Curl_Session);
 curl_close ($Curl_Session);
?>

😢

header("location: hell.php");
ranzit2 Developer · 187 posts #2

U want to make a grabber..use Preg and str replace functions.u need to learn regular expression.just googling regular expression will help u much.

she is beautifull than php.and i love her more than php.

paramound Junior · 18 posts #3

try w3schools.com and learn more basics like ranzit2 has said earlier

Quintin Junior · 20 posts #4

that wasn't my question was it? I know php but just like everyone else i can also strugle sometimes.

header("location: hell.php");

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close